"pattern": "^[^,;()\\.\\$'\"]+$",
}
passwd_schema = {"type": "string", "minLength": 1, "maxLength": 60}
+user_passwd_schema = {
+ "type": "string",
+ "pattern": "^.*(?=.{8,})((?=.*[!@#$%^&*()\\-_=+{};:,<.>]){1})(?=.*\\d)((?=.*[a-z]){1})((?=.*[A-Z]){1}).*$",
+}
name_schema = {
"type": "string",
"minLength": 1,
}
ipv6_schema = {
"type": "string",
- "pattern": "(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))",
+ "pattern": "(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))", # noqa: W605
}
ip_prefix_schema = {
"type": "string",
"type": "object",
"properties": {
"id": name_schema,
+ "vim-flavor-id": name_schema,
"volume": {
"type": "array",
"minItems": 1,
}
ip_profile_schema = {
- "title": "ip profile validation schema",
- "$schema": "http://json-schema.org/draft-04/schema#",
- "type": "object",
- "properties": {
- "ip-version": {"enum": ["ipv4", "ipv6"]},
- "subnet-address": ip_prefix_schema,
- "gateway-address": ip_schema,
- "dns-server": ip_profile_dns_schema,
- "dhcp-params": ip_profile_dhcp_schema,
- },
-}
-
-ip_profile_update_schema = {
"title": "ip profile validation schema",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"name": name_schema,
"vim-network-name": name_schema,
"vim-network-id": name_schema,
- "ip-profile": ip_profile_update_schema,
+ "ip-profile": ip_profile_schema,
"provider-network": provider_network_schema,
"internal-connection-point": {
"type": "array",
"vim-network-id": {"oneOf": [string_schema, object_schema]},
"ns-net": object_schema,
"wimAccountId": {"oneOf": [id_schema, bool_schema, null_schema]},
- "ip-profile": object_schema,
+ "ip-profile": ip_profile_schema,
"provider-network": provider_network_schema,
"vnfd-connection-point-ref": {
"type": "array",
"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",
},
"required": ["vdu_id", "count-index"],
"additionalProperties": False,
- }
+ },
},
"required": ["vnfInstanceId", "changeStateTo"],
- }
+ },
},
"required": ["updateType"],
"additionalProperties": False,
"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 = {
"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,
+}
+
+nslcmop_cancel = {
+ "title": "Cancel nslcmop input schema",
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "type": "object",
+ "properties": {
+ "nsLcmOpOccId": id_schema,
+ "cancelMode": {
+ "enum": [
+ "GRACEFUL",
+ "FORCEFUL",
+ ]
+ },
+ },
+ "required": ["cancelMode"],
+ "additionalProperties": False,
}
schema_version = {"type": "string", "enum": ["1.0"]}
"title": "Deployment methods for K8s cluster",
"type": "object",
"properties": {
- "helm-chart": {"type": "boolean"},
"juju-bundle": {"type": "boolean"},
"helm-chart-v3": {"type": "boolean"},
},
"additionalProperties": False,
- "minProperties": 3,
+ "minProperties": 2,
}
k8scluster_nets_schema = {
"title": "k8scluster nets input schema",
"description": description_schema,
"type": k8srepo_types,
"url": description_schema,
+ "cacert": long_description_schema,
+ "user": string_schema,
+ "password": passwd_schema,
+ "oci": bool_schema,
}
k8srepo_new_schema = {
"title": "k8scluster creation input schema",
"properties": {
"username": string_schema,
"domain_name": shortname_schema,
- "password": passwd_schema,
+ "password": user_passwd_schema,
"projects": nameshort_list_schema,
"project_role_mappings": project_role_mappings,
},
"title": "User edit schema for administrators",
"type": "object",
"properties": {
- "password": passwd_schema,
+ "password": user_passwd_schema,
"old_password": passwd_schema,
"username": string_schema, # To allow User Name modification
"projects": {"oneOf": [nameshort_list_schema, array_edition_schema]},
"project_role_mappings": project_role_mappings,
"add_project_role_mappings": project_role_mappings,
"remove_project_role_mappings": project_role_mappings_optional,
+ "system_admin_id": id_schema,
+ "unlock": bool_schema,
+ "renew": bool_schema,
},
"minProperties": 1,
"additionalProperties": False,
"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",
"properties": {
"filter": vnflcmsub_schema,
"CallbackUri": description_schema,
- "authentication": authentication_schema
+ "authentication": authentication_schema,
},
- "required": ["filter", "CallbackUri"]
+ "required": ["filter", "CallbackUri"],
}