From df9fd615a75719134b1061ed5477bf16f4bdf32e Mon Sep 17 00:00:00 2001 From: lloretgalleg Date: Tue, 1 Dec 2020 12:51:52 +0000 Subject: [PATCH] Fixed scale validation for sol006 Change-Id: Iaee84eb1fcebd797abdaa76b248c167c4936692a Signed-off-by: lloretgalleg --- osm_nbi/instance_topics.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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): -- 2.25.1