Feature 10904: Make all deployment methods optional for K8s cluster 75/11775/3
authorGabriel Cuba <gcuba@whitestack.com>
Tue, 22 Mar 2022 19:01:26 +0000 (14:01 -0500)
committergarciadeblas <gerardo.garciadeblas@telefonica.com>
Fri, 27 May 2022 10:09:21 +0000 (12:09 +0200)
Change-Id: Ie299c87b647a25d838e698da841cc27e5bb478e2
Signed-off-by: Gabriel Cuba <gcuba@whitestack.com>
osm_nbi/validation.py

index 3fec364..ae9644c 100644 (file)
@@ -718,6 +718,18 @@ sdn_external_port_schema = {
 }
 
 # K8s Clusters
+k8scluster_deploy_method_schema = {
+    "$schema": "http://json-schema.org/draft-04/schema#",
+    "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,
+}
 k8scluster_nets_schema = {
     "title": "k8scluster nets input schema",
     "$schema": "http://json-schema.org/draft-04/schema#",
@@ -740,6 +752,7 @@ k8scluster_new_schema = {
         "vca_id": id_schema,
         "k8s_version": string_schema,
         "nets": k8scluster_nets_schema,
+        "deployment_methods": k8scluster_deploy_method_schema,
         "namespace": name_schema,
         "cni": nameshort_list_schema,
     },