OF controller port mapping
- Add of_port_mappings DB entry
- Add interface to ovim.py to handle of port mapping per datacenter
Change-Id: I4248c89c3b951f075d4f75d5bb79cdabe87b866c
Signed-off-by: mirabal <leonardo.mirabal@altran.com>
diff --git a/vim_schema.py b/vim_schema.py
index 1dbd53c..c2dc1e2 100644
--- a/vim_schema.py
+++ b/vim_schema.py
@@ -165,6 +165,7 @@
"required": ["tenant"],
"additionalProperties": False
}
+
tenant_edit_schema = {
"title":"tenant edition information schema",
"$schema": "http://json-schema.org/draft-04/schema#",
@@ -736,4 +737,31 @@
},
"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