diff options
Diffstat (limited to 'onap-client')
-rw-r--r-- | onap-client/onap_client/sdc/tests/test_vnf.py | 2 | ||||
-rw-r--r-- | onap-client/onap_client/sdc/vnf.py | 9 | ||||
-rw-r--r-- | onap-client/setup.py | 2 |
3 files changed, 7 insertions, 6 deletions
diff --git a/onap-client/onap_client/sdc/tests/test_vnf.py b/onap-client/onap_client/sdc/tests/test_vnf.py index f72043e..dfa5af1 100644 --- a/onap-client/onap_client/sdc/tests/test_vnf.py +++ b/onap-client/onap_client/sdc/tests/test_vnf.py @@ -195,4 +195,4 @@ def test_network_role_property_for_instance(): prop = network_role_property_for_instance("oam", vnf_model, "item1id") - assert prop == "item1id.port123.oam.network_role" + assert "item1id.port123.oam.network_role" in prop diff --git a/onap-client/onap_client/sdc/vnf.py b/onap-client/onap_client/sdc/vnf.py index 80852a1..f1ccb51 100644 --- a/onap-client/onap_client/sdc/vnf.py +++ b/onap-client/onap_client/sdc/vnf.py @@ -273,10 +273,10 @@ class VNF(Resource): nrt = network_role.get("network_role_tag") nr = network_role.get("network_role") related_networks = network_role.get("related_networks") - instance_property = network_role_property_for_instance( + instance_properties = network_role_property_for_instance( nrt, model, instance_id ) - if instance_property: + for instance_property in instance_properties: self.add_instance_property(instance_id, instance_property, nr) if related_networks: property_val = [ @@ -602,15 +602,16 @@ def network_role_property_for_instance(network_role_tag, vnf_model, instance_id) :return: network_role property ID or None """ + properties = [] instance_inputs = vnf_model.get("componentInstancesInputs", {}).get(instance_id, {}) for prop in instance_inputs: if prop.get("name").endswith( "network_role_tag" ) and network_role_tag == prop.get("value"): network_role_property = prop.get("name").replace("_tag", "") - return network_role_property + properties.append(network_role_property) - return None + return properties def add_resource(parent_resource_id, catalog_resource_id, catalog_resource_name, origin_type="VF"): diff --git a/onap-client/setup.py b/onap-client/setup.py index 8e4d9aa..c8f0fd9 100644 --- a/onap-client/setup.py +++ b/onap-client/setup.py @@ -47,7 +47,7 @@ for file in os.listdir("etc/payloads"): setuptools.setup( name="onap-client", - version="0.6.3", + version="0.6.4", author="Steven Stark", author_email="steven.stark@att.com", description="Python API wrapper for ONAP applications", |