From: lloretgalleg Date: Tue, 1 Dec 2020 12:51:52 +0000 (+0000) Subject: Fixed scale validation for sol006 X-Git-Tag: release-v9.0-start~5 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=df9fd615a75719134b1061ed5477bf16f4bdf32e;p=osm%2FNBI.git Fixed scale validation for sol006 Change-Id: Iaee84eb1fcebd797abdaa76b248c167c4936692a Signed-off-by: lloretgalleg --- diff --git a/osm_nbi/instance_topics.py b/osm_nbi/instance_topics.py index 2613430..8ae3a45 100644 --- a/osm_nbi/instance_topics.py +++ b/osm_nbi/instance_topics.py @@ -738,12 +738,12 @@ class NsLcmOpTopic(BaseTopic): def _check_scale_ns_operation(self, indata, nsr): vnfd = self._get_vnfd_from_vnf_member_index(indata["scaleVnfData"]["scaleByStepData"]["member-vnf-index"], nsr["_id"]) - for scaling_group in get_iterable(vnfd.get("scaling-group-descriptor")): - if indata["scaleVnfData"]["scaleByStepData"]["scaling-group-descriptor"] == scaling_group["name"]: + for scaling_aspect in get_iterable(vnfd.get("df", ())[0]["scaling-aspect"]): + if indata["scaleVnfData"]["scaleByStepData"]["scaling-group-descriptor"] == scaling_aspect["id"]: break else: raise EngineException("Invalid scaleVnfData:scaleByStepData:scaling-group-descriptor '{}' is not " - "present at vnfd:scaling-group-descriptor" + "present at vnfd:scaling-aspect" .format(indata["scaleVnfData"]["scaleByStepData"]["scaling-group-descriptor"])) def _check_instantiate_ns_operation(self, indata, nsr, session):