forked from openvswitch/ovs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
vtep: Initial checkin of vtep schema.
The hardware VTEP OVSDB schema specifies relations that a VTEP can use to integrate physical ports into logical switches maintained by a network virtualization controller such as NVP. Co-authored-by: Ben Pfaff <[email protected]> Co-authored-by: Kenneth Duda <[email protected]> Co-authored-by: Justin Pettit <[email protected]> Signed-off-by: Bruce Davie <[email protected]> Signed-off-by: Ben Pfaff <[email protected]> Signed-off-by: Kenneth Duda <[email protected]> Signed-off-by: Justin Pettit <[email protected]> Acked-by: Ben Pfaff <[email protected]>
- Loading branch information
1 parent
af4e1a4
commit add17b6
Showing
8 changed files
with
954 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,3 +8,6 @@ | |
/vswitch-idl.c | ||
/vswitch-idl.h | ||
/vswitch-idl.ovsidl | ||
/vtep-idl.c | ||
/vtep-idl.h | ||
/vtep-idl.ovsidl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# -*- python -*- | ||
|
||
# This code, when invoked by "ovsdb-idlc annotate" (by the build | ||
# process), annotates vswitch.ovsschema with additional data that give | ||
# the ovsdb-idl engine information about the types involved, so that | ||
# it can generate more programmer-friendly data structures. | ||
|
||
s["idlPrefix"] = "vteprec_" | ||
s["idlHeader"] = "\"lib/vtep-idl.h\"" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
/Makefile | ||
/Makefile.in | ||
/vtep.5 | ||
/vtep.gv | ||
/vtep.ovsschema.stamp | ||
/vtep.pic |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# VTEP schema and IDL | ||
EXTRA_DIST += vtep/vtep.ovsschema | ||
pkgdata_DATA += vtep/vtep.ovsschema | ||
|
||
# VTEP E-R diagram | ||
# | ||
# If "python" or "dot" is not available, then we do not add graphical diagram | ||
# to the documentation. | ||
if HAVE_PYTHON | ||
if HAVE_DOT | ||
vtep/vtep.gv: ovsdb/ovsdb-dot.in vtep/vtep.ovsschema | ||
$(OVSDB_DOT) --no-arrows $(srcdir)/vtep/vtep.ovsschema > $@ | ||
vtep/vtep.pic: vtep/vtep.gv ovsdb/dot2pic | ||
(dot -T plain < vtep/vtep.gv | $(srcdir)/ovsdb/dot2pic -f 3) > $@; | ||
VTEP_PIC = vtep/vtep.pic | ||
VTEP_DOT_DIAGRAM_ARG = --er-diagram=$(VTEP_PIC) | ||
DISTCLEANFILES += vtep/vtep.gv vtep/vtep.pic | ||
endif | ||
endif | ||
|
||
# VTEP schema documentation | ||
EXTRA_DIST += vtep/vtep.xml | ||
DISTCLEANFILES += vtep/vtep.5 | ||
dist_man_MANS += vtep/vtep.5 | ||
$(srcdir)/vtep/vtep.5: \ | ||
ovsdb/ovsdb-doc vtep/vtep.xml vtep/vtep.ovsschema $(VTEP_PIC) | ||
$(OVSDB_DOC) \ | ||
--title="vtep" \ | ||
$(VTEP_DOT_DIAGRAM_ARG) \ | ||
$(srcdir)/vtep/vtep.ovsschema \ | ||
$(srcdir)/vtep/vtep.xml > $@.tmp | ||
mv $@.tmp $@ | ||
|
||
# Version checking for vtep.ovsschema. | ||
ALL_LOCAL += vtep/vtep.ovsschema.stamp | ||
vtep/vtep.ovsschema.stamp: vtep/vtep.ovsschema | ||
@sum=`sed '/cksum/d' $? | cksum`; \ | ||
expected=`sed -n 's/.*"cksum": "\(.*\)".*/\1/p' $?`; \ | ||
if test "X$$sum" = "X$$expected"; then \ | ||
touch $@; \ | ||
else \ | ||
ln=`sed -n '/"cksum":/=' $?`; \ | ||
echo >&2 "$?:$$ln: checksum \"$$sum\" does not match (you should probably update the version number and fix the checksum)"; \ | ||
exit 1; \ | ||
fi | ||
CLEANFILES += vtep/vtep.ovsschema.stamp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,157 @@ | ||
{ | ||
"name": "hardware_vtep", | ||
"cksum": "825115144 5318", | ||
"tables": { | ||
"Global": { | ||
"columns": { | ||
"managers": { | ||
"type": {"key": {"type": "uuid", | ||
"refTable": "Manager"}, | ||
"min": 0, "max": "unlimited"}}, | ||
"switches": { | ||
"type": {"key": {"type": "uuid", "refTable": "Physical_Switch"}, | ||
"min": 0, "max": "unlimited"}} | ||
}, | ||
"maxRows": 1, | ||
"isRoot": true}, | ||
"Physical_Switch": { | ||
"columns": { | ||
"ports": { | ||
"type": {"key": {"type": "uuid", "refTable": "Physical_Port"}, | ||
"min": 0, "max": "unlimited"}}, | ||
"name": {"type": "string"}, | ||
"description": {"type": "string"}, | ||
"management_ips": { | ||
"type": {"key": {"type": "string"}, "min": 0, "max": "unlimited"}}, | ||
"tunnel_ips": { | ||
"type": {"key": {"type": "string"}, "min": 0, "max": "unlimited"}}}, | ||
"indexes": [["name"]]}, | ||
"Physical_Port": { | ||
"columns": { | ||
"name": {"type": "string"}, | ||
"description": {"type": "string"}, | ||
"vlan_bindings": { | ||
"type": {"key": {"type": "integer", | ||
"minInteger": 0, "maxInteger": 4095}, | ||
"value": {"type": "uuid", "refTable": "Logical_Switch"}, | ||
"min": 0, "max": "unlimited"}}, | ||
"vlan_stats": { | ||
"type": {"key": {"type": "integer", | ||
"minInteger": 0, "maxInteger": 4095}, | ||
"value": {"type": "uuid", | ||
"refTable": "Logical_Binding_Stats"}, | ||
"min": 0, "max": "unlimited"}}}}, | ||
"Logical_Binding_Stats": { | ||
"columns": { | ||
"bytes_from_local": {"type": "integer"}, | ||
"packets_from_local": {"type": "integer"}, | ||
"bytes_to_local": {"type": "integer"}, | ||
"packets_to_local": {"type": "integer"}}}, | ||
"Logical_Switch": { | ||
"columns": { | ||
"name": {"type": "string"}, | ||
"description": {"type": "string"}, | ||
"tunnel_key": {"type": {"key": "integer", "min": 0, "max": 1}}}, | ||
"isRoot": true, | ||
"indexes": [["name"]]}, | ||
"Ucast_Macs_Local": { | ||
"columns": { | ||
"MAC": {"type": "string"}, | ||
"logical_switch": { | ||
"type": {"key": {"type": "uuid", | ||
"refTable": "Logical_Switch"}}}, | ||
"locator": { | ||
"type": {"key": {"type": "uuid", | ||
"refTable": "Physical_Locator"}}}, | ||
"ipaddr": {"type": "string"}}, | ||
"isRoot": true}, | ||
"Ucast_Macs_Remote": { | ||
"columns": { | ||
"MAC": {"type": "string"}, | ||
"logical_switch": { | ||
"type": {"key": {"type": "uuid", | ||
"refTable": "Logical_Switch"}}}, | ||
"locator": { | ||
"type": {"key": {"type": "uuid", | ||
"refTable": "Physical_Locator"}}}, | ||
"ipaddr": {"type": "string"}}, | ||
"isRoot": true}, | ||
"Mcast_Macs_Local": { | ||
"columns": { | ||
"MAC": {"type": "string"}, | ||
"logical_switch": { | ||
"type": {"key": {"type": "uuid", | ||
"refTable": "Logical_Switch"}}}, | ||
"locator_set": { | ||
"type": {"key": {"type": "uuid", | ||
"refTable": "Physical_Locator_Set"}}}, | ||
"ipaddr": {"type": "string"}}, | ||
"isRoot": true}, | ||
"Mcast_Macs_Remote": { | ||
"columns": { | ||
"MAC": {"type": "string"}, | ||
"logical_switch": { | ||
"type": {"key": {"type": "uuid", | ||
"refTable": "Logical_Switch"}}}, | ||
"locator_set": { | ||
"type": {"key": {"type": "uuid", | ||
"refTable": "Physical_Locator_Set"}}}, | ||
"ipaddr": {"type": "string"}}, | ||
"isRoot": true}, | ||
"Logical_Router": { | ||
"columns": { | ||
"name": {"type": "string"}, | ||
"description": {"type": "string"}, | ||
"switch_binding": { | ||
"type": {"key": {"type": "string"}, | ||
"value": {"type": "uuid", | ||
"refTable": "Logical_Switch"}, | ||
"min": 0, "max": "unlimited"}}, | ||
"static_routes": { | ||
"type": {"key": {"type": "string"}, | ||
"value": {"type" : "string"}, | ||
"min": 0, "max": "unlimited"}}}, | ||
"isRoot": true, | ||
"indexes": [["name"]]}, | ||
"Physical_Locator_Set": { | ||
"columns": { | ||
"locators": { | ||
"type": {"key": {"type": "uuid", "refTable": "Physical_Locator"}, | ||
"min": 1, "max": "unlimited"}, | ||
"mutable": false}}}, | ||
"Physical_Locator": { | ||
"columns": { | ||
"encapsulation_type": { | ||
"type": { | ||
"key": { | ||
"enum": ["set", ["vxlan_over_ipv4"]], | ||
"type": "string"}}, | ||
"mutable": false}, | ||
"dst_ip": {"type": "string", "mutable": false}, | ||
"bfd": { | ||
"type": {"key": "string", "value": "string", | ||
"min": 0, "max": "unlimited"}}, | ||
"bfd_status": { | ||
"type": {"key": "string", "value": "string", | ||
"min": 0, "max": "unlimited"}}}, | ||
"indexes": [["encapsulation_type", "dst_ip"]]}, | ||
"Manager": { | ||
"columns": { | ||
"target": {"type": "string"}, | ||
"max_backoff": { | ||
"type": {"key": {"type": "integer", | ||
"minInteger": 1000}, | ||
"min": 0, "max": 1}}, | ||
"inactivity_probe": { | ||
"type": {"key": "integer", "min": 0, "max": 1}}, | ||
"other_config": { | ||
"type": {"key": "string", "value": "string", "min": 0, "max": "unlimited"}}, | ||
"is_connected": { | ||
"type": "boolean", | ||
"ephemeral": true}, | ||
"status": { | ||
"type": {"key": "string", "value": "string", "min": 0, "max": "unlimited"}, | ||
"ephemeral": true}}, | ||
"indexes": [["target"]], | ||
"isRoot": false}}, | ||
"version": "1.0.0"} |
Oops, something went wrong.