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