Added KDU inspect/readme actions to NsLcmOpTopic 52/8252/3
authordelacruzramo <pedro.delacruzramos@altran.com>
Thu, 28 Nov 2019 10:24:09 +0000 (11:24 +0100)
committerdelacruzramo <pedro.delacruzramos@altran.com>
Fri, 29 Nov 2019 13:39:41 +0000 (14:39 +0100)
Change-Id: I9ee6b50639d9d8719238b25c76ff8fb881dd0326
Signed-off-by: delacruzramo <pedro.delacruzramos@altran.com>
osm_nbi/instance_topics.py

index 0303d54..1b464ee 100644 (file)
@@ -592,8 +592,11 @@ class NsLcmOpTopic(BaseTopic):
                 descriptor_configuration = nsd.get("ns-configuration", {}).get("config-primitive")
 
             # For k8s allows default primitives without validating the parameters
-            if indata.get("kdu_name") and indata["primitive"] in ("upgrade", "rollback", "status"):
+            if indata.get("kdu_name") and indata["primitive"] in ("upgrade", "rollback", "status", "inspect", "readme"):
                 # TODO should be checked that rollback only can contains revsision_numbe????
+                if not indata.get("member_vnf_index"):
+                    raise EngineException("Missing action parameter 'member_vnf_index' for default KDU primitive '{}'"
+                                          .format(indata["primitive"]))
                 return
             # if not, check primitive
             for config_primitive in get_iterable(descriptor_configuration):