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)?$"}
}
instance_scenario_create_schema_v01 = {
- "title":"instance scenario create information schema v0.1",
+ "title": "instance scenario create information schema v0.1",
"$schema": "http://json-schema.org/draft-04/schema#",
- "type":"object",
- "properties":{
+ "type": "object",
+ "properties": {
"schema_version": {"type": "string", "enum": ["0.1"]},
- "instance":{
- "type":"object",
- "properties":{
- "name":name_schema,
+ "instance": {
+ "type": "object",
+ "properties": {
+ "mgmt_keys": {"type": "array", "items": {"type":"string"}},
+ "vduImage": name_schema,
+ "name": name_schema,
"description":description_schema,
"datacenter": name_schema,
"scenario" : name_schema, #can be an UUID or name
".": {
"type": "object",
"properties": {
- "name": name_schema, # overrides vdu name schema
+ "name": name_schema, # overrides vdu name schema
+ "mgmt_keys": {"type": "array", "items": {"type": "string"}},
+ "vduImage": name_schema,
"devices": {
"type": "object",
"patternProperties": {