Candidate Commands

candidate

Syntax

candidate

Context

<root>

Description

This command enables the context to edit candidate configurations and must preface every command in the candidate CLI branch.

Commands in the candidate CLI branch, except for the edit command, are available only when in candidate edit mode.

Default

n/a

edit

Syntax

edit [exclusive]

Context

candidate

Description

This command enables the candidate edit mode where changes can be made to the candidate configuration and sets the edit point to the end of the candidate. The edit point is the point after which new commands are inserted into the candidate configuration. In candidate edit mode, the CLI prompt displays edit-cfg near the root of the prompt. All other commands in the candidate CLI branch are blocked until the user enters candidate edit mode.

The exclusive parameter allows the user to modify the candidate configuration and block all other users (and other sessions of the same user) from entering candidate edit mode. This parameter can only be used if the candidate configuration is empty and no user is already in candidate edit mode. Before quitting exclusive candidate edit mode, the user must either commit or discard their changes. If the user commits a candidate configuration with the confirmed option while in exclusive candidate edit mode, the exclusive lock is removed during the countdown time to allow any user to confirm the changes.

If the CLI session times out while the user is in exclusive candidate edit mode, the contents of the candidate configuration are discarded. If the user has the candidate configuration locked, the admin disconnect command can be used to forcibly disconnect them and to clear the contents of the candidate.

Default

n/a

Parameters

exclusive

enables exclusive candidate edit mode

commit

Syntax

commit [confirmed timeout] [comment comment]

commit no-checkpoint [confirmed timeout]

Context

candidate

Description

This command applies the changes in the candidate configuration to the active or operational configuration.

When a candidate configuration is committed, the confirmed keyword can be used to require an additional confirmation, which is useful when changes are being made that could impact management reachability to the router. The contents of the candidate configuration remain visible but cannot be edited until the timeout is completed or the commit is confirmed. If the confirmation is not given with the confirm command within the configured timeout period, the router automatically reverts to a configuration state before the candidate configuration changes were applied.

Standard line-by-line, non-transactional configuration commands (including via SNMP) are not blocked during the countdown period, but any changes made to the configuration during the countdown period are rolled back if the timeout expires.

A rollback revert is blocked during the countdown period until the commit has been confirmed.

If the commit operation is successful, all the candidate changes take operational effect and the candidate configuration is cleared. If there is an error processing the commit, or if the candidate confirm command is not issued and an auto-revert occurs, the router automatically reverts to a configuration state before the candidate configuration changes were applied. If the automatic reversion occurs, the candidate configuration is not cleared and users can continue to edit it and try the commit later.

By default, the 7705 SAR automatically creates a new rollback checkpoint after a successful commit operation that contains the new configuration changes made by the commit. The rollback checkpoint remains available even if the commit is not confirmed. The no-checkpoint keyword allows users to commit the candidate configuration without creating a rollback checkpoint.

A commit operation is blocked if a rollback revert is currently being processed.

Default

n/a

Parameters

confirmed

requires the confirm command to be issued before the end of the timeout period to avoid an auto-revert of the configuration

timeout

the auto-revert timeout period, in minutes

Values

1 to 168

no-checkpoint

blocks the creation of a rollback checkpoint for a successful commit

comment

a string up to 255 characters in length describing the automatic rollback checkpoint file

confirm

Syntax

confirm

Context

candidate

Description

This command is used to confirm a candidate configuration. If the optional confirmed parameter is used with the commit command, this command must be issued before the timeout period expires; otherwise, the router automatically reverts to a configuration state before the candidate configuration changes were applied. After the automatic reversion, the candidate configuration remains available for editing and a subsequent commit.

During the countdown, the contents of the candidate remain visible with the candidate view command but changes to the candidate are blocked until the timeout is completed or this command is issued.

This command also clears the contents of the candidate configuration and allows users to enter candidate edit mode again.

Default

n/a

copy

Syntax

copy [line]

Context

candidate

Description

This command copies the selected CLI branch, including all sub-branches, into a temporary buffer that can be used with a subsequent insert command. The contents of the temporary buffer are deleted when the operator exits candidate edit mode. Line numbers can be displayed with the candidate view command.

Default

edit-point

Parameters

line

specifies which line to copy

Values

line | offset | first | edit-point | last

line — the absolute line number

offset — the line relative to the current edit point, prefixed with either + or - to indicate before or after the current edit point

first — keyword to indicate the first line

edit-point — keyword to indicate the current edit point

last — keyword to indicate the last line that is not ‟exit”

delete

Syntax

delete [line]

Context

candidate

Description

This command deletes the selected CLI branch, including all sub-branches. The deleted lines are also copied into a temporary buffer that can be used with a subsequent insert command. Line numbers can be displayed with the candidate view command.

Default

edit-point

Parameters

line

specifies which line to delete

Values

line | offset | first | edit-point | last

line — the absolute line number

offset — the line relative to the current edit point, prefixed with either + or - to indicate before or after the current edit point

first — keyword to indicate the first line

edit-point — keyword to indicate the current edit point

last — keyword to indicate the last line that is not ‟exit”

discard

Syntax

discard [now]

Context

candidate

Description

This command deletes the entire contents of the candidate configuration and exits candidate edit mode. The undo command cannot be used to recover a candidate configuration that has been discarded with this command.

Default

n/a

Parameters

now

deletes the candidate configuration with no confirmation prompt for the discard

goto

Syntax

goto line

Context

candidate

Description

This command changes the edit point of the candidate configuration. The edit point is the point after which new commands are inserted into the candidate configuration as an operator navigates the CLI and issues commands in candidate edit mode. Line numbers can be displayed with the candidate view command.

Default

edit-point

Parameters

line

specifies which line is to be the edit point for the insertion of new commands

Values

line | offset | first | edit-point | last

line — the absolute line number

offset — the line relative to the current edit point, prefixed with either + or - to indicate before or after the current edit point

first — keyword to indicate the first line

edit-point — keyword to indicate the current edit point

last — keyword to indicate the last line that is not ‟exit”

insert

Syntax

insert [line]

Context

candidate

Description

This command inserts the contents of the temporary buffer (populated with a previous copy or delete command) into the candidate configuration. The operator can specify any line in the candidate configuration to be the insertion point, but by default, the contents are inserted after the current edit point. The contents of the temporary buffer are deleted when the operator exits candidate edit mode.

Insertions are context-aware. The temporary buffer always stores the CLI context (such as the current CLI branch) for each line deleted or copied. If the contents to be inserted are supported at the context of the insertion point, they are simply inserted into the configuration. If the contents to be inserted are not supported at the context of the insertion point, the following actions are automatically performed by the system:

  1. The context at the insertion point is closed using multiple exit statements.

  2. The context of the lines to be inserted is built (added) into the candidate configuration at the insertion point.

  3. The contents of the temporary buffer are added.

  4. The context of the inserted lines is closed using exit statements.

  5. The context from the original insertion point is rebuilt, leaving the context at the same point as it was before the insertion.

Line numbers can be displayed with the candidate view command.

Default

edit-point

Parameters

line

specifies where to insert the contents of the temporary buffer

Values

line | offset | first | edit-point | last

line — the absolute line number

offset — the line relative to the current edit point, prefixed with either + or - to indicate before or after the current edit point

first — keyword to indicate the first line

edit-point — keyword to indicate the current edit point

last — keyword to indicate the last line that is not ‟exit”

load

Syntax

load file-url[overwrite | insert | append]

Context

candidate

Description

This command loads a previously saved candidate configuration into the current candidate. The edit point is set to the end of the loaded configuration lines. The current candidate configuration cannot be modified while a load is in progress.

If the current candidate configuration is empty, this command loads the file into the candidate without requiring any of the optional parameters. If the current candidate is not empty, the user must specify overwrite, insert, or append.

Default

n/a

Parameters

file-url

the directory and filename to load

overwrite

discards the contents of the current candidate and replaces them with the contents of the file

insert

inserts the contents of the file at the current edit point

append

inserts the contents of the file at the end of the current candidate

quit

Syntax

quit

Context

candidate

Description

This command exits candidate edit mode. The contents of the current candidate configuration are not deleted and the user can continue editing them later.

Default

n/a

redo

Syntax

redo [count]

Context

candidate

Description

This command reapplies the changes to the candidate that were previously removed using the undo command. All undo or redo history is lost when the operator exits candidate edit mode.

The redo command is blocked if another user has made changes in a CLI branch that would be impacted during the redo operation.

Default

n/a

Parameters

count

specifies the number of previous changes to reapply

Values

1 to 50

Default

1

replace

Syntax

replace [line]

Context

candidate

Description

This command displays the specified line (a single line only) and allows it to be changed.

Line numbers can be displayed with the candidate view command.

Default

edit-point

Parameters

line

specifies the line to replace

Values

line | offset | first | edit-point | last

line — the absolute line number

offset — the line relative to the current edit point, prefixed with either + or - to indicate before or after the current edit point

first — keyword to indicate the first line

edit-point — keyword to indicate the current edit point

last — keyword to indicate the last line that is not ‟exit”

save

Syntax

save file-url

Context

candidate

Description

This command saves the current candidate configuration to a file.

Default

n/a

Parameters

file-url

specifies the directory and filename

undo

Syntax

undo [count]

Context

candidate

Description

This command removes the most recent changes done to the candidate. The changes can be reapplied using the redo command. The undo and redo history is lost when the operator exits candidate edit mode. This command cannot be used to recover a candidate that has been discarded with a candidate discard command.

This command is blocked if another user has made changes in any of the CLI branches that would be impacted during the undo operation.

Default

1

Parameters

count

specifies the number of previous changes to remove

view

Syntax

view [line]

Context

candidate

Description

This command displays the candidate configuration along with line numbers that can be used for editing the candidate configuration.

Default

edit-point

Parameters

line

displays the candidate configuration starting at the specified point

Values

line | offset | first | edit-point | last

line — the absolute line number

offset — the line relative to the current edit point, prefixed with either + or - to indicate before or after the current edit point

first — keyword to indicate the first line

edit-point — keyword to indicate the current edit point

last — keyword to indicate the last line that is not ‟exit”

management

Syntax

management cli

Context

config>system

Description

This command enables the CLI management context.

Parameters

cli

specifies the management context

configuration

Syntax

configuration

Context

config>system>management

Description

This command enables the CLI management configuration context.

immediate

Syntax

[no] immediate

Context

config>system>management>configuration

Description

This command controls whether CLI commands in the configure context can make changes to the running configuration.

If the command is enabled, any configuration changes are immediately applied to the running configuration.

The no form of this command blocks configuration changes to the running configuration, and the user must use candidate edit mode to modify the configuration.

Default

immediate