From a30391b7b8d4085f77e9a8b46348c252e92113d1 Mon Sep 17 00:00:00 2001 From: Rahul Kumar Date: Fri, 24 May 2024 14:40:23 +0530 Subject: [PATCH] Feature 11038: Enhancement of Vertical Scale Feature and merge in update API Change-Id: I5b77272ef1c5c66c131efc8a442a0d995af45df4 Signed-off-by: Rahul Kumar --- osm_nbi/instance_topics.py | 2 -- osm_nbi/nbi.py | 4 ---- osm_nbi/validation.py | 42 ++++++++++---------------------------- 3 files changed, 11 insertions(+), 37 deletions(-) diff --git a/osm_nbi/instance_topics.py b/osm_nbi/instance_topics.py index 122ea5f..0e4d9ba 100644 --- a/osm_nbi/instance_topics.py +++ b/osm_nbi/instance_topics.py @@ -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, } diff --git a/osm_nbi/nbi.py b/osm_nbi/nbi.py index 317ea8a..e4b7368 100644 --- a/osm_nbi/nbi.py +++ b/osm_nbi/nbi.py @@ -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": { diff --git a/osm_nbi/validation.py b/osm_nbi/validation.py index 620272f..5d74333 100644 --- a/osm_nbi/validation.py +++ b/osm_nbi/validation.py @@ -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#", -- 2.25.1