Blame doc/nmstatectl.8.in

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