Update cluster configuration to support feature 11055
Change-Id: Ide21bc1d4ce6bdb54b8c82ab3cc456e4ba8bb39f
Signed-off-by: rshri <shrinithi.r@tataelxsi.co.in>
diff --git a/osm_nbi/validation.py b/osm_nbi/validation.py
index 95556ff..1df72b4 100644
--- a/osm_nbi/validation.py
+++ b/osm_nbi/validation.py
@@ -1093,8 +1093,8 @@
}
clustercreation_new_schema = {
+ "$schema": "http://json-schema.org/draft-07/schema#",
"title": "cluster creation operation input schema",
- "$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"name": name_schema,
@@ -1105,26 +1105,32 @@
"description": description_schema,
"region_name": string_schema,
"resource_group": string_schema,
- "infra_controller_profiles": shortname_schema,
- "infra_config_profiles": shortname_schema,
- "resource_profiles": shortname_schema,
- "app_profiles": shortname_schema,
- "created": string_schema,
- "state": string_schema,
- "operatingState": string_schema,
- "git_name": string_schema,
- "resourceState": string_schema,
"bootstrap": bool_schema,
+ # "vim_type": string_schema,
+ "private_subnet": { # Subnets validation
+ "type": "array",
+ "items": { # Each item in the array must be a string (subnet ID)
+ "type": "string",
+ "pattern": "^subnet-[a-f0-9]+$", # Optional: Add a regex pattern for basic subnet ID format
+ },
+ # "minItems": 2, # Minimum 2 subnets
+ "uniqueItems": True, # Subnet IDs must be unique
+ },
+ "public_subnet": { # Subnets validation
+ "type": "array",
+ "items": { # Each item in the array must be a string (subnet ID)
+ "type": "string",
+ "pattern": "^subnet-[a-f0-9]+$", # Optional: Add a regex pattern for basic subnet ID format
+ },
+ # "minItems": 2, # Minimum 2 subnets
+ "uniqueItems": True, # Subnet IDs must be unique
+ },
+ "iam_role": string_schema,
},
- "required": [
- "name",
- "vim_account",
- "k8s_version",
- "node_size",
- "node_count",
- ],
+ "required": ["vim_account", "name", "k8s_version"],
"additionalProperties": False,
}
+
clusterregistration_new_schema = {
"title": "cluster registration input schema",
"$schema": "http://json-schema.org/draft-04/schema#",