X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=ricsdl-package%2Fexamples%2Fsync.py;h=24c8fe8498c4f42f98857468a41640f14f211375;hb=276ed3c833c81a4142d7c4607474ee95a7f01355;hp=c75dfb6bfcbe6b2e68884198e674c6b35e3c70f5;hpb=dada8463c0fd4c3b90eedc54b6c913f0fa0e7272;p=ric-plt%2Fsdlpy.git diff --git a/ricsdl-package/examples/sync.py b/ricsdl-package/examples/sync.py index c75dfb6..24c8fe8 100644 --- a/ricsdl-package/examples/sync.py +++ b/ricsdl-package/examples/sync.py @@ -132,13 +132,14 @@ assert my_ret_dict == {} # Finds keys under given namespace that are matching to given key prefix 'my_k'. _try_func_return(lambda: mysdl.set(MY_NS, {'my_key': b'my_value'})) -ret_keys = _try_func_return(lambda: mysdl.find_keys(MY_NS, '')) +ret_keys = _try_func_return(lambda: mysdl.find_keys(MY_NS, 'my_k*')) assert ret_keys == ['my_key'] -# Finds keys and their values under given namespace that are matching to given key prefix 'my_k'. +# Finds keys and their values under given namespace that are matching to given key search +# pattern 'my_k*'. # Note that the type of returned value is bytes. -ret_key_values = _try_func_return(lambda: mysdl.find_and_get(MY_NS, '', atomic=True)) +ret_key_values = _try_func_return(lambda: mysdl.find_and_get(MY_NS, 'my_k*')) assert ret_key_values == {'my_key': b'my_value'} _try_func_return(lambda: mysdl.remove_all(MY_NS))