bug 650 adding WIM account instantiation parameter.
[osm/NBI.git] / osm_nbi / validation.py
index 0ec8304..1dd70dc 100644 (file)
@@ -224,9 +224,10 @@ ns_instantiate = {
         "nsInstanceId": id_schema,
         "netsliceInstanceId": id_schema,
         "nsName": name_schema,
-        "nsDescription": {"oneOf": [description_schema, {"type": "null"}]},
+        "nsDescription": {"oneOf": [description_schema, null_schema]},
         "nsdId": id_schema,
         "vimAccountId": id_schema,
+        "wimAccountId": {"OneOf": [id_schema, bool_schema, null_schema]},
         "additionalParamsForNs": object_schema,
         "additionalParamsForVnf": additional_params_for_vnf,
         "ssh_keys": {"type": "array", "items": {"type": "string"}},
@@ -265,6 +266,7 @@ ns_instantiate = {
                     "name": string_schema,
                     "vim-network-name": {"OneOf": [string_schema, object_schema]},
                     "vim-network-id": {"OneOf": [string_schema, object_schema]},
+                    "wimAccountId": {"OneOf": [id_schema, bool_schema, null_schema]},
                     "ip-profile": object_schema,
                     "vnfd-connection-point-ref": {
                         "type": "array",
@@ -302,6 +304,7 @@ ns_action = {   # TODO for the moment it is only contemplated the vnfd primitive
         "member_vnf_index": name_schema,
         "vnf_member_index": name_schema,  # TODO for backward compatibility. To remove in future
         "vdu_id": name_schema,
+        "vdu_count_index": integer0_schema,
         "primitive": name_schema,
         "primitive_params": {"type": "object"},
     },
@@ -420,7 +423,12 @@ wim_account_new_schema = {
         "wim_url": description_schema,
         "user": shortname_schema,
         "password": passwd_schema,
-        "config": {"type": "object"}
+        "config": {
+            "type": "object",
+            "patternProperties": {
+                ".": {"not": {"type": "null"}}
+            }
+        }
     },
     "required": ["name", "wim_url", "wim_type"],
     "additionalProperties": False
@@ -673,7 +681,7 @@ nsi_instantiate = {
         "lcmOperationType": string_schema,
         "nsiInstanceId": id_schema,
         "nsiName": name_schema,
-        "nsiDescription": {"oneOf": [description_schema, {"type": "null"}]},
+        "nsiDescription": {"oneOf": [description_schema, null_schema]},
         "nstId": string_schema,
         "vimAccountId": id_schema,
         "ssh_keys": {"type": "string"},