Allow logging at file. Check member-vnf-index at ns action
[osm/NBI.git] / osm_nbi / validation.py
index c1141f1..70003a9 100644 (file)
@@ -55,11 +55,12 @@ ns_action = {   # TODO for the moment it is only contemplated the vnfd primitive
     "$schema": "http://json-schema.org/draft-04/schema#",
     "type": "object",
     "properties": {
-        "vnf_member_index": name_schema,
+        "member_vnf_index": name_schema,
+        "vnf_member_index": name_schema,  # TODO for backward compatibility. To remove in future
         "primitive": name_schema,
         "primitive_params": {"type": "object"},
     },
-    "required": ["vnf_member_index", "primitive", "primitive_params"],
+    "required": ["primitive", "primitive_params"],   # TODO add member_vnf_index
     "additionalProperties": False
 }
 
@@ -114,6 +115,7 @@ vim_account_new_schema = {
 
 sdn_properties = {
     "name": name_schema,
+    "description": description_schema,
     "dpid": {"type": "string", "pattern": "^[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){7}$"},
     "ip": ip_schema,
     "port": port_schema,
@@ -135,7 +137,7 @@ sdn_edit_schema = {
     "$schema": "http://json-schema.org/draft-04/schema#",
     "type": "object",
     "properties": sdn_properties,
-    "required": ["name", "port", 'ip', 'dpid', 'type'],
+    "required": ["name", "port", 'ip', 'dpid', 'type'],
     "additionalProperties": False
 }
 sdn_port_mapping_schema = {