summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQuentin Monnet <quentin.monnet@6wind.com>2016-03-02 15:56:21 +0100
committerBen Pfaff <blp@ovn.org>2016-03-18 14:02:53 -0700
commite7019d994e9f2a7ec3354d318e2ce77fdb961ceb (patch)
tree11e2eb786af9483c660dfb6037ead1fc57a6be5e
parentb1c5bf1f39d32ed4c6dc5b752d17e0cd12b924e8 (diff)
downloadopenvswitch-e7019d994e9f2a7ec3354d318e2ce77fdb961ceb.tar.gz
ovs-ofctl: Update manpage for --color option.
Document the `--color` option for ovs-ofctl in its manpage. The option documentation has been added into a new file (included into the manpage) so that it can easily be added to other manpages as well when support for colorized output is extended to other utilities. The use of the environment variable OVS_COLORS (used for user-defined colors) has been documented as well. Signed-off-by: Quentin Monnet <quentin.monnet@6wind.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
-rw-r--r--lib/automake.mk1
-rw-r--r--lib/colors.man59
-rw-r--r--manpages.mk2
-rw-r--r--utilities/ovs-ofctl.8.in1
4 files changed, 63 insertions, 0 deletions
diff --git a/lib/automake.mk b/lib/automake.mk
index 1eeb5e48b..ea92a23b9 100644
--- a/lib/automake.mk
+++ b/lib/automake.mk
@@ -431,6 +431,7 @@ EXTRA_DIST += \
lib/db-ctl-base.xml
MAN_FRAGMENTS += \
+ lib/colors.man \
lib/common.man \
lib/common-syn.man \
lib/coverage-unixctl.man \
diff --git a/lib/colors.man b/lib/colors.man
new file mode 100644
index 000000000..12fa7a609
--- /dev/null
+++ b/lib/colors.man
@@ -0,0 +1,59 @@
+.de IQ
+. br
+. ns
+. IP "\\$1"
+..
+.IP "\fB\-\-color\fR[\fB=\fR\fIwhen\fR]
+.
+Colorize the output (for some commands); \fIwhen\fR can be \fBnever\fR,
+\fBalways\fR, or \fBauto\fR (the default).
+.
+.RS
+.PP
+Only some commands support output coloring. Color names and default
+colors may change in future releases.
+.PP
+The environment variable \fBOVS_COLORS\fR can be used to specify user-defined
+colors and other attributes used to highlight various parts of the output. If
+set, its value is a colon-separated list of capabilities that defaults to
+\fBac:01;31:dr=34:le=31:pm=36:pr=35:sp=33:vl=32\fR. Supported capabilities were
+initially designed for coloring flows from \fBovs-ofctl dump-flows\fR
+\fIswitch\fR command, and they are as follows.
+.RS
+.TP
+\fBac=01;31\fR
+SGR substring for \fBactions=\fR keyword in a flow.
+The default is a bold red text foreground.
+.TP
+\fBdr=34\fR
+SGR substring for \fBdrop\fR keyword.
+The default is a dark blue text foreground.
+.TP
+\fBle=31\fR
+SGR substring for \fBlearn=\fR keyword in a flow.
+The default is a red text foreground.
+.TP
+\fBpm=36\fR
+SGR substring for flow match attribute names.
+The default is a cyan text foreground.
+.TP
+\fBpr=35\fR
+SGR substring for keywords in a flow that are followed by arguments inside
+parenthesis.
+The default is a magenta text foreground.
+.TP
+\fBsp=33\fR
+SGR substring for some special keywords in a flow, notably: \fBtable=\fR,
+\fBpriority=\fR, \fBload:\fR, \fBoutput:\fR, \fBmove:\fR, \fBgroup:\fR,
+\fBCONTROLLER:\fR, \fBset_field:\fR, \fBresubmit:\fR, \fBexit\fR.
+The default is a yellow text foreground.
+.TP
+\fBvl=32\fR
+SGR substring for a lone flow match attribute with no field name.
+The default is a green text foreground.
+.RE
+.PP
+See the Select Graphic Rendition (SGR) section in the documentation of the text
+terminal that is used for permitted values and their meaning as character
+attributes.
+.RE
diff --git a/manpages.mk b/manpages.mk
index bf96e9ff4..d4d4f2161 100644
--- a/manpages.mk
+++ b/manpages.mk
@@ -134,6 +134,7 @@ lib/common.man:
utilities/ovs-ofctl.8: \
utilities/ovs-ofctl.8.in \
+ lib/colors.man \
lib/common.man \
lib/daemon.man \
lib/ofp-version.man \
@@ -142,6 +143,7 @@ utilities/ovs-ofctl.8: \
lib/vconn-active.man \
lib/vlog.man
utilities/ovs-ofctl.8.in:
+lib/colors.man:
lib/common.man:
lib/daemon.man:
lib/ofp-version.man:
diff --git a/utilities/ovs-ofctl.8.in b/utilities/ovs-ofctl.8.in
index 1b0718da4..91567827e 100644
--- a/utilities/ovs-ofctl.8.in
+++ b/utilities/ovs-ofctl.8.in
@@ -2968,6 +2968,7 @@ These options currently affect only \fBdump\-flows\fR output.
.SS "Public Key Infrastructure Options"
.so lib/ssl.man
.so lib/vlog.man
+.so lib/colors.man
.so lib/common.man
.
.SH "RUNTIME MANAGEMENT COMMANDS"