diff options
author | Ben Pfaff <blp@nicira.com> | 2010-01-07 15:52:58 -0800 |
---|---|---|
committer | Ben Pfaff <blp@nicira.com> | 2010-01-26 09:46:42 -0800 |
commit | 00732bf5b5da6f1d71dc4f4b42f54224c03f71f6 (patch) | |
tree | 8f3ed22139ab32e9dbaf8a28c889b006d3d14239 /vswitchd/vswitch-idl.ann | |
parent | bda8868801ebe49b785f4810e055fb6bf80a1dc6 (diff) |
Cleanly separate IDL annotations from OVSDB schema information.
Until now, the OVSDB IDL annotations have been glommed together with the
schema information in a single file, and then we've used ovsdb-idlc to
extract the schema from that file. This commit reverses the process:
the schema and the annotations are stored separately and then glommed
together as necessary at build time.
This new arrangement has a few advantages:
- We can now easily have multiple different sets of IDL annotations
for a single OVSDB schema. For example, some users may not need
access to columns that other users do.
- Bugs in ovsdb-idlc cannot screw up the underlying schema (as shown
by a recent commit).
Diffstat (limited to 'vswitchd/vswitch-idl.ann')
-rw-r--r-- | vswitchd/vswitch-idl.ann | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/vswitchd/vswitch-idl.ann b/vswitchd/vswitch-idl.ann new file mode 100644 index 00000000..ff5766ae --- /dev/null +++ b/vswitchd/vswitch-idl.ann @@ -0,0 +1,20 @@ +# -*- 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"] = "ovsrec_" +s["idlHeader"] = "\"vswitchd/vswitch-idl.h\"" +s["tables"]["Open_vSwitch"]["columns"]["bridges"]["type"]["keyRefTable"] = "Bridge" +s["tables"]["Open_vSwitch"]["columns"]["controller"]["type"]["keyRefTable"] = "Controller" +s["tables"]["Open_vSwitch"]["columns"]["ssl"]["type"]["keyRefTable"] = "SSL" +s["tables"]["Bridge"]["columns"]["ports"]["type"]["keyRefTable"] = "Port" +s["tables"]["Bridge"]["columns"]["mirrors"]["type"]["keyRefTable"] = "Mirror" +s["tables"]["Bridge"]["columns"]["netflow"]["type"]["keyRefTable"] = "NetFlow" +s["tables"]["Bridge"]["columns"]["controller"]["type"]["keyRefTable"] = "Controller" +s["tables"]["Port"]["columns"]["interfaces"]["type"]["keyRefTable"] = "Interface" +s["tables"]["Mirror"]["columns"]["select_src_port"]["type"]["keyRefTable"] = "Port" +s["tables"]["Mirror"]["columns"]["select_dst_port"]["type"]["keyRefTable"] = "Port" +s["tables"]["Mirror"]["columns"]["output_port"]["type"]["keyRefTable"] = "Port" |