+ "required": ["port"],
+}
+
+# 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#",
+ "type": "object",
+ "patternProperties": {".": {"oneOf": [name_schema, null_schema]}},
+ "minProperties": 1,
+ "additionalProperties": False,
+}
+k8scluster_new_schema = {
+ "title": "k8scluster 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,
+ "description": description_schema,
+ "credentials": object_schema,
+ "vim_account": id_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,
+ },
+ "required": ["name", "credentials", "vim_account", "k8s_version", "nets"],
+ "additionalProperties": False,
+}
+k8scluster_edit_schema = {
+ "title": "vim_account edit input schema",
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "type": "object",
+ "properties": {
+ "name": name_schema,
+ "description": description_schema,
+ "credentials": object_schema,
+ "vim_account": id_schema,
+ "vca_id": id_schema,
+ "k8s_version": string_schema,
+ "nets": k8scluster_nets_schema,
+ "namespace": name_schema,
+ "cni": nameshort_list_schema,
+ },
+ "additionalProperties": False,
+}
+
+# VCA
+vca_new_schema = {
+ "title": "vca 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,
+ "description": description_schema,
+ "endpoints": description_list_schema,
+ "user": string_schema,
+ "secret": passwd_schema,
+ "cacert": long_description_schema,
+ "lxd-cloud": shortname_schema,
+ "lxd-credentials": shortname_schema,
+ "k8s-cloud": shortname_schema,
+ "k8s-credentials": shortname_schema,
+ "model-config": object_schema,
+ },
+ "required": [
+ "name",
+ "endpoints",
+ "user",
+ "secret",
+ "cacert",
+ "lxd-cloud",
+ "lxd-credentials",
+ "k8s-cloud",
+ "k8s-credentials",
+ ],
+ "additionalProperties": False,
+}
+vca_edit_schema = {
+ "title": "vca creation input schema",
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "type": "object",
+ "properties": {
+ "name": name_schema,
+ "description": description_schema,
+ "endpoints": description_list_schema,
+ "port": integer1_schema,
+ "user": string_schema,
+ "secret": passwd_schema,
+ "cacert": long_description_schema,
+ "lxd-cloud": shortname_schema,
+ "lxd-credentials": shortname_schema,
+ "k8s-cloud": shortname_schema,
+ "k8s-credentials": shortname_schema,
+ "model-config": object_schema,
+ },
+ "additionalProperties": False,
+}
+
+# K8s Repos
+k8srepo_types = {"enum": ["helm-chart", "juju-bundle"]}
+k8srepo_properties = {
+ "name": name_schema,
+ "description": description_schema,
+ "type": k8srepo_types,
+ "url": description_schema,
+}
+k8srepo_new_schema = {
+ "title": "k8scluster creation input schema",
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "type": "object",
+ "properties": k8srepo_properties,
+ "required": ["name", "type", "url"],
+ "additionalProperties": False,
+}
+k8srepo_edit_schema = {
+ "title": "vim_account edit input schema",
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "type": "object",
+ "properties": k8srepo_properties,
+ "additionalProperties": False,
+}
+
+# OSM Repos
+osmrepo_types = {"enum": ["osm"]}
+osmrepo_properties = {
+ "name": name_schema,
+ "description": description_schema,
+ "type": osmrepo_types,
+ "url": description_schema
+ # "user": string_schema,
+ # "password": passwd_schema
+}
+osmrepo_new_schema = {
+ "title": "osm repo creation input schema",
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "type": "object",
+ "properties": osmrepo_properties,
+ "required": ["name", "type", "url"],
+ "additionalProperties": False,
+}
+osmrepo_edit_schema = {
+ "title": "osm repo edit input schema",
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "type": "object",
+ "properties": osmrepo_properties,
+ "additionalProperties": False,