X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=vim_schema.py;h=c2dc1e20fa952eaeecfec36cf38bc0f9e9af80e3;hb=refs%2Fchanges%2F17%2F1317%2F3;hp=7da3a487a9aae9ef8ec427ead84e65aeadcdd55a;hpb=9e194594e2dbc4419e13e4c89ddc0e5d639723fd;p=osm%2Fopenvim.git diff --git a/vim_schema.py b/vim_schema.py index 7da3a48..c2dc1e2 100644 --- a/vim_schema.py +++ b/vim_schema.py @@ -73,8 +73,8 @@ config_schema = { "of_controller_nets_with_same_vlan": {"type" : "boolean"}, "of_controller": nameshort_schema, #{"type":"string", "enum":["floodlight", "opendaylight"]}, "of_controller_module": {"type":"string"}, - #"of_user": nameshort_schema, - #"of_password": nameshort_schema, + "of_user": nameshort_schema, + "of_password": nameshort_schema, "test_mode": {"type": "boolean"}, #leave for backward compatibility "mode": {"type":"string", "enum":["normal", "host only", "OF only", "development", "test"] }, "development_bridge": {"type":"string"}, @@ -126,8 +126,7 @@ config_schema = { "patternProperties": { "of_*" : {"type": ["string", "integer", "boolean"]} }, - "required": ['db_host', 'db_user', 'db_passwd', 'db_name', - 'of_controller_ip', 'of_controller_port', 'of_controller_dpid', 'of_controller'], + "required": ['db_host', 'db_user', 'db_passwd', 'db_name'], "additionalProperties": False } @@ -166,6 +165,7 @@ tenant_new_schema = { "required": ["tenant"], "additionalProperties": False } + tenant_edit_schema = { "title":"tenant edition information schema", "$schema": "http://json-schema.org/draft-04/schema#", @@ -737,4 +737,31 @@ openflow_controller_schema = { }, "required": ["ofc"], "additionalProperties": False +} + +of_port_new_schema = { + "title": "OF port mapping", + "type": "object", + "properties": { + "ofc_id": id_schema, + "region": nameshort_schema, + "compute_node": nameshort_schema, + "pci": pci_schema, + "switch_dpid": nameshort_schema, + "switch_port": nameshort_schema, + "switch_mac": mac_schema + }, + "required": ["region", "compute_node", "pci", "switch_dpid"] +} + +of_port_map_new_schema = { + "title": "OF port mapping", + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + "properties": { + "of_port_mapings": {"type": "array", "items": of_port_new_schema, "minLenght":1}, + }, + "required": ["of_port_mapings"], + "additionalProperties": False + } \ No newline at end of file