bug 710. Fix session used to delete ns, nsi when terminated
[osm/NBI.git] / osm_nbi / validation.py
index b20be4a..a6b9421 100644 (file)
@@ -381,7 +381,7 @@ vim_account_new_schema = {
         "description": description_schema,
         "vim": name_schema,
         "datacenter": name_schema,
         "description": description_schema,
         "vim": name_schema,
         "datacenter": name_schema,
-        "vim_type": {"enum": ["openstack", "openvim", "vmware", "opennebula", "aws"]},
+        "vim_type": {"enum": ["openstack", "openvim", "vmware", "opennebula", "aws", "azure"]},
         "vim_url": description_schema,
         # "vim_url_admin": description_schema,
         # "vim_tenant": name_schema,
         "vim_url": description_schema,
         # "vim_url_admin": description_schema,
         # "vim_tenant": name_schema,
@@ -421,7 +421,7 @@ wim_account_new_schema = {
         "name": name_schema,
         "description": description_schema,
         "wim": name_schema,
         "name": name_schema,
         "description": description_schema,
         "wim": name_schema,
-        "wim_type": {"enum": ["tapi", "onos", "odl", "dynpac"]},
+        "wim_type": {"enum": ["tapi", "onos", "odl", "dynpac", "fake"]},
         "wim_url": description_schema,
         "user": shortname_schema,
         "password": passwd_schema,
         "wim_url": description_schema,
         "user": shortname_schema,
         "password": passwd_schema,
@@ -648,10 +648,9 @@ roles_new_schema = {
     "type": "object",
     "properties": {
         "name": shortname_schema,
     "type": "object",
     "properties": {
         "name": shortname_schema,
-        "definition": object_schema,
     },
     "required": ["name"],
     },
     "required": ["name"],
-    "additionalProperties": False
+    "additionalProperties": True
 }
 roles_edit_schema = {
     "$schema": "http://json-schema.org/draft-04/schema#",
 }
 roles_edit_schema = {
     "$schema": "http://json-schema.org/draft-04/schema#",
@@ -660,10 +659,9 @@ roles_edit_schema = {
     "properties": {
         "_id": id_schema,
         "name": shortname_schema,
     "properties": {
         "_id": id_schema,
         "name": shortname_schema,
-        "definition": object_schema,
     },
     },
-    "required": ["_id", "name", "definition"],
-    "additionalProperties": False,
+    "required": ["_id", "name"],
+    "additionalProperties": True,
     "minProperties": 1
 }
 
     "minProperties": 1
 }