Vyatta documentation

Learn how to install, configure, and operate the Vyatta Network Operating System (Vyatta NOS) and Orchestrator, which help drive our virtual networking and physical platforms portfolio.

Discard configuration changes — discard

An example that shows how to use the discard command to discard changes that you made to the candidate configuration in your current session.

Rather than delete many specific changes, you can abandon all changes that you made within a configuration session. You can do this with the discard command, or with the exit command plus the discard option.

The discard command gives the same result as if you delete all of the changes that you've made in your current configuration session.

For example, here we have a candidate configuration in which you added non-mandatory address and description nodes.

user@system# show interfaces dataplane dp0p1p1
+address 192.0.2.21/24
+description "This is a test"
 hw-id 00:13:46:e6:f6:87
[edit]
user@system#

You can discard all such changes with a single discard command.

  1. Discard all changes that you made in your current configuration session.
    user@system# discard
    
    Changes have been discarded
    [edit]
    user@system# 

    Notice also that after the discard command has run you are still in configuration mode.

  2. Optional: Show the configuration.
    user@system# show interfaces dataplane dp0p1p1
    
     hw-id 00:13:46:e6:f6:87
    [edit]
    user@system#

    Notice that the non-mandatory configuration nodes that you added are no longer present.