diff options
Diffstat (limited to 'onap-client')
-rw-r--r-- | onap-client/onap_client/sdc/vnf.py | 9 | ||||
-rw-r--r-- | onap-client/setup.py | 2 |
2 files changed, 8 insertions, 3 deletions
diff --git a/onap-client/onap_client/sdc/vnf.py b/onap-client/onap_client/sdc/vnf.py index 5fa401c..d07882c 100644 --- a/onap-client/onap_client/sdc/vnf.py +++ b/onap-client/onap_client/sdc/vnf.py @@ -299,13 +299,18 @@ class VNF(Resource): def policy_exists(self, policy_name): """Checking the tosca model for a VF to see if a resource - has already been added""" + has already been added + + The policy name in the tosca model is all lowercase, + and if there are dashes in the VNF name they are + removed in the policy name. + """ policies = self.tosca.get("policies", {}) for p_name, policy in policies.items(): tosca_policy_name = policy.get("name").lower() - if tosca_policy_name.find("{}..{}".format(self.vnf_name.lower(), policy_name.lower())) != -1: + if tosca_policy_name.find("{}..{}".format(self.vnf_name.lower().replace("-", ""), policy_name.lower())) != -1: return True return False diff --git a/onap-client/setup.py b/onap-client/setup.py index 2624f9b..ea37a9e 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.4.0", + version="0.4.1", author="Steven Stark", author_email="steven.stark@att.com", description="Python API wrapper for ONAP applications", |