Editing the running configurationΒΆ
The edition model is transactional. The running configuration is first fetched locally. This local copy, called staging configuration, can be modified locally, then committed. The running configuration can be set as startup configuration.
Enter into the edition mode with:
vsr> edit running
vsr running config#
In edition mode, the prompt is composed of:
the hostname,
the name of the configuration being edited (here
running
),the path of the current node in the configuration tree (here
/
, which means we are at the root),a
#
, meaning we are in the edition mode.
After each command, the staging configuration is validated. A !
is displayed
at the end of the prompt when it is invalid regarding the constraints defined in
the YANG model.
By default, the validation is not done when the CLI detects that other commands
are pending in the input buffer. This optimizes the loading of large configurations
(thousands of objects). This behavior is customizable from the cliconfig
context,
by changing validate-after-edit
to always
or never
. When the configuration
is modified without being validated, a ?
is displayed at the end of the prompt.
The validate
command can then be used to check what is invalid in the
configuration:
vsr running interface# physical eth1
vsr running physical eth1#! validate
ERR ly Missing required element "port" in "physical".
Invalid configuration.
vsr running physical eth1#! port pci-b0s2
vsr running physical eth1#
In edition mode, the user can:
modify the staging configuration (ex:
vrf main ssh-server
)show the staging configuration (ex:
show config
)commit the changes (ex:
commit
)commit the changes without checking for conflict with another commit (ex:
commit force
)commit the changes with a description (ex:
commit description "Configure interface eth0"
)commit the changes with confirmation (ex:
commit confirmed period 60 persist-id 1
)cancel a (confirmed) commit: (ex:
cancel
orcancel persist-id 1
)confirm a (confirmed) commit (ex:
confirm
orconfirm persist-id 1
)discard the changes (ex:
exit
)display the help of a command (ex:
help show
)retrieve the state of the device (ex:
show state
)update the startup configuration of the device (
copy running startup
)send commands (ex:
cmd reboot
)