Skip to content

Commit

Permalink
ovn-sbctl: Add ovn-sbctl.
Browse files Browse the repository at this point in the history
This commit adds ovn-sbctl to ovn family by using the db-ctl-base
library.

Signed-off-by: Alex Wang <[email protected]>
Acked-by: Ben Pfaff <[email protected]>
Acked-by: Russell Bryant <[email protected]>
  • Loading branch information
yew011 committed Aug 8, 2015
1 parent 5b5c922 commit fed00ab
Show file tree
Hide file tree
Showing 8 changed files with 1,122 additions and 4 deletions.
12 changes: 12 additions & 0 deletions manpages.mk
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# Generated automatically -- do not modify! -*- buffer-read-only: t -*-

ovn/utilities/ovn-sbctl.8: \
ovn/utilities/ovn-sbctl.8.in \
lib/db-ctl-base.man \
lib/table.man \
ovsdb/remote-active.man \
ovsdb/remote-passive.man
ovn/utilities/ovn-sbctl.8.in:
lib/db-ctl-base.man:
lib/table.man:
ovsdb/remote-active.man:
ovsdb/remote-passive.man:

ovsdb/ovsdb-client.1: \
ovsdb/ovsdb-client.1.in \
lib/common-syn.man \
Expand Down
2 changes: 2 additions & 0 deletions ovn/utilities/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/ovn-ctl.8
/ovn-nbctl
/ovn-nbctl.8
/ovn-sbctl
/ovn-sbctl.8
13 changes: 11 additions & 2 deletions ovn/utilities/automake.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ scripts_SCRIPTS += \

man_MANS += \
ovn/utilities/ovn-ctl.8 \
ovn/utilities/ovn-nbctl.8
ovn/utilities/ovn-nbctl.8 \
ovn/utilities/ovn-sbctl.8

MAN_ROOTS += ovn/utilities/ovn-sbctl.8.in

EXTRA_DIST += \
ovn/utilities/ovn-ctl \
Expand All @@ -12,9 +15,15 @@ EXTRA_DIST += \

DISTCLEANFILES += \
ovn/utilities/ovn-ctl.8 \
ovn/utilities/ovn-nbctl.8
ovn/utilities/ovn-nbctl.8 \
ovn/utilities/ovn-sbctl.8

# ovn-nbctl
bin_PROGRAMS += ovn/utilities/ovn-nbctl
ovn_utilities_ovn_nbctl_SOURCES = ovn/utilities/ovn-nbctl.c
ovn_utilities_ovn_nbctl_LDADD = ovn/lib/libovn.la ovsdb/libovsdb.la lib/libopenvswitch.la

# ovn-sbctl
bin_PROGRAMS += ovn/utilities/ovn-sbctl
ovn_utilities_ovn_sbctl_SOURCES = ovn/utilities/ovn-sbctl.c
ovn_utilities_ovn_sbctl_LDADD = ovn/lib/libovn.la ovsdb/libovsdb.la lib/libopenvswitch.la
160 changes: 160 additions & 0 deletions ovn/utilities/ovn-sbctl.8.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,160 @@
.\" -*- nroff -*-
.de IQ
. br
. ns
. IP "\\$1"
..
.de ST
. PP
. RS -0.15in
. I "\\$1"
. RE
..
.TH ovn\-sbctl 8 "@VERSION@" "Open vSwitch" "Open vSwitch Manual"
.\" This program's name:
.ds PN ovn\-sbctl
.
.SH NAME
ovn\-sbctl \- utility for querying and configuring \fBOVN_Southbound\fR database
.
.SH SYNOPSIS
\fBovn\-sbctl\fR [\fIoptions\fR] \fB\-\-\fR [\fIoptions\fR] \fIcommand
\fR[\fIargs\fR] [\fB\-\-\fR [\fIoptions\fR] \fIcommand \fR[\fIargs\fR]]...
.
.SH DESCRIPTION
The command should only be used for advanced debugging and troubleshooting
of the \fBOVN_Southbound\fR database; and should never be used in normal
operation.
.PP
The \fBovn\-sbctl\fR program configures the \fBOVN_Southbound\fR database
by providing a high\-level interface to its configuration database. See
\fBovn\-sb\fR(5) for comprehensive documentation of the database schema.
.PP
\fBovn\-sbctl\fR connects to an \fBovsdb\-server\fR process that
maintains an OVN_Southbound configuration database. Using this
connection, it queries and possibly applies changes to the database,
depending on the supplied commands.
.PP
\fBovn\-sbctl\fR can perform any number of commands in a single run,
implemented as a single atomic transaction against the database.
.PP
The \fBovn\-sbctl\fR command line begins with global options (see
\fBOPTIONS\fR below for details). The global options are followed by
one or more commands. Each command should begin with \fB\-\-\fR by
itself as a command-line argument, to separate it from the following
commands. (The \fB\-\-\fR before the first command is optional.) The
command
itself starts with command-specific options, if any, followed by the
command name and any arguments.
.
.SH OPTIONS
.
The following options affect the behavior of \fBovn\-sbctl\fR as a
whole. Some individual commands also accept their own options, which
are given just before the command name. If the first command on the
command line has options, then those options must be separated from
the global options by \fB\-\-\fR.
.
.IP "\fB\-\-db=\fIserver\fR"
Sets \fIserver\fR as the database server that \fBovn\-sbctl\fR
contacts to query or modify configuration. The default is
\fBunix:@RUNDIR@/db.sock\fR. \fIserver\fR must take one of the
following forms:
.RS
.so ovsdb/remote-active.man
.so ovsdb/remote-passive.man
.RE
.
.IP "\fB\-\-no\-syslog\fR"
By default, \fBovn\-sbctl\fR logs its arguments and the details of any
changes that it makes to the system log. This option disables this
logging.
.IP
This option is equivalent to \fB\-\-verbose=sbctl:syslog:warn\fR.
.
.IP "\fB\-\-oneline\fR"
Modifies the output format so that the output for each command is printed
on a single line. New-line characters that would otherwise separate
lines are printed as \fB\\n\fR, and any instances of \fB\\\fR that
would otherwise appear in the output are doubled.
Prints a blank line for each command that has no output.
This option does not affect the formatting of output from the
\fBlist\fR or \fBfind\fR commands; see \fBTable Formatting Options\fR
below.
.
.IP "\fB\-\-dry\-run\fR"
Prevents \fBovn\-sbctl\fR from actually modifying the database.
.
.IP "\fB\-t \fIsecs\fR"
.IQ "\fB\-\-timeout=\fIsecs\fR"
By default, or with a \fIsecs\fR of \fB0\fR, \fBovn\-sbctl\fR waits
forever for a response from the database. This option limits runtime
to approximately \fIsecs\fR seconds. If the timeout expires,
\fBovn\-sbctl\fR will exit with a \fBSIGALRM\fR signal. (A timeout
would normally happen only if the database cannot be contacted, or if
the system is overloaded.)
.
.SS "Table Formatting Options"
These options control the format of output from the \fBlist\fR and
\fBfind\fR commands.
.so lib/table.man
.
.SH COMMANDS
The commands implemented by \fBovn\-sbctl\fR are described in the
sections below.
.SS "OVN_Southbound Commands"
These commands work with an \fBOVN_Southbound\fR database as a whole.
.
.IP "\fBshow\fR"
Prints a brief overview of the database contents.
.
.SS "Chassis Commands"
These commands manipulate \fBOVN_Southbound\fR chassis.
.
.IP "[\fB\-\-may\-exist\fR] \fBchassis\-add \fIchassis\fR \fIencap-type\fR \fIencap-ip\fR"
Creates a new chassis named \fIchassis\fR. The chassis will have
one encap entry with \fIencap-type\fR as tunnel type and \fIencap-ip\fR
as destination ip.
.IP
Without \fB\-\-may\-exist\fR, attempting to create a chassis that
exists is an error. With \fB\-\-may\-exist\fR, this command does
nothing if \fIchassis\fR already exists as a real bridge.
.
.IP "[\fB\-\-if\-exists\fR] \fBchassis\-del \fIchassis\fR"
Deletes \fIchassis\fR and its \fIencaps\fR and \fIgateway_ports\fR.
.IP
Without \fB\-\-if\-exists\fR, attempting to delete a chassis that does
not exist is an error. With \fB\-\-if\-exists\fR, attempting to
delete a chassis that does not exist has no effect.
.
.SS "Port binding Commands"
.
These commands manipulate \fBOVN_Southbound\fR port bindings.
.
.IP "[\fB\-\-may\-exist\fR] \fBlport\-bind \fIlogical\-port\fR \fIchassis\fR"
Binds the logical port named \fIlogical\-port\fR to \fIchassis\fR.
.IP
Without \fB\-\-may\-exist\fR, attempting to bind a logical port that
has already been bound is an error. With \fB\-\-may\-exist\fR, this
command does nothing if \fIlogical\-port\fR has already been bound to
a chassis.
.
.IP "[\fB\-\-if\-exists\fR] \fBlport\-unbind\fR \fIlogical\-port\fR"
Resets the binding of \fIlogical\-port\fR to \fINULL\fR.
.IP
Without \fB\-\-if\-exists\fR, attempting to unbind a logical port
that is not bound is an error. With \fB\-\-if\-exists\fR, attempting
to unbind logical port that is not bound has no effect.
.
.so lib/db-ctl-base.man
.SH "EXIT STATUS"
.IP "0"
Successful program execution.
.IP "1"
Usage, syntax, or configuration file error.
.IP "2"
The \fIbridge\fR argument to \fBbr\-exists\fR specified the name of a
bridge that does not exist.
.SH "SEE ALSO"
.
.BR ovn\-sb (5).
Loading

0 comments on commit fed00ab

Please sign in to comment.