Cleanup default file locations and XenServer packaging
[sliver-openvswitch.git] / utilities / ovs-vsctl.8.in
1 .\" -*- nroff -*-
2 .de IQ
3 .  br
4 .  ns
5 .  IP "\\$1"
6 ..
7 .de ST
8 .  PP
9 .  RS -0.15in
10 .  I "\\$1"
11 .  RE
12 ..
13 .TH ovs\-vsctl 8 "November 2009" "Open vSwitch" "Open vSwitch Manual"
14 .ds PN ovs\-vsctl
15 .
16 .SH NAME
17 ovs\-vsctl \- utility for querying and configuring \fBovs\-vswitchd\fR
18 .
19 .SH SYNOPSIS
20 \fBovs\-vsctl\fR [\fIoptions\fR] \fB\-\-\fR [\fIoptions\fR] \fIcommand
21 \fR[\fIargs\fR] [\fB\-\-\fR [\fIoptions\fR] \fIcommand \fR[\fIargs\fR]]...
22 .
23 .SH DESCRIPTION
24 The \fBovs\-vsctl\fR program configures \fBovs\-vswitchd\fR(8) by
25 providing a high\-level interface to its configuration
26 database.  This program is mainly intended for use when
27 \fBovs\-vswitchd\fR is running.  If it is used when
28 \fBovs\-vswitchd\fR is not running, then \fB\-\-no\-wait\fR should be
29 specified and configuration changes will only take effect when
30 \fBovs\-vswitchd\fR is started.
31 .PP
32 By default, each time \fBovs\-vsctl\fR runs, it connects to an
33 \fBovsdb\-server\fR process that maintains an Open vSwitch
34 configuration database.  Using this connection, it queries and
35 possibly applies changes to the database, depending on the supplied
36 commands.  Then, if it applied any changes, it waits until
37 \fBovs\-vswitchd\fR has finished reconfiguring itself before it exits.
38 .PP
39 \fBovs\-vsctl\fR can perform any number of commands in a single run,
40 implemented as a single atomic transaction against the database.
41 .PP
42 The \fBovs\-vsctl\fR command line begins with global options (see
43 \fBOPTIONS\fR below for details).  The global options are followed by
44 one or more commands.  Each command should begin with \fB\-\-\fR by
45 itself as a command-line argument, to separate it from the global
46 options and following commands.  (If the first command does not have
47 any options, then the first \fB\-\-\fR may be omitted.)  The command
48 itself starts with command-specific options, if any, followed by the
49 command name and any arguments.  See \fBEXAMPLES\fR below for syntax
50 examples.
51 .
52 .SS "Linux VLAN Bridging Compatibility"
53 The \fBovs\-vsctl\fR program supports the model of a bridge
54 implemented by Open vSwitch, in which a single bridge supports ports
55 on multiple VLANs.  In this model, each port on a bridge is either a
56 trunk port that potentially passes packets tagged with 802.1Q headers
57 that designate VLANs or it is assigned a single implicit VLAN that is
58 never tagged with an 802.1Q header.
59 .PP
60 For compatibility with software designed for the Linux bridge,
61 \fBovs\-vsctl\fR also supports a model in which traffic associated
62 with a given 802.1Q VLAN is segregated into a separate bridge.  A
63 special form of the \fBadd\-br\fR command (see below) creates a ``fake
64 bridge'' within an Open vSwitch bridge to simulate this behavior.
65 When such a ``fake bridge'' is active, \fBovs\-vsctl\fR will treat it
66 much like a bridge separate from its ``parent bridge,'' but the actual
67 implementation in Open vSwitch uses only a single bridge, with ports on
68 the fake bridge assigned the implicit VLAN of the fake bridge of which
69 they are members.
70 .
71 .SH OPTIONS
72 .
73 The following options affect the behavior \fBovs\-vsctl\fR as a whole.
74 Some individual commands also accept their own options, which are
75 given just before the command name.  If the first command on the
76 command line has options, then those options must be separated from
77 the global options by \fB\-\-\fR.
78 .
79 .IP "\fB\-\-db=\fIserver\fR"
80 Sets \fIserver\fR as the database server that \fBovs\-vsctl\fR
81 contacts to query or modify configuration.  The default is
82 \fBunix:@RUNDIR@/db.sock\fR.  \fIserver\fR must take one of the
83 following forms:
84 .RS
85 .so ovsdb/remote-active.man
86 .RE
87 .
88 .IP "\fB\-\-no\-wait\fR"
89 Prevents \fBovs\-vsctl\fR from waiting for \fBovs\-vswitchd\fR to
90 reconfigure itself according to the the modified database.  This
91 option should be used if \fBovs\-vswitchd\fR is not running;
92 otherwise, \fBovs-vsctl\fR will not exit until \fBovs-vswitchd\fR
93 starts.
94 .IP
95 This option has no effect if the commands specified do not change the
96 database.
97 .
98 .IP "\fB\-\-no\-syslog\fR"
99 By default, \fBovs\-vsctl\fR logs its arguments and the details of any
100 changes that it makes to the system log.  This option disables this
101 logging.
102 .IP
103 This option is equivalent to \fB\-\-verbose=vvsctl:syslog:warn\fR.
104 .
105 .IP "\fB\-\-oneline\fR"
106 Modifies the output format so that the output for each command is printed
107 on a single line.  New-line characters that would otherwise separate
108 lines are printed as \fB\\n\fR, and any instances of \fB\\\fR that
109 would otherwise appear in the output are doubled.
110 Prints a blank line for each command that has no output.
111 .
112 .IP "\fB\-\-dry\-run\fR"
113 Prevents \fBovs\-vsctl\fR from actually modifying the database.
114 .
115 .IP "\fB-t \fIsecs\fR"
116 .IQ "\fB--timeout=\fIsecs\fR"
117 Limits runtime to approximately \fIsecs\fR seconds.  A value of 
118 zero will cause \fBovs\-vsctl\fR to wait forever.  If the timeout expires, 
119 \fBovs\-vsctl\fR will exit with a \fBSIGALRM\fR signal.  If this option is
120 not used, \fBovs\-vsctl\fR uses a timeout of five seconds.
121 (A timeout would normally happen only if the database cannot be contacted.)
122 .
123 .SS "Public Key Infrastructure Options"
124 .so lib/ssl.man
125 .so lib/vlog.man
126 .
127 .SH COMMANDS
128 The commands implemented by \fBovs\-vsctl\fR are described in the
129 sections below.
130 .SS "Open vSwitch Commands"
131 These commands work with an Open vSwitch as a whole.
132 .
133 .IP "\fBinit\fR"
134 Initializes the Open vSwitch database, if it is empty.  If the
135 database has already been initialized, this command has no effect.
136 .IP
137 Any successful \fBovs\-vsctl\fR command automatically initializes the
138 Open vSwitch database if it is empty.  This command is provided to
139 initialize the database without executing any other command.
140 .
141 .SS "Bridge Commands"
142 These commands examine and manipulate Open vSwitch bridges.
143 .
144 .IP "[\fB\-\-may\-exist\fR] \fBadd\-br \fIbridge\fR"
145 Creates a new bridge named \fIbridge\fR.  Initially the bridge will
146 have no ports (other than \fIbridge\fR itself).
147 .IP
148 Without \fB\-\-may\-exist\fR, attempting to create a bridge that
149 exists is an error.  With \fB\-\-may\-exist\fR, \fIbridge\fR may
150 already exist (but it must be a real bridge, not a VLAN bridge).
151 .
152 .IP "[\fB\-\-may\-exist\fR] \fBadd\-br \fIbridge parent vlan\fR"
153 Creates a ``fake bridge'' named \fIbridge\fR within the existing Open
154 vSwitch bridge \fIparent\fR, which must already exist and must not
155 itself be a fake bridge.  The new fake bridge will be on 802.1Q VLAN
156 \fIvlan\fR, which must be an integer between 1 and 4095.  Initially
157 \fIbridge\fR will have no ports (other than \fIbridge\fR itself).
158 .IP
159 Without \fB\-\-may\-exist\fR, attempting to create a bridge that
160 exists is an error.  With \fB\-\-may\-exist\fR, \fIbridge\fR may
161 already exist (but it must have the specified \fIvlan\fR and
162 \fIparent\fR).
163 .
164 .IP "[\fB\-\-if\-exists\fR] \fBdel\-br \fIbridge\fR"
165 Deletes \fIbridge\fR and all of its ports.  If \fIbridge\fR is a real
166 bridge, this command also deletes any fake bridges that were created
167 with \fIbridge\fR as parent, including all of their ports.
168 .IP
169 Without \fB\-\-if\-exists\fR, attempting to delete a bridge that does
170 not exist is an error.  With \fB\-\-if\-exists\fR, attempting to
171 delete a bridge that does not exist has no effect.
172 .
173 .IP "\fBlist\-br\fR"
174 Lists all existing real and fake bridges on standard output, one per
175 line.
176 .
177 .IP "\fBbr\-exists \fIbridge\fR"
178 Tests whether \fIbridge\fR exists as a real or fake bridge.  If so,
179 \fBovs\-vsctl\fR exits successfully with exit code 0.  If not,
180 \fBovs\-vsctl\fR exits unsuccessfully with exit code 2.
181 .
182 .IP "\fBbr\-to\-vlan \fIbridge\fR"
183 If \fIbridge\fR is a fake bridge, prints the bridge's 802.1Q VLAN as a
184 decimal integer.  If \fIbridge\fR is a real bridge, prints 0.
185 .
186 .IP "\fBbr\-to\-parent \fIbridge\fR"
187 If \fIbridge\fR is a fake bridge, prints the name of its parent
188 bridge.  If \fIbridge\fR is a real bridge, print \fIbridge\fR.
189 .
190 .IP "\fBbr\-set\-external\-id \fIbridge key\fR [\fIvalue\fR]"
191 Sets or clears an ``external ID'' value on \fIbridge\fR.  These values
192 are intended to identify entities external to Open vSwitch with which
193 \fIbridge\fR is associated, e.g. the bridge's identifier in a
194 virtualization management platform.  The Open vSwitch database schema
195 specifies well-known \fIkey\fR values, but \fIkey\fR and \fIvalue\fR
196 are otherwise arbitrary strings.
197 .IP
198 If \fIvalue\fR is specified, then \fIkey\fR is set to \fIvalue\fR for
199 \fIbridge\fR, overwriting any previous value.  If \fIvalue\fR is
200 omitted, then \fIkey\fR is removed from \fIbridge\fR's set of external
201 IDs (if it was present).
202 .IP
203 For real bridges, the effect of this command is similar to that of a
204 \fBset\fR or \fBremove\fR command in the \fBexternal\-ids\fR column of
205 the \fBBridge\fR table.  For fake bridges, it actually modifies keys
206 with names prefixed by \fBfake\-bridge\-\fR in the \fBPort\fR table.
207 .
208 .IP "\fBbr\-get\-external\-id \fIbridge\fR [\fIkey\fR]"
209 Queries the external IDs on \fIbridge\fR.  If \fIkey\fR is specified,
210 the output is the value for that \fIkey\fR or the empty string if
211 \fIkey\fR is unset.  If \fIkey\fR is omitted, the output is
212 \fIkey\fB=\fIvalue\fR, one per line, for each key-value pair.
213 .IP
214 For real bridges, the effect of this command is similar to that of a
215 \fBget\fR command in the \fBexternal\-ids\fR column of the
216 \fBBridge\fR table.  For fake bridges, it queries keys with names
217 prefixed by \fBfake\-bridge\-\fR in the \fBPort\fR table.
218 .
219 .SS "Port Commands"
220 .
221 These commands examine and manipulate Open vSwitch ports.  These
222 commands treat a bonded port as a single entity.
223 .
224 .IP "\fBlist\-ports \fIbridge\fR"
225 Lists all of the ports within \fIbridge\fR on standard output, one per
226 line.  The local port \fIbridge\fR is not included in the list.
227 .
228 .IP "[\fB\-\-may\-exist\fR] \fBadd\-port \fIbridge port\fR"
229 Creates on \fIbridge\fR a new port named \fIport\fR from the network
230 device of the same name.
231 .IP
232 Without \fB\-\-may\-exist\fR, attempting to create a port that exists
233 is an error.  With \fB\-\-may\-exist\fR, \fIport\fR may already exist
234 (but it must be on \fIbridge\fR and not be a bonded port).
235 .
236 .IP "[\fB\-\-fake\-iface\fR] \fBadd\-bond \fIbridge port iface\fR\&..."
237 Creates on \fIbridge\fR a new port named \fIport\fR that bonds
238 together the network devices given as each \fIiface\fR.  At least two
239 interfaces must be named.
240 .IP
241 With \fB\-\-fake\-iface\fR, a fake interface with the name \fIport\fR is
242 created.  This should only be used for compatibility with legacy
243 software that requires it.
244 .IP
245 Without \fB\-\-may\-exist\fR, attempting to create a port that exists
246 is an error.  With \fB\-\-may\-exist\fR, \fIport\fR may already exist
247 (but it must be on \fIbridge\fR and bond together exactly the
248 specified interface).
249 .
250 .IP "[\fB\-\-if\-exists\fR] \fBdel\-port \fR[\fIbridge\fR] \fIport\fR"
251 Deletes \fIport\fR.  If \fIbridge\fR is omitted, \fIport\fR is removed
252 from whatever bridge contains it; if \fIbridge\fR is specified, it
253 must be the real or fake bridge that contains \fIport\fR.
254 .IP
255 Without \fB\-\-if\-exists\fR, attempting to delete a port that does
256 not exist is an error.  With \fB\-\-if\-exists\fR, attempting to
257 delete a port that does not exist has no effect.
258 .
259 .IP "[\fB\-\-if\-exists\fR] \fB\-\-with\-iface del\-port \fR[\fIbridge\fR] \fIiface\fR"
260 Deletes the port named \fIiface\fR or that has an interface named
261 \fIiface\fR.  If \fIbridge\fR is omitted, the port is removed from
262 whatever bridge contains it; if \fIbridge\fR is specified, it must be
263 the real or fake bridge that contains the port.
264 .IP
265 Without \fB\-\-if\-exists\fR, attempting to delete the port for an
266 interface that does not exist is an error.  With \fB\-\-if\-exists\fR,
267 attempting to delete the port for an interface that does not exist has
268 no effect.
269 .
270 .IP "\fBport\-to\-br \fIport\fR"
271 Prints the name of the bridge that contains \fIport\fR on standard
272 output.
273 .
274 .SS "Interface Commands"
275 .
276 These commands examine the interfaces attached to an Open vSwitch
277 bridge.  These commands treat a bonded port as a collection of two or
278 more interfaces, rather than as a single port.
279 .
280 .IP "\fBlist\-ifaces \fIbridge\fR"
281 Lists all of the interfaces within \fIbridge\fR on standard output,
282 one per line.  The local port \fIbridge\fR is not included in the
283 list.
284 .
285 .IP "\fBiface\-to\-br \fIiface\fR"
286 Prints the name of the bridge that contains \fIiface\fR on standard
287 output.
288 .
289 .SS "OpenFlow Controller Connectivity"
290 .
291 \fBovs\-vswitchd\fR can perform all configured bridging and switching
292 locally, or it can be configured to connect a given bridge to an
293 external OpenFlow controller, such as NOX.  
294 .
295 If a \fIbridge\fR argument is given, the settings apply only to the
296 specified bridge.  Otherwise, they apply to the Open vSwitch instance,
297 and its configuration applies to any bridge that has not been explicitly
298 configured through a \fIbridge\fR argument.
299 .
300 .IP "\fBget\-controller\fR [\fIbridge\fR]"
301 Prints the configured controller target.
302 .
303 .IP "\fBdel\-controller\fR [\fIbridge\fR]"
304 Deletes the configured controller target.
305 .
306 .IP "\fBset\-controller\fR [\fIbridge\fR] \fItarget\fR"
307 Sets the configured controller target.  The \fItarget\fR may use any of
308 the following forms:
309 .
310 .RS
311 .so lib/vconn-active.man
312 .RE
313 .
314 .ST "Controller Failure Settings"
315 .PP
316 When a controller is configured, it is, ordinarily, responsible for
317 setting up all flows on the switch.  Thus, if the connection to
318 the controller fails, no new network connections can be set up.  If
319 the connection to the controller stays down long enough, no packets
320 can pass through the switch at all.
321 .PP
322 If the value is \fBstandalone\fR, or if neither of these settings
323 is set, \fBovs\-vswitchd\fR will take over
324 responsibility for setting up
325 flows when no message has been received from the controller for three
326 times the inactivity probe interval (xxx needs to be exposed).  In this mode,
327 \fBovs\-vswitchd\fR causes the datapath to act like an ordinary
328 MAC-learning switch.  \fBovs\-vswitchd\fR will continue to retry connecting
329 to the controller in the background and, when the connection succeeds,
330 it discontinues its standalone behavior.
331 .PP
332 If this option is set to \fBsecure\fR, \fBovs\-vswitchd\fR will not
333 set up flows on its own when the controller connection fails.
334 .
335 .IP "\fBget\-fail\-mode\fR [\fIbridge\fR]"
336 Prints the configured failure mode.
337 .
338 .IP "\fBdel\-fail\-mode\fR [\fIbridge\fR]"
339 Deletes the configured failure mode.
340 .
341 .IP "\fBset\-fail\-mode\fR [\fIbridge\fR] \fBstandalone\fR|\fBsecure\fR"
342 Sets the configured failure mode.
343 .
344 .SS "SSL Configuration"
345 When \fBovs\-vswitchd\fR is configured to connect over SSL for management or
346 controller connectivity, the following parameters are required:
347 .TP
348 \fBprivate-key\fR
349 Specifies a PEM file containing the private key used as the virtual
350 switch's identity for SSL connections to the controller.
351 .TP
352 \fBcertificate\fR
353 Specifies a PEM file containing a certificate, signed by the
354 certificate authority (CA) used by the controller and manager, that
355 certifies the virtual switch's private key, identifying a trustworthy
356 switch.
357 .TP
358 \fBca-cert\fR
359 Specifies a PEM file containing the CA certificate used to verify that
360 the virtual switch is connected to a trustworthy controller.
361 .PP
362 These files are read only once, at \fBovs\-vswitchd\fR startup time.  If
363 their contents change, \fBovs\-vswitchd\fR must be killed and restarted.
364 .PP
365 These SSL settings apply to all SSL connections made by the virtual
366 switch.
367 .
368 .IP "\fBget\-ssl\fR"
369 Prints the SSL configuration.
370 .
371 .IP "\fBdel\-ssl\fR"
372 Deletes the current SSL configuration.
373 .
374 .IP "[\fB\-\-bootstrap\fR] \fBset\-ssl\fR \fIprivate-key\fR \fIcertificate\fR \fIca-cert\fR"
375 Sets the SSL configuration.  The \fB\-\-bootstrap\fR option is described 
376 below.
377 .
378 .ST "CA Certificate Bootstrap"
379 .PP
380 Ordinarily, all of the files named in the SSL configuration must exist
381 when \fBovs\-vswitchd\fR starts.  However, if the \fB\-\-bootstrap\fR 
382 option is given, then \fBovs\-vswitchd\fR will attempt to obtain the
383 CA certificate from the controller on its first SSL connection and
384 save it to the named PEM file.  If it is successful, it will
385 immediately drop the connection and reconnect, and from then on all
386 SSL connections must be authenticated by a certificate signed by the
387 CA certificate thus obtained.
388 .PP
389 \fBThis option exposes the SSL connection to a man-in-the-middle
390 attack obtaining the initial CA certificate\fR, but it may be useful
391 for bootstrapping.
392 .PP
393 This option is only useful if the controller sends its CA certificate
394 as part of the SSL certificate chain.  The SSL protocol does not
395 require the controller to send the CA certificate, but
396 \fBcontroller\fR(8) can be configured to do so with the
397 \fB--peer-ca-cert\fR option.
398 .
399 .SS "Database Commands"
400 .
401 These commands query and modify the contents of \fBovsdb\fR tables.
402 They are a slight abstraction of the \fBovsdb\fR interface and as such
403 they operate at a lower level than other \fBovs\-vsctl\fR commands.
404 .PP
405 .ST "Identifying Tables, Records, and Columns"
406 .PP
407 Each of these commands has a \fItable\fR parameter to identify a table
408 within the database.  Many of them also take a \fIrecord\fR parameter
409 that identifies a particular record within a table.  The \fIrecord\fR
410 parameter may be the UUID for a record, and many tables offer
411 additional ways to identify records.  Some commands also take
412 \fIcolumn\fR parameters that identify a particular field within the
413 records in a table.
414 .PP
415 The following tables are currently defined:
416 .IP "\fBOpen_vSwitch\fR"
417 Global configuration for an \fBovs\-vswitchd\fR.  This table contains
418 exactly one record, identified by specifying \fB.\fR as the record
419 name.
420 .IP "\fBBridge\fR"
421 Configuration for a bridge within an Open vSwitch.  Records may be
422 identified by bridge name.
423 .IP "\fBPort\fR"
424 A bridge port.  Records may be identified by port name.
425 .IP "\fBInterface\fR"
426 A network device attached to a port.  Records may be identified by
427 name.
428 .IP "\fBController\fR"
429 Configuration for an OpenFlow controller.  A controller attached to a
430 particular bridge may be identified by the bridge's name.  The default
431 controller controller for an Open vSwitch may be identified by
432 specifying \fB.\fR as the record name.
433 .IP "\fBMirror\fR"
434 A port mirroring configuration attached to a bridge.  Records may be
435 identified by mirror name.
436 .IP "\fBNetFlow\fR"
437 A NetFlow configuration attached to a bridge.  Records may be
438 identified by bridge name.
439 .PP
440 Names of tables, records, and columns are not case-sensitive, and
441 \fB--\fR and \fB_\fR are treated interchangeably.  Unique
442 abbreviations are acceptable, e.g. \fBnet\fR or \fRn\fR is sufficient
443 to identify the \fBNetFlow\fR table.
444 .
445 .ST "Database Values"
446 .PP
447 Each column in the database accepts a fixed type of data.  The
448 currently defined basic types, and their representations, are:
449 .IP "integer"
450 A decimal integer in the range \-2**63 to 2**63\-1, inclusive.
451 .IP "real"
452 A floating-point number.
453 .IP "Boolean"
454 True or false, written \fBtrue\fR or \fBfalse\fR, respectively.
455 .IP "string"
456 An arbitrary Unicode string, except that null bytes are not allowed.
457 Quotes are optional for most strings that begin with an English letter
458 or underscore and consist only of letters, underscores, hyphens, and
459 periods.  However, \fBtrue\fR and \fBfalse\fR and strings that match
460 the syntax of UUIDs (see below) must be enclosed in double quotes to
461 distinguish them from other basic types.  When double quotes are used,
462 the syntax is that of strings in JSON, e.g. backslashes may be used to
463 escape special characters.  The empty string must be represented as a
464 pair of double quotes (\fB""\fR).
465 .IP "UUID"
466 A universally unique identifier in the style of RFC 4122,
467 e.g. \fBf81d4fae-7dec-11d0-a765-00a0c91e6bf6\fR.
468 .PP
469 Multiple values in a single column may be separated by spaces or a
470 single comma.  When multiple values are present, duplicates are not
471 allowed, and order is not important.  Conversely, some database
472 columns can have an empty set of values, represented as \fB[]\fR, and
473 square brackets may optionally enclose other non-empty sets or single
474 values as well.
475 .PP
476 A few database columns are ``maps'' of key-value pairs, where the key
477 and the value are each some fixed database type.  These are specified
478 in the form \fIkey\fB=\fIvalue\fR, where \fIkey\fR and \fIvalue\fR
479 follow the syntax for the column's key type and value type,
480 respectively.  When multiple pairs are present (separated by spaces or
481 a comma), duplicate keys are not allowed, and again the order is not
482 important.  Duplicate values are allowed.  An empty map is represented
483 as \fB{}\fR, and curly braces may be optionally enclose non-empty maps
484 as well.
485 .
486 .ST "Database Command Syntax"
487 .IP "\fBlist \fItable \fR[\fIrecord\fR]..."
488 List the values of all columns of each specified \fIrecord\fR.  If no
489 records are specified, lists all the records in \fItable\fR.
490 .IP
491 The UUIDs shown for rows created in the same \fBovs\-vsctl\fR
492 invocation will be wrong.
493 .
494 .IP "[\fB\-\-if\-exists\fR] \fBget \fItable record column\fR[\fB:\fIkey\fR]..."
495 Prints the value of each specified \fIcolumn\fR in the given
496 \fIrecord\fR in \fItable\fR.  For map columns, a \fIkey\fR may
497 optionally be specified, in which case the value associated with
498 \fIkey\fR in the column is printed, instead of the entire map.
499 .IP
500 For a map column, without \fB\-\-if\-exists\fR it is an error if
501 \fIkey\fR does not exist; with it, a blank line is printed.  If
502 \fIcolumn\fR is not a map column or if \fIkey\fR is not specified,
503 \fB\-\-if\-exists\fR has no effect.
504 .
505 .IP "\fBset \fItable record column\fR[\fB:\fIkey\fR]\fB=\fIvalue\fR..."
506 Sets the value of each specified \fIcolumn\fR in the given
507 \fIrecord\fR in \fItable\fR to \fIvalue\fR.  For map columns, a
508 \fIkey\fR may optionally be specified, in which case the value
509 associated with \fIkey\fR in that column is changed (or added, if none
510 exists), instead of the entire map.
511 .
512 .IP "\fBadd \fItable record column \fR[\fIkey\fB=\fR]\fIvalue\fR..."
513 Adds the specified value or key-value pair to \fIcolumn\fR in
514 \fIrecord\fR in \fItable\fR.  If \fIcolumn\fR is a map, then \fIkey\fR
515 is required, otherwise it is prohibited.  If \fIkey\fR already exists
516 in a map column, then the current \fIvalue\fR is not replaced (use the
517 \fBset\fR command to replace an existing value).
518 .
519 .IP "\fBremove \fItable record column \fR\fIvalue\fR..."
520 .IQ "\fBremove \fItable record column \fR\fIkey\fR..."
521 .IQ "\fBremove \fItable record column \fR\fIkey\fB=\fR\fIvalue\fR..."
522 Removes the specified values or key-value pairs from \fIcolumn\fR in
523 \fIrecord\fR in \fItable\fR.  The first form applies to columns that
524 are not maps: each specified \fIvalue\fR is removed from the column.
525 The second and third forms apply to map columns: if only a \fIkey\fR
526 is specified, then any key-value pair with the given \fIkey\fR is
527 removed, regardless of its value; if a \fIvalue\fR is given then a
528 pair is removed only if both key and value match.
529 .IP
530 It is not an error if the column does not contain the specified key or
531 value or pair.
532 .
533 .IP "\fBclear\fR \fItable record column\fR..."
534 Sets each \fIcolumn\fR in \fIrecord\fR in \fItable\fR to the empty set
535 or empty map, as appropriate.  This command applies only to columns
536 that are allowed to be empty.
537 .
538 .IP "create \fItable column\fR[\fB:\fIkey\fR]\fB=\fIvalue\fR..."
539 Creates a new record in \fItable\fR and sets the initial values of
540 each \fIcolumn\fR.  Columns not explicitly set will receive their
541 default values.  Outputs the UUID of the new row.
542 .
543 .IP "\fR[\fB\-\-if\-exists\fR] \fBdestroy \fItable record\fR..."
544 Deletes each specified \fIrecord\fR from \fItable\fR.  Unless
545 \fB\-\-if\-exists\fR is specified, each \fIrecord\fRs must exist.
546 .SH "EXAMPLES"
547 Create a new bridge named br0 and add port eth0 to it:
548 .IP
549 .B "ovs-vsctl add\-br br0"
550 .br
551 .B "ovs-vsctl add\-port br0 eth0"
552 .PP
553 Alternatively, perform both operations in a single atomic transaction:
554 .IP 
555 .B "ovs-vsctl add\-br br0 \-\- add\-port br0 eth0"
556 .PP
557 Delete bridge \fBbr0\fR, reporting an error if it does not exist:
558 .IP
559 .B "ovs\-vsctl del\-br br0"
560 .PP
561 Delete bridge \fBbr0\fR if it exists (the \fB\-\-\fR is required to
562 separate \fBdel\-br\fR's options from the global options):
563 .IP
564 .B "ovs\-vsctl \-\- \-\-if\-exists del\-br br0"
565 .
566 .SH "EXIT STATUS"
567 .IP "0"
568 Successful program execution.
569 .IP "1"
570 Usage, syntax, or configuration file error.
571 .IP "2"
572 The \fIbridge\fR argument to \fBbr\-exists\fR specified the name of a
573 bridge that does not exist.
574 .SH "SEE ALSO"
575 .
576 .BR ovsdb\-server (1),
577 .BR ovs\-vswitchd (8).