Feature 11038: Enhancement of Vertical Scale Feature and merge in update API 88/14388/3
authorRahul Kumar <rahul.k4@tataelxsi.co.in>
Fri, 24 May 2024 09:10:23 +0000 (14:40 +0530)
committergarciadeblas <gerardo.garciadeblas@telefonica.com>
Tue, 9 Jul 2024 15:09:39 +0000 (17:09 +0200)
Change-Id: I5b77272ef1c5c66c131efc8a442a0d995af45df4
Signed-off-by: Rahul Kumar <rahul.k4@tataelxsi.co.in>
osm_nbi/instance_topics.py
osm_nbi/nbi.py
osm_nbi/validation.py

index 122ea5f..0e4d9ba 100644 (file)
@@ -30,7 +30,6 @@ from osm_nbi.validation import (
     ns_heal,
     nsi_instantiate,
     ns_migrate,
-    ns_verticalscale,
     nslcmop_cancel,
 )
 from osm_nbi.base_topic import (
@@ -1214,7 +1213,6 @@ class NsLcmOpTopic(BaseTopic):
         "heal": ns_heal,
         "terminate": ns_terminate,
         "migrate": ns_migrate,
-        "verticalscale": ns_verticalscale,
         "cancel": nslcmop_cancel,
     }
 
index 317ea8a..e4b7368 100644 (file)
@@ -463,10 +463,6 @@ valid_url_methods = {
                         "METHODS": ("POST",),
                         "ROLE_PERMISSION": "ns_instances:id:update:",
                     },
-                    "verticalscale": {
-                        "METHODS": ("POST",),
-                        "ROLE_PERMISSION": "ns_instances:id:verticalscale:",
-                    },
                 },
             },
             "ns_lcm_op_occs": {
index 620272f..5d74333 100644 (file)
@@ -446,6 +446,7 @@ ns_update = {
                 "REMOVE_VNF",
                 "MODIFY_VNF_INFORMATION",
                 "OPERATE_VNF",
+                "VERTICAL_SCALE",
             ]
         },
         "modifyVnfInfoData": {
@@ -483,6 +484,16 @@ ns_update = {
             },
             "required": ["vnfInstanceId", "changeStateTo"],
         },
+        "verticalScaleVnf": {
+            "type": "object",
+            "properties": {
+                "vnfInstanceId": id_schema,
+                "vnfdId": id_schema,
+                "vduId": name_schema,
+                "countIndex": integer0_schema,
+            },
+            "required": ["vnfInstanceId", "vnfdId", "vduId"],
+        },
     },
     "required": ["updateType"],
     "additionalProperties": False,
@@ -610,37 +621,6 @@ ns_heal = {
     "additionalProperties": False,
 }
 
-ns_verticalscale = {
-    "title": "vertial scale input schema",
-    "$schema": "http://json-schema.org/draft-04/schema#",
-    "type": "object",
-    "properties": {
-        "lcmOperationType": string_schema,
-        "verticalScale": string_schema,
-        "nsInstanceId": id_schema,
-        "changeVnfFlavorData": {
-            "type": "object",
-            "properties": {
-                "vnfInstanceId": id_schema,
-                "additionalParams": {
-                    "type": "object",
-                    "properties": {
-                        "vduid": string_schema,
-                        "vduCountIndex": integer0_schema,
-                        "virtualMemory": integer1_schema,
-                        "sizeOfStorage": integer0_schema,
-                        "numVirtualCpu": integer1_schema,
-                    },
-                },
-            },
-            "required": ["vnfInstanceId", "additionalParams"],
-            "additionalProperties": False,
-        },
-    },
-    "required": ["lcmOperationType", "verticalScale", "nsInstanceId"],
-    "additionalProperties": False,
-}
-
 nslcmop_cancel = {
     "title": "Cancel nslcmop input schema",
     "$schema": "http://json-schema.org/draft-04/schema#",