From: Austin Cormier Date: Thu, 28 Jul 2016 16:02:24 +0000 (-0400) Subject: Bug 31 - Fix too many values to unpack (expected 2) issue when spaces exist in openma... X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2Fmaster;p=osm%2Friftware.git Bug 31 - Fix too many values to unpack (expected 2) issue when spaces exist in openmano vnf/ns names --- diff --git a/modules/core/mano/models/openmano/python/rift/openmano/openmano_client.py b/modules/core/mano/models/openmano/python/rift/openmano/openmano_client.py index a5ddb37..ec9f2ed 100755 --- a/modules/core/mano/models/openmano/python/rift/openmano/openmano_client.py +++ b/modules/core/mano/models/openmano/python/rift/openmano/openmano_client.py @@ -73,7 +73,7 @@ class OpenmanoHttpAPI(object): class OpenmanoCliAPI(object): """ This class implements the necessary funtionality to interact with """ - CMD_TIMEOUT = 15 + CMD_TIMEOUT = 30 def __init__(self, log, host, port, tenant): self._log = log @@ -157,7 +157,7 @@ class OpenmanoCliAPI(object): raise vnf_info_line = output_lines[0] - vnf_id, vnf_name = vnf_info_line.split() + vnf_id, vnf_name = vnf_info_line.split(" ", 1) self._log.info("VNF %s Created: %s", vnf_name, vnf_id) @@ -182,7 +182,7 @@ class OpenmanoCliAPI(object): name_uuid_map = {} for line in output_lines: line = line.strip() - uuid, name = line.split() + uuid, name = line.split(" ", 1) name_uuid_map[name] = uuid return name_uuid_map @@ -204,7 +204,7 @@ class OpenmanoCliAPI(object): ) ns_info_line = output_lines[0] - ns_id, ns_name = ns_info_line.split() + ns_id, ns_name = ns_info_line.split(" ", 1) self._log.info("NS %s Created: %s", ns_name, ns_id) @@ -225,7 +225,7 @@ class OpenmanoCliAPI(object): name_uuid_map = {} for line in output_lines: line = line.strip() - uuid, name = line.split() + uuid, name = line.split(" ", 1) name_uuid_map[name] = uuid return name_uuid_map @@ -258,7 +258,7 @@ class OpenmanoCliAPI(object): name_uuid_map = {} for line in output_lines: line = line.strip() - uuid, name = line.split() + uuid, name = line.split(" ", 1) name_uuid_map[name] = uuid return name_uuid_map @@ -280,7 +280,7 @@ class OpenmanoCliAPI(object): expected_lines=4 ) - uuid, _ = output_lines[0].split() + uuid, _ = output_lines[0].split(" ", 1) self._log.info("NS Instance Created: %s", uuid)