X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=ovsdb%2Fovsdb-idlc.1;h=4a3326143d3346e6e80ffa497c8bb1c5d45741ac;hb=c5cf10598f8c9f4428291e9df3ecd72a05fb1ccf;hp=1311759c0f89680b1c6a2be3bc9ea455e9fc875e;hpb=58fda1dab104041fc693032475ec4662c1a52849;p=sliver-openvswitch.git diff --git a/ovsdb/ovsdb-idlc.1 b/ovsdb/ovsdb-idlc.1 index 1311759c0..4a3326143 100644 --- a/ovsdb/ovsdb-idlc.1 +++ b/ovsdb/ovsdb-idlc.1 @@ -6,17 +6,15 @@ ovsdb\-idlc \- Open vSwitch IDL (Interface Definition Language) compiler . .SH SYNOPSIS -\fBovsdb\-idlc \fBvalidate\fI schema\fR +\fBovsdb\-idlc \fBannotate\fI schema annotations\fR .br -\fBovsdb\-idlc \fBovsdb\-schema\fI schema\fR +\fBovsdb\-idlc \fBc\-idl\-header\fI idl\fR .br -\fBovsdb\-idlc \fBc\-idl\-header\fI schema\fR +\fBovsdb\-idlc \fBc\-idl\-source\fI idl\fR .br -\fBovsdb\-idlc \fBc\-idl\-source\fI schema\fR +\fBovsdb\-idlc \-\-help\fR .br -\fBovsdb\-idlc --help\fR -.br -\fBovsdb\-idlc --version\fR +\fBovsdb\-idlc \-\-version\fR . .SH DESCRIPTION The \fBovsdb\-idlc\fR program is a command-line tool for translating @@ -26,13 +24,9 @@ installation or configuration time. Thus, it is not normally installed as part of Open vSwitch. . .PP -The \fIschema\fR files used as \fBovsdb\-idlc\fR input have the same -format as the OVSDB schemas, specified in the OVSDB specification, -with a few additions: -. -.IP "\fB//\fR comments" -Lines that begin with \fB//\fR (two forward slashes) are ignored and -thus can be used for comments. +The \fIidl\fR files used as input for most \fBovsdb\-idlc\fR commands +have the same format as the OVSDB schemas, specified in the OVSDB +specification, with a few additions: . .IP "\fB""\fBidlPrefix\fR"" member of " This member, which is required, specifies a string that is prefixed to @@ -45,41 +39,35 @@ It will be output on an \fB#include\fR line in the source file generated by the C bindings. It should include the bracketing \fB""\fR or \fB<>\fR. . -.IP "\fB""\fBkeyRefTable\fR"" member of " -A whose \fBkey\fR is \fB"uuid"\fR may have an additional member -named \fB"keyRefTable"\fR, whose value is a table name. This -expresses the constraint that keys of the given are UUIDs that -reference rows in the named table. This allows the IDL to supply a -structure pointer in place of a raw UUID in its marshalled version of -the given type. -. -.IP "\fB""valueRefTable""\fR member of " -Analogous to \fB"keyRefTable"\fR in meaning and effect, except that it -applies to the \fB"value"\fR member of the . .SS "Commands" -. -.IP "\fBvalidate\fI schema\fR" -Reads \fIschema\fR and checks its format, without producing any output. -. -.IP "\fBovsdb\-schema\fI schema\fR" -Reads \fIschema\fR and prints it on standard output with the parts -that are not part of the OVSDB schema specification stripped out. -. -.IP "\fBc\-idl\-header\fI schema\fR" -Reads \fIschema\fR and prints on standard output a C header file that +.IP "\fBannotate\fI schema annotations\fR" +Reads \fIschema\fR, which should be a file in JSON format (ordinarily +an OVSDB schema file), then reads and executes the Python syntax +fragment in \fIannotations\fR. The Python syntax fragment is passed +the JSON object as a local variable named \fBs\fR. It may modify this +data in any way. After the Python code returns, the object as +modified is re-serialized as JSON on standard output. +. +.IP "\fBc\-idl\-header\fI idl\fR" +Reads \fIidl\fR and prints on standard output a C header file that defines a structure for each table defined by the schema. . -.IP "\fBc\-idl\-source\fI schema\fR" -Reads \fIschema\fR and prints on standard output a C source file that +.IP "\fBc\-idl\-source\fI idl\fR" +Reads \fIidl\fR and prints on standard output a C source file that implements C bindings for the database defined by the schema. . +.IP "\fBdoc\fI idl\fR" +Reads \fIidl\fR and prints on standard output a text file that +documents the schema. The output may have very long lines, so it +makes sense to pipe it through, e.g. \fBfmt \-s\fR. +. .SS "Options" .so lib/common.man . .SH "BUGS" \fBovsdb\-idlc\fR is more lenient about the format of OVSDB schemas -than other OVSDB tools, so the \fBovsdb\-schema\fR command may output -schemas that other programs refuse to read. +than other OVSDB tools. It may successfully parse schemas that, e.g., +\fBovsdb\-tool\fR rejects. . .SH "SEE ALSO" The OVSDB specification.