System tests fix for openstack. Flavor and Network related system tests are fixed...
[osm/RO.git] / osm_ro / openmano_schemas.py
index fe59572..4238237 100644 (file)
@@ -1,7 +1,7 @@
 # -*- coding: utf-8 -*-
 
 ##
-# Copyright 2015 Telefónica Investigación y Desarrollo, S.A.U.
+# Copyright 2015 Telefonica Investigacion y Desarrollo, S.A.U.
 # This file is part of openmano
 # All Rights Reserved.
 #
@@ -37,7 +37,8 @@ description_schema={"type" : ["string","null"], "maxLength":255, "pattern" : "^[
 id_schema_fake = {"type" : "string", "minLength":2, "maxLength":36 }  #"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
 id_schema = {"type" : "string", "pattern": "^[a-fA-F0-9]{8}(-[a-fA-F0-9]{4}){3}-[a-fA-F0-9]{12}$"}
 pci_schema={"type":"string", "pattern":"^[0-9a-fA-F]{4}(:[0-9a-fA-F]{2}){2}\.[0-9a-fA-F]$"}
-pci_extended_schema = {"type": "string", "pattern": "^[0-9a-fA-F.:-\[\]]$"}
+# allows [] for wildcards. For that reason huge length limit is set
+pci_extended_schema = {"type": "string", "pattern": "^[0-9a-fA-F.:-\[\]]{12,40}$"}
 
 http_schema={"type":"string", "pattern":"^https?://[^'\"=]+$"}
 bandwidth_schema={"type":"string", "pattern" : "^[0-9]+ *([MG]bps)?$"}
@@ -285,15 +286,17 @@ datacenter_associate_schema={
     "type":"object",
     "properties":{
         "datacenter":{
-            "type":"object",
-            "properties":{
+            "type": "object",
+            "properties": {
+                "name": name_schema,
+                "vim_id": id_schema,
                 "vim_tenant": name_schema,
                 "vim_tenant_name": name_schema,
                 "vim_username": nameshort_schema,
                 "vim_password": nameshort_schema,
                 "config": {"type": "object"}
             },
-#            "required": ["vim_tenant"],
+            # "required": ["vim_tenant"],
             "additionalProperties": True
         }
     },
@@ -1077,9 +1080,6 @@ instance_scenario_create_schema_v01 = {
                                         }
                                     }
                                 },
-                                
-
-
                             }
                         }
                     },