- return {"KV": {"Verb": verb, "Key": key, "Value": base64.b64encode(value)}}
+ return {"KV": {"Verb": verb, "Key": key, "Value": base64.b64encode(bytes(value, "utf-8")).decode("utf-8")}}
@staticmethod
def add_vnf_id(scn, vnf_type, vnf_id, dti_dict):
"""
@staticmethod
def add_vnf_id(scn, vnf_type, vnf_id, dti_dict):
"""
Treat its value as a JSON string representing a dict.
Extend the dict by adding a dti_dict for vnf_id under vnf_type.
Turn the resulting extended dict into a JSON string.
Treat its value as a JSON string representing a dict.
Extend the dict by adding a dti_dict for vnf_id under vnf_type.
Turn the resulting extended dict into a JSON string.
lc_vnf_type = vnf_type.lower()
while True: # do until update succeeds
(mod_index, v) = ConsulClient.get_value(key, get_index=True)
lc_vnf_type = vnf_type.lower()
while True: # do until update succeeds
(mod_index, v) = ConsulClient.get_value(key, get_index=True)
Treat its value as a JSON string representing a dict.
Modify the dict by deleting the vnf_id key entry from under vnf_type.
Turn the resulting extended dict into a JSON string.
Treat its value as a JSON string representing a dict.
Modify the dict by deleting the vnf_id key entry from under vnf_type.
Turn the resulting extended dict into a JSON string.
lc_vnf_type = vnf_type.lower()
while True: # do until update succeeds
(mod_index, v) = ConsulClient.get_value(key, get_index=True)
lc_vnf_type = vnf_type.lower()
while True: # do until update succeeds
(mod_index, v) = ConsulClient.get_value(key, get_index=True)