X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=osm_nbi%2Fvalidation.py;h=32a2d3e9d26d493f75609806c1a4df4e2a8924b7;hb=refs%2Fchanges%2F19%2F12619%2F1;hp=6ed6fbab3fd909cc208628d36f2b783ed02ea8f0;hpb=519da48b76e8996450d58debecf5fdde7daa5b5e;p=osm%2FNBI.git diff --git a/osm_nbi/validation.py b/osm_nbi/validation.py index 6ed6fba..32a2d3e 100644 --- a/osm_nbi/validation.py +++ b/osm_nbi/validation.py @@ -449,7 +449,12 @@ ns_update = { "nsInstanceId": id_schema, "timeout_ns_update": integer1_schema, "updateType": { - "enum": ["CHANGE_VNFPKG", "REMOVE_VNF", "MODIFY_VNF_INFORMATION", "OPERATE_VNF"] + "enum": [ + "CHANGE_VNFPKG", + "REMOVE_VNF", + "MODIFY_VNF_INFORMATION", + "OPERATE_VNF", + ] }, "modifyVnfInfoData": { "type": "object", @@ -482,10 +487,10 @@ ns_update = { }, "required": ["vdu_id", "count-index"], "additionalProperties": False, - } + }, }, "required": ["vnfInstanceId", "changeStateTo"], - } + }, }, "required": ["updateType"], "additionalProperties": False, @@ -556,16 +561,16 @@ ns_migrate = { "migrateToHost": string_schema, "vdu": { "type": "object", - "properties": { - "vduId": name_schema, - "vduCountIndex": integer0_schema, - }, - "required": ["vduId"], - "additionalProperties": False, + "properties": { + "vduId": name_schema, + "vduCountIndex": integer0_schema, + }, + "required": ["vduId"], + "additionalProperties": False, }, }, "required": ["vnfInstanceId"], - "additionalProperties": False + "additionalProperties": False, } ns_heal = { @@ -619,21 +624,29 @@ ns_verticalscale = { "type": "object", "properties": { "lcmOperationType": string_schema, + "verticalScale": string_schema, "nsInstanceId": id_schema, - "vnfInstanceId": id_schema, - "migrateToHost": string_schema, - "vdu": { + "changeVnfFlavorData": { "type": "object", - "properties": { - "vduId": name_schema, - "vduCountIndex": integer0_schema, + "properties": { + "vnfInstanceId": id_schema, + "additionalParams": { + "type": "object", + "properties": { + "vduid": string_schema, + "vduCountIndex": integer0_schema, + "virtualMemory": integer1_schema, + "sizeOfStorage": integer0_schema, + "numVirtualCpu": integer1_schema, + }, }, - "required": ["vduId"], - "additionalProperties": False, + }, + "required": ["vnfInstanceId", "additionalParams"], + "additionalProperties": False, }, }, - "required": ["vnfInstanceId"], - "additionalProperties": False + "required": ["lcmOperationType", "verticalScale", "nsInstanceId"], + "additionalProperties": False, } schema_version = {"type": "string", "enum": ["1.0"]} @@ -918,6 +931,48 @@ vca_edit_schema = { "additionalProperties": False, } +# PAAS +paas_types = {"enum": ["juju"]} +paas_new_schema = { + "title": "paas creation input schema", + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + "properties": { + "schema_version": schema_version, + "schema_type": schema_type, + "name": name_schema, + "paas_type": paas_types, + "description": description_schema, + "endpoints": description_list_schema, + "user": string_schema, + "secret": passwd_schema, + "config": object_schema, + }, + "required": [ + "name", + "paas_type", + "endpoints", + "user", + "secret", + ], + "additionalProperties": False, +} +paas_edit_schema = { + "title": "paas edition input schema", + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + "properties": { + "name": name_schema, + "paas_type": paas_types, + "description": description_schema, + "endpoints": description_list_schema, + "user": string_schema, + "secret": passwd_schema, + "config": object_schema, + }, + "additionalProperties": False, +} + # K8s Repos k8srepo_types = {"enum": ["helm-chart", "juju-bundle"]} k8srepo_properties = { @@ -1118,6 +1173,7 @@ topics_with_quota = [ "sdn_controllers", "k8sclusters", "vca", + "paas", "k8srepos", "osmrepos", "ns_subscriptions", @@ -1428,32 +1484,46 @@ vnflcmsub_schema = { "enum": [ "VnfIdentifierCreationNotification", "VnfLcmOperationOccurrenceNotification", - "VnfIdentifierDeletionNotification" - ] - } + "VnfIdentifierDeletionNotification", + ] + }, }, "operationTypes": { "type": "array", "items": { "enum": [ - "INSTANTIATE", "SCALE", "SCALE_TO_LEVEL", "CHANGE_FLAVOUR", "TERMINATE", - "HEAL", "OPERATE", "CHANGE_EXT_CONN", "MODIFY_INFO", "CREATE_SNAPSHOT", - "REVERT_TO_SNAPSHOT", "CHANGE_VNFPKG" - ] - } + "INSTANTIATE", + "SCALE", + "SCALE_TO_LEVEL", + "CHANGE_FLAVOUR", + "TERMINATE", + "HEAL", + "OPERATE", + "CHANGE_EXT_CONN", + "MODIFY_INFO", + "CREATE_SNAPSHOT", + "REVERT_TO_SNAPSHOT", + "CHANGE_VNFPKG", + ] + }, }, "operationStates": { "type": "array", "items": { "enum": [ - "STARTING", "PROCESSING", "COMPLETED", "FAILED_TEMP", "FAILED", - "ROLLING_BACK", "ROLLED_BACK" - ] - } - } + "STARTING", + "PROCESSING", + "COMPLETED", + "FAILED_TEMP", + "FAILED", + "ROLLING_BACK", + "ROLLED_BACK", + ] + }, + }, }, - "required": ["VnfInstanceSubscriptionFilter", "notificationTypes"] - } + "required": ["VnfInstanceSubscriptionFilter", "notificationTypes"], +} vnf_subscription = { "title": "vnf subscription input schema", @@ -1462,9 +1532,9 @@ vnf_subscription = { "properties": { "filter": vnflcmsub_schema, "CallbackUri": description_schema, - "authentication": authentication_schema + "authentication": authentication_schema, }, - "required": ["filter", "CallbackUri"] + "required": ["filter", "CallbackUri"], }