Addition of PaaS
Add "paas" topic and operations
Change-Id: Ib3d274d406e42025b4d1f52bf733d7c112e6116c
Signed-off-by: Patricia Reinoso <patricia.reinoso@canonical.com>
diff --git a/osm_nbi/validation.py b/osm_nbi/validation.py
index a17e241..32a2d3e 100644
--- a/osm_nbi/validation.py
+++ b/osm_nbi/validation.py
@@ -449,7 +449,12 @@
"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 @@
},
"required": ["vdu_id", "count-index"],
"additionalProperties": False,
- }
+ },
},
"required": ["vnfInstanceId", "changeStateTo"],
- }
+ },
},
"required": ["updateType"],
"additionalProperties": False,
@@ -556,16 +561,16 @@
"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 = {
@@ -633,13 +638,13 @@
"virtualMemory": integer1_schema,
"sizeOfStorage": integer0_schema,
"numVirtualCpu": integer1_schema,
- },
- }
+ },
},
+ },
"required": ["vnfInstanceId", "additionalParams"],
"additionalProperties": False,
- }
},
+ },
"required": ["lcmOperationType", "verticalScale", "nsInstanceId"],
"additionalProperties": False,
}
@@ -926,6 +931,48 @@
"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 = {
@@ -1126,6 +1173,7 @@
"sdn_controllers",
"k8sclusters",
"vca",
+ "paas",
"k8srepos",
"osmrepos",
"ns_subscriptions",
@@ -1436,32 +1484,46 @@
"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",
@@ -1470,9 +1532,9 @@
"properties": {
"filter": vnflcmsub_schema,
"CallbackUri": description_schema,
- "authentication": authentication_schema
+ "authentication": authentication_schema,
},
- "required": ["filter", "CallbackUri"]
+ "required": ["filter", "CallbackUri"],
}