Blame doc/nmstatectl.8.in

Packit Service 0535c1
.\" Manpage for nmstatectl.
Packit Service 0535c1
.TH nmstatectl 8 "@DATE@" "@VERSION@" "nmstatectl man page"
Packit Service 0535c1
.SH NAME
Packit Service 0535c1
nmstatectl \- A nmstate command line tool
Packit Service 0535c1
.SH SYNOPSIS
Packit Service 0535c1
.B nmstatectl show \fR[\fIINTERFACE_NAME\fR] [\fB--json\fR]
Packit Service 0535c1
.br
Packit Service 0535c1
.B nmstatectl set \fISTATE_FILE_PATH\fR [\fIOPTIONS\fR]
Packit Service 0535c1
.br
Packit Service 0535c1
.B nmstatectl edit \fR[\fIINTERFACE_NAME\fR] [\fIOPTIONS\fR]
Packit Service 0535c1
.br
Packit Service 0535c1
.B nmstatectl rollback \fR[\fICHECKPOINT_PATH\fR]
Packit Service 0535c1
.br
Packit Service 0535c1
.B nmstatectl commit \fR[\fICHECKPOINT_PATH\fR]
Packit Service 0535c1
.br
Packit Service 0535c1
.B nmstatectl version
Packit Service 0535c1
.SH DESCRIPTION
Packit Service 0535c1
.B nmstatectl\fR is created for users who want to try out nmstate without using
Packit Service 0535c1
\fIlibnmstate\fR.
Packit Service 0535c1
.PP
Packit Service 0535c1
.B show
Packit Service 0535c1
.RS
Packit Service 0535c1
Query the current network state. \fIYAML\fR is the default output format. Use
Packit Service 0535c1
the \fB--json\fR argument to change the output format to \fIJSON\fR. To limit
Packit Service 0535c1
the output state to include certain interfaces only, please specify the
Packit Service 0535c1
interface name. Please be advised, global config like DNS will be included.
Packit Service 0535c1
.PP
Packit Service 0535c1
For multiple interface names, use comma to separate them. You can also use
Packit Service 0535c1
patterns for interface names:
Packit Service 0535c1
.RS
Packit Service 0535c1
.B *\fR matches everything
Packit Service 0535c1
.br
Packit Service 0535c1
.B ?\fR matches any single character
Packit Service 0535c1
.br
Packit Service 0535c1
.B [seq]\fR matches any character in seq
Packit Service 0535c1
.br
Packit Service 0535c1
.B [!seq]\fR matches any character not in seq
Packit Service 0535c1
.RE
Packit Service 0535c1
.PP
Packit Service 0535c1
For example, to show all interfaces starts with eth:
Packit Service 0535c1
.RS
Packit Service 0535c1
nmstatectl show eth\\*
Packit Service 0535c1
.br
Packit Service 0535c1
# The backslash is required to stop shell expanding '*' to file names.
Packit Service 0535c1
.RE
Packit Service 0535c1
.RE
Packit Service 0535c1
.PP
Packit Service 0535c1
.B set
Packit Service 0535c1
.RS
Packit Service 0535c1
Apply the network state from specified file in \fIYAML\fR or \fIJSON\fR format.
Packit Service 0535c1
By default, if the network state after state applied is not identical to the
Packit Service 0535c1
desired state, \fBnmstatectl\fR rollbacks to the state before \fBset\fR
Packit Service 0535c1
command. Use the \fB--no-verify\fR argument to skip the verification.
Packit Service 0535c1
.RE
Packit Service 0535c1
.PP
Packit Service 0535c1
.B edit
Packit Service 0535c1
.RS
Packit Service 0535c1
.B nmstatectl\fR will invoke the text editor defined by environment variable
Packit Service 0535c1
\fIEDITOR\fR for editing the network state in \fIYAML\fR format. Once the text
Packit Service 0535c1
editor quit, \fBnmstatectl\fR will try to apply it using \fB"nmstatectl set"\fR.
Packit Service 0535c1
.br
Packit Service 0535c1
If there is any syntax error, you will be asked to edit again. Multiple
Packit Service 0535c1
interfaces are supported, check \fIshow\fR for detail.
Packit Service 0535c1
.PP
Packit Service 0535c1
By default, if the network state after state applied is not identical to the
Packit Service 0535c1
desired state, \fBnmstatectl\fR rollbacks to the state before \fBedit\fR
Packit Service 0535c1
command. Use the \fB--no-verify\fR argument to skip the verification.
Packit Service 0535c1
.RE
Packit Service 0535c1
.PP
Packit Service 0535c1
.B nmstatectl\fR supports manual transaction control which allows user to
Packit Service 0535c1
decide whether rollback to previous (before \fB"nmstatectl set/edit"\fR) state.
Packit Service 0535c1
.IP \fBrollback
Packit Service 0535c1
rollback the network state from specified checkpoint file. \fBnmstatectl\fR
Packit Service 0535c1
will take the latest checkpoint if not defined as argument.
Packit Service 0535c1
.PP
Packit Service 0535c1
.B commit
Packit Service 0535c1
.RS
Packit Service 0535c1
commit the current network state. \fBnmstatectl\fR will take the latest
Packit Service 0535c1
checkpoint if not defined as argument.
Packit Service 0535c1
.RE
Packit Service 0535c1
.B version
Packit Service 0535c1
.RS
Packit Service 0535c1
displays nmstate version.
Packit Service 0535c1
.SH OPTIONS
Packit Service 0535c1
.B --json
Packit Service 0535c1
.RS
Packit Service 0535c1
change the output format to \fIJSON\fR.
Packit Service 0535c1
.RE
Packit Service 0535c1
.IP \fB--no-verify
Packit Service 0535c1
skip the desired network state verification.
Packit Service 0535c1
.IP \fB--no-commit
Packit Service 0535c1
create a checkpoint which later could be used for rollback or commit. The
Packit Service 0535c1
checkpoint will be the last line of \fBnmstatectl\fR output, example:
Packit Service 0535c1
\fI/org/freedesktop/NetworkManager/Checkpoint/1\fR.
Packit Service 0535c1
.IP \fB--memory-only
Packit Service 0535c1
all the changes done will be non persistent, they are going to be removed after
Packit Service 0535c1
rebooting.
Packit Service 0535c1
.IP \fB--timeout\fR=<\fITIMEOUT\fR>
Packit Service 0535c1
the user must commit the changes within \fItimeout\fR, or they will be
Packit Service 0535c1
automatically rolled back. Default: 60 seconds.
Packit Service 0535c1
.IP \fB--version
Packit Service 0535c1
displays nmstate version.
Packit Service 0535c1
.SH LIMITATIONS
Packit Service 0535c1
*\fR Maximum supported number of interfaces in a single desire state is 1000.
Packit Service 0535c1
.SH BUG REPORTS
Packit Service 0535c1
Report bugs on nmstate GitHub issues <https://github.com/nmstate/nmstate>.
Packit Service 0535c1
.SH COPYRIGHT
Packit Service 0535c1
License LGPL-2.1 or any later version
Packit Service 0535c1
<https://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt>.
Packit Service 0535c1
.SH SEE ALSO
Packit Service 0535c1
.B NetworkManager\fP(8)