The MD-CLI tree contains the following elements from the Nokia YANG models:
The following terms are also used:
In the following example, admin-state (leaf name), enable (enumerated value), and connect-retry (leaf name) are keywords, and “800” is a variable parameter.
Managing the router configuration using the MD-CLI involves accessing and configuring the appropriate elements (containers, lists, leafs, and leaf-lists).
The MD-CLI tree shows the commands and parameters (also known as elements) that are available in a hierarchical output. In the following tree detail command output, the bold elements are containers (or container lists) which contain leafs (or leaf-lists).
The MD-CLI command prompt displays on two lines. The first line contains the following information:
For an explicit configuration workflow, the format of the first line is as follows:
<baseline status indicator > <uncommitted changes indicator> (<configuration mode>) [context]
Examples:
For an implicit configuration workflow, the format of the first line is as follows:
<baseline status indicator > <uncommitted changes indicator> [<configuration mode>:context]
Examples:
The second line contains the following information:
The format of the second line is as follows:
CPM:user@name#
The following examples display the two-line prompt in different modes.
The environment configuration for the MD-CLI is available in both the classic CLI and in the MD-CLI, but the configuration applies only to MD-CLI sessions.
In the MD-CLI, environment variables are found under the context configure system management-interface cli md-cli:
In the classic CLI, the same variables are found in the same context as follows:
Changes made to the environment configuration apply only to new sessions and do not affect current sessions.
Refer to the MD-CLI Command Reference Guide for information about the environment commands in the MD-CLI.
The environment can be customized for all sessions in the configuration under the configure system management-interface cli md-cli environment context, or per session using the environment command. When a new MD-CLI session is started, the per-session environment configuration is copied from the global environment configuration. Changes made to the global environment configuration after the session begins apply only to new sessions and do not affect current sessions. Changes made to the environment parameters for a session apply only for that session.
The per-session environment is accessed by entering environment at the operational root or with /environment from any other mode or context. Changes made in the per-session environment are immediate.
The info command displays the difference between the per-session environment and the configured global environment parameters. Therefore, for a new MD-CLI session, the info command has no output, as the per-session environment is the same as the global environment. The info detail command displays the current values in the global environment for all parameters.
As the default setting of the environment configuration, the uncommitted changes indicator is displayed as part of the command prompt. This setting can be modified per session or it can be changed for all MD-CLI sessions by changing the environment configuration.
The uncommitted-changes-indicator command under the environment prompt context suppresses or displays the change indicator for an MD-CLI session. Environment changes are applied immediately and are lost when the session disconnects.
By default, a blank line precedes the command prompt. This setting can be modified for each MD-CLI session.
The newline command under the environment prompt context suppresses or displays a new line before the prompt.
By default, the context is displayed in the command prompt. This setting can be modified for each MD-CLI session.
The context command under the environment prompt context suppresses or displays the current context.
By default, the timestamp is not displayed before the command prompt. This setting can be modified for each MD-CLI session.
The timestamp command under the environment prompt context suppresses or displays the timestamp.
The environment time-display command configures the time zone display to UTC or local time (as configured in configure system time).
The environment time-format command specifies the format for the time display.
The following shows the time in the format as defined by ISO 8601:
The following shows the time in the format as defined by RFC 1123:
The following shows the time in the format as defined by RFC 3339:
The progress indicator appears on the line immediately following the command and disappears when the MD-CLI command completes or when output is available to display. The indicator is a display of dynamically changing dots.
The delay interval can be configured with the delay command or the indicator can be disabled with the admin-state disable command under the environment progress-indicator context. For example, the user can disable the progress indicator for logged sessions.
The environment more command enables pagination when configured to true and disables pagination when configured to false. With pagination enabled, the display output can be paused and continued, based on the “Press Q to quit, Enter to print next line or any other key to print next page” message at the bottom of the screen.
The pagination setting can be overridden by using | no-more for a single command. As with pagination disabled, the output is displayed completely without any prompts to continue.
The default size for a console window is 24 lines long by 80 characters wide. The environment console command can be used to change these settings.
The INFO: CLI messages are displayed by default. The environment message-security-level command suppresses the INFO messages by changing the setting to warning.
Following are examples of INFO: CLI messages that are suppressed when the setting is changed to warning:
The environment datastore is subject to AAA command authorization. A user can be prevented from modifying the global environment settings or the per-session environment settings, or both.
In the following configuration output, entry 113 blocks user “tstuser” from modifying the global environment settings. In addition, entry 114 prevents the user from changing the per-session environment settings.
A short help description is displayed immediately when the question mark (?) is entered (without needing to press Enter). The following displays help from the operational root level.
The ? help is context-sensitive. The following ? help output lists additional commands available in exclusive configuration mode.
The help results may depend on the cursor position. The following example shows the router command syntax, followed by available commands after entering the router context.
In the following ? output, similar information is shown, with more details provided for configuring the router command, including the allowable string length and default value for the command.
Table 2 describes the meaning of the indicators displayed in the online help.
Symbol | Description |
+ | Indicates a container or list |
- | Indicates a leaf, a leaf-list, a list or container with no leafs, or a global command (if in the operational root) |
^ | Indicates a mandatory element (an element that must be configured before the configuration is considered valid) |
: | Indicates the first element of a group of choice elements that are mutually exclusive with other choice elements |
In the following help display example, the containers are eth-cfm, domain, and association. The leafs are apply-groups, dns, format, level, mac, md-index, and name, while level is also a mandatory element.
When online help is entered for a leaf or leaf-list, a short description of the element is displayed after the element type. The valid input values for the element are also listed, as shown in the following examples.
The description string for the VPRN service can have a length of 1 to 80 characters:
The ? help for the autonomous-system parameter lists the valid number range, followed by a short description of the parameter:
A parameter value may have a unit type associated with it, as shown in the following example of the ingress-buffer-allocation parameter:
This example shows a parameter that is a reference to another parameter. The owner command refers to the script policy name that is configured through the configure system script-control script-policy context. The name is a string of 1 to 32 characters.
An immutable element can only be configured in the transaction in which the parent element is created. It cannot be modified while the parent element exists. Any modification to an immutable element in model-driven interfaces causes SR OS to automatically delete the parent element and recreate it with the new value for the immutable element.
Immutable elements are identified in the online help, as seen in the following examples:
Immutable elements also exist in the classic CLI. They are parameters that are on the command line with the create keyword. For example, in the following classic CLI command, all the parameters shown on the command line are immutable. These parameters cannot be changed without deleting and recreating the service.
Elements that are part of a choice are listed in a separate section in the online help. Mandatory choices are listed first. Each choice contains a set of mutually exclusive elements or groups of elements. The first element of a group is indicated with a colon (:).
The following example shows a set of two mutually exclusive choice elements for an ingress queue rate. If configuring one of the choice elements, either the cir and fir values can be configured or the police value.
The following help display is an example of optional indicators.
The square brackets ([]) around slot-number indicate that the slot-number keyword is optional when entering the command.
The card context can be entered as:
or
Angle brackets (<>) indicate a variable name and the pipe (|) indicates a choice. For the sub-group command, a number in the range of 1 to 8 can be entered, or one of the keywords auto-iom or auto-mda.
For an overall view of the configuration commands available in the MD-CLI, refer to the MD-CLI Command Reference Guide.
The commands in Table 3 are available at the operational root level of the MD-CLI hierarchy.
Command | Description |
admin | Enter the administrative context for system operations |
clear | Clear statistics or reset operational state |
configure | Enter the configuration context |
environment | Enter the environment configuration context |
li | Enter the lawful intercept configuration context |
show | Show operational information |
tools | Enter the tools context for troubleshooting and debugging |
The global commands in Table 4 are available from various levels of the MD-CLI hierarchy.
Command | Description |
back | Move back one or more levels |
delete | Delete an element from the candidate datastore |
edit-config | Enter a candidate configuration mode |
enable | Enable administrative mode |
exec | Execute commands from a file |
exit | Return to the previous context or to the operational root |
history | Show the most recently entered commands |
logout | Exit the CLI session |
oam | Perform OAM tests. See Using the oam Commands. |
ping | Trigger ping of an IP address or DNS name. See Using the ping Command. |
pwc | Show the present working context. See pwc under Navigating the MD-CLI Hierarchy Levels. |
quit-config | Leave the candidate configuration mode |
top | Move to the top level of the context |
traceroute | Determine the route to a destination address. See Using the traceroute Command. |
tree | Show the command tree under the present working context |
Table 5 lists configuration commands that are available in configuration mode.
Command | Description |
commit | Commit changes to the running datastore |
compare | Show changes between datastores |
discard | Discard changes in the candidate datastore |
info | Show the running configuration from the present working context |
load | Load a configuration from a file |
rollback | Rollback to a previous configuration |
update | Update the candidate baseline |
validate | Validate changes in the candidate datastore |
Use the ping command in the MD-CLI to verify the reachability of a host. The syntax is as follows:
Example command output:
Table 6 describes the parameters of the ping command.
Ping Parameter | Description |
[destination-address] {ip-address | string} | IP address or DNS name of the remote host to ping, where the IP address can be one of:
|
bypass-routing | Bypass the routing table when sending the ping request to a host on a directly-attached network; return an error if the host is not on a directly-attached network |
count number | Number of ping requests to send to the remote host |
do-not-fragment | Do not fragment the request frame, which is particularly useful in combination with the size parameter for maximum MTU determination (does not apply to ICMPv6) |
fc keyword | Forwarding class options for the transmitted ICMP Echo Request packet:
|
interface string | Interface name |
interval {number | decimal-number} | Time between consecutive ping requests |
next-hop-address {ipv4-address | ipv6-address} | Disregard the routing table and send the packet to the specified next hop address, which must be on an adjacent router attached to a common subnet |
output-format keyword | Keyword options are:
|
pattern {keyword | number} | 16-bit pattern string to include in the packet (expressed as a decimal integer) or a system-generated sequential pattern (using the keyword sequential) |
router-instance string | Router name, CPM router instance, or service ID |
size number | Size of request packets, including the ICMP header data (8 bytes) and the ICMP payload of the ICMP Echo Request packets |
source-address {ipv4-address | ipv6-address} | Source IP address used in the ICMP Echo Request packets |
subscriber string | Subscriber ID used when sending ICMP Echo Request packets |
timeout number | Time to wait for reply packet. The timer is started when the last ICMP Echo Request is sent. |
tos number | Type-of-Service (ToS) bits in the IP header of the ICMP Echo Request packets |
ttl number | Time To Live (TTL) value included in the ICMP Echo Request packets |
Use the traceroute command in the MD-CLI to display the route that packets take to a specified host.
Example command output:
Table 7 describes the parameters of the traceroute command.
Traceroute Parameter | Description |
[destination-address] {ip-address | string} | Destination IP address or DNS name, where the IP address can be one of:
|
detail | Display the MPLS label stack information (if available) |
numeric | Avoid looking up DNS names when displaying results |
router-instance string | Router name, CPM router instance, or service ID |
source-address {ipv4-address | ipv6-address} | Source address of the probe packets; return an error If the IP address is not one of the device’s interfaces |
tos number | ToS bits in the IP header of the probe packets |
ttl number | TTL value included in the traceroute request |
wait number | Time to wait for a response to a probe |
The following oam commands are available in the MD-CLI.
The following commands issue Ethernet in the First Mile (EFM) OAM loopback tests on the specified port.
Table 8 describes the parameters of the available OAM EFM commands.
EFM Parameter | Description |
local-loopback {start | stop} port-id {ethernet-satellite-client-port | connector-port | port | pxc-sub-port} | Start or stop the local loopback test on the specified port |
remote-loopback {start | stop} port-id {ethernet-satellite-client-port | connector-port | port | pxc-sub-port} | Start or stop the remote loopback test on the specified port |
The following command issues an Ethernet Connectivity Fault Management (ETH-CFM) test. The implementation supports a single ETH-TST PDU to check unidirectional reachability launched from a source Maintenance Association End Point (MEP) and terminated on the remote MEP with no response PDU toward the source.
The following command issues a linktrace test.
The following command issues a loopback test.
The following command issues an Ethernet CFM one-way delay test.
The following command issues an Ethernet CFM two-way delay test.
The following command issues an Ethernet CFM two-way SLM test in SAA.
Table 9 describes the parameters of the available OAM ETH-CFM commands.
ETH-CFM Parameter | Description |
mac-address | number | Unicast destination MAC address or the remote MEP ID of the peer within the association. For an ETH-CFM loopback test, the MAC address can be a multicast MAC address. |
multicast | Build the class 1 destination multicast address based on the level of the local MEP. The last nibble of the multicast address must match the level of the local MEP or the command fails and the test is not instantiated. |
mep-id number | Local MEP ID |
md-admin-name reference | Referenced domain name |
ma-admin-name reference | Referenced association name |
data-length number | Size of the padding to be added to the frame |
interval number | Time between probes within the test run |
lbm-padding number | Size of the data portion of the data TLV which does not allow for an optional octet string. MSDU is not processed with this option. The lbm-padding and size options are mutually exclusive. |
priority number | Priority of the frame, which can be manipulated by QoS policies |
send-count number | Number of messages to send |
size number | Size of the data portion of the data TLV allowing for an optional octet string to be specified. The size and lbm-padding options are mutually exclusive. |
timeout number | Time that the router waits for a message reply after sending a message request. Upon expiration of the timeout, the router assumes that the message response is not received. Any response received after the timeout is silently discarded. |
ttl number | Time to Live for a returned linktrace |
The following command issues an on-demand OAM Performance Monitoring (OAM-PM) test.
Table 10 describes the parameters of the available OAM-PM commands.
OAM-PM Parameter | Description |
action {start | stop} | Start or stop an OAM-PM test |
session reference | Referenced OAM-PM session name |
test-type {dm | dmm | lmm | slm | twamp-light } | Test type
|
The following commands can be used to navigate the MD-CLI hierarchy (context) levels:
The tree command displays the command tree under the present working context, excluding the present working context element. Hierarchy is indicated with a pipe (|), and a “+-- “ separator precedes each element. The tree output is in alphabetical order of elements.
The flat option displays the command hierarchy under the present working context on one line, excluding the present working context element.
The detail option displays all key and field values in the output on every line.
The flat and detail options can be combined in any order.
Table 11 lists the control characters and keystrokes available to execute and edit commands.
Command | Description |
/ (Slash) | Return to the operational root (equivalent to exit all) if used without parameters. Navigate into context or set the value and remain in current context if used at the beginning of a line (equivalent to exit all, and then the command) |
} (Closing Brace) | Go back one level |
CTRL-z | Return to operational root. If using CTRL-z after a command, return to the operational root after executing the command (equivalent to pressing Enter after the command and exit all after the command has executed). |
CTRL-c | Stop the current command |
CTRL-d | Delete the current character |
CTRL-w | Delete the word up to the cursor |
CTRL-h | Delete the current character and move the cursor left |
CTRL-u | Delete text up to the cursor and preserve the character under the cursor |
CTRL-k | Delete the text after the cursor, without preserving the character under the cursor |
CTRL-a (or Home) | Move to the beginning of the line |
CTRL-e (or End) | Move to the end of the line |
CTRL-p (or Up arrow) | Display prior command from history |
CTRL-n (or Down arrow) | Display next command from history |
CTRL-b (or Left arrow) | Move the cursor one space to the left |
CTRL-f (or Right arrow) | Move the cursor one space to the right |
ESC+b | Move back one word, or to the beginning of the current word if the cursor is not at the start of the word |
CTRL-l | Clear the screen |
Variables, keywords, global commands, and configuration commands and units are separated by a blank line in the output, in the following order:
The ? help displays similar information but does not always display global or configuration commands.
When a command that is part of a choice of commands is entered at the MD-CLI command prompt, the other mutually exclusive commands are no longer available to be entered on the same prompt line. Other commands that are not associated with the particular choice commands are still available.
In the following example, the cir and fir commands are mutually exclusive with the police command. If either the cir or fir command is entered, the police command is not available. The pir command is available regardless of which choice command is entered.
Similarly, if the police command is entered, the cir and fir commands are unavailable on the same command prompt line.
The MD-CLI supports both command abbreviation and command completion. When typing a command, Tab, Spacebar, or Enter invokes auto-completion. If the text entered is enough to match a specific command, auto-completion completes the command. If the text entered is not sufficient to identify a specific command, pressing Tab or Spacebar displays options in alphabetical order matching the text entered.
The environment command-completion command controls what keystrokes can trigger command completion. Each keystroke is independently controlled with its own Boolean value.
Note: If Spacebar completion has multiple matches and also matches an keyword, the space is considered a separator and auto-completion is not triggered.
|
Variable parameter completion works only with the Tab key. All configured variables from the candidate and running configuration datastores are displayed. Line wrapping may occur for variables with long names. Parameters are displayed in alphabetical or numerical order. The variable parameter name is always displayed as the first line. In the following example, “interface-name” is the variable parameter name and “int-1” and “system” are configured names.
Some list elements have a default keyword defined, such as the router command, where the default keyword is “Base”. When the command completion parameters (enter, space, and tab) are at their default settings (true), and the initial input matches an element in the list and a unique command keyword, the matching keyword is completed instead of the variable.
For example, the router command has a default keyword defined as “Base”. If router “bf” is created using the command configure router “bf” (with quotation marks”), and there is an existing bfd command context, the variable completion is as follows.
The following displays for router+Spacebar+Tab:
The following displays for router bf+Tab:
Entering router bf+Enter completes to router bfd and enters the router “Base” bfd context:
Similarly, router bf+Spacebar completes to router bfd and enters the router “Base” bfd context when Enter is pressed:
To enter the context for router “bf”, use quotation marks to specify the variable:
If the command completion for enter is set to false, then router bf+Enter allows the match to router “bf”. Similarly, when the command completion for space is false, router bf+Spacebar also matches to router “bf” instead of the bfd context
For keyword-based leaf-lists, command completion displays all possible values, not only those that are configured. When deleting values in a leaf-list, only the values that are currently configured are displayed. In the following example, when defining the forwarding traffic classes, all keyword values are listed. When deleting the forwarding traffic classes, only the configured classes are displayed.
The explicit use of the keyword true for a Boolean element is optional. If neither true or false is entered, the keyword true is assumed.
When Tab is used for command completion with Boolean elements, the values of false and true are displayed, along with the names of possible elements that can follow. In the following example of the environment more command, the commands command-completion, console, message-severity-level, and so on, can be defined following the more command.
A single idle timeout applies to all CLI engines in a CLI session (classic and MD-CLI). The idle timeout can be modified to a value between 1 and 1440 minutes.
The following points apply.
A warning message is displayed when a session reaches one-half the value of the idle timeout, and another message is displayed when the idle timeout expires.
The idle timeout configured in the classic CLI affects all new sessions as well as the current session. However, the current session is only affected if the classic CLI engine is active when the idle timeout expires. Configuration changes via the MD-CLI or any other interface, including SNMP, only affect new sessions that begin after the change.
Output modifiers provide support for post-processing of CLI output. Output modifiers are specified using a pipe (|) character. The following points apply when using output modifiers.
The following options are supported for use with the pipe (|) match command:
The following example matches on the pattern autonomous-system in the tree detail under the configure router “Base” context, and starts the display with seven lines preceding the pattern match.
Regular expressions (REs) used by the MD-CLI engine are delimited by apostrophes (‘); for example, ‘.*’. REs cannot be delimited by double quotation marks (“); for example, “.*”.
MD-CLI REs are based on a subset of The Open Group Base Specifications Issue 7 and IEEE Std 1003.1-2008, 2016 Edition REs, as defined in chapter 9. MD-CLI REs only support Extended Regular Expression (ERE) notation as defined in section 9.4. Basic Regular Expression (BRE) notation as defined in section 9.3 is not supported.
In ERE notation, a backslash (\) before a special character is treated as a literal character. Backslashes are not supported before ( ) or { }, as they are in BREs to indicate a bracket expression or marked expression.
Table 12 describes the special characters that are supported in EREs.
Special character | Description |
. | Matches any single character |
* | Matches the preceding expression zero or more times |
? | Matches the preceding expression zero or one time |
+ | Matches the preceding expression one or more times |
[ ] | Matches a single character within the brackets |
[^] | Matches a single character not within the brackets |
^ | Matches the starting position |
$ | Matches the ending position |
( ) | Defines a marked subexpression |
{m,n} | Matches the preceding expression at least m and not more than n times |
{m} | Matches the preceding expression exactly m times |
{m, } | Matches the preceding expression at least m times |
{ ,n} | Matches the preceding expression not more than n times |
| | Matches either expression preceding or following the | |
\ | Treats the following character as a match criterion |
- | Separates the start and end of a range |
The following examples show the use of a bracket expression as a matching list expression.
The first output does not use any match expressions and therefore shows the entire output.
In this matching list expression, a match is any single character in the bracket expression, which in this case is 1, 3, or 5.
In this non-matching list expression, a match is any single character not in the bracket expression, that is, not 1, 2, or 4.
The range operator (-) can be used in a matching or non-matching list expression.
The alternation operator (|) can be used with or without a bracket expression to match against two or more alternative expressions.
Without a bracket expression, an exact match is attempted against two or more alternative expressions.
MD-CLI REs match on the output format of an element, as shown in the configuration. For example, if the value of an element is shown in hexadecimal in info output, a decimal RE will not match the value. In the following example, the Ethertype is entered in decimal format, but is displayed in hexadecimal. Matching on the decimal format does not find a match.
MD-CLI REs are not implicitly anchored. The ^ or $ anchoring special characters can be used, as in the following example.
This example uses the ^ anchor character to match on “group” preceded by four spaces at the beginning of the line.
This example uses the ^ anchor character to match on “group” preceded by eight spaces at the beginning of the line.
In the following configuration example using the compare command, the | match option filters out those commands to be deleted (configuration statements beginning with the minus sign (-)) and those to be added (configuration statements beginning with the plus sign (+)).
The backslash (\) is used to match the literal “+” character that denotes additions to the configuration seen in the compare command.
A character class expression is expressed as a character class name enclosed within bracket colon (“[:” and “:]”) delimiters. Table 13 defines the character class expressions.
Character Class | Characters matched (delimited by ‘single quotation marks’) | Description |
[:alnum:] | ‘ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz 0123456789’ | Alphanumeric characters |
[:alpha:] | ‘ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz’ | Alphabetic characters |
[:blank:] | ‘ \t’ | Space and Tab |
[:cntrl:] | ‘\007\b\t\n\v\f\r\1\2\3\4\5\6\16\17\20 \21\22\23\24\25\26\27\30 \31\32\33\34\35\36\37\177’ | Control characters |
[:digit:] | ‘0123456789’ | Digits |
[:graph:] | ‘ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz 0123456789 !\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~’ | Visible characters |
[:lower:] | ‘abcdefghijklmnopqrstuvwxyz’ | Lowercase letters |
[:print:] | ‘ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz 0123456789!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~ ’ | Visible characters and the Space character |
[:punct:] | ‘!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~’ | Punctuation characters |
[:space:] | ‘\t\n\v\f\r ‘ | Whitespace (blank) characters |
[:upper:] | ‘ABCDEFGHIJKLMNOPQRSTUVWXYZ’ | Uppercase letters |
[:xdigit:] | ‘0123456789ABCDEFabcdef’ | Hexadecimal digits |
Character class expressions must be enclosed within brackets. The expression ‘[[:digit:]]’ is treated as an RE containing the character class “digit”, while ‘[:digit:]’ is treated as an RE matching “:”, “d”, “i”, “g”, or “t”.
Collating symbols and equivalence classes are not supported in MD-CLI REs.
The | count option displays the line count of the output.
Note: Error messages are not processed by output modifiers. They are always displayed and are not affected by the count or match modifiers. |
The | no-more option displays the output with pagination disabled. This option is similar to the environment more false setting, where the entire output text is printed without page interruptions.
The > option can be used to redirect output to a local or remote file. The > redirect must be specified at the end of a command and cannot be combined with other redirects.
Configuring a container navigates into the context. In the following example, the first container is router, and the next is aggregates. All containers are marked with a “+”.
Alternatively, the same context can be entered on one line:
Configuring a leaf element maintains the present working context if there is no explicit opening brace. Entering an explicit opening brace navigates into the specified context.
Configuring a container navigates into the context.
Configuring an empty container or a list where the only children are keys does not navigate into the context. These elements are displayed with aggregated braces with a space ({ }) on the same line. It is possible to enter the element name with an opening brace; however, no options are available in this context.
For example, configuring the list element sdp-include with a key of “ref_group_name” does not change the existing context.
The back and top commands are used to navigate contexts, but it is also possible to use closing braces (}) to navigate.
The behavior of an explicit closing brace depends on the contents of the current command line. If the command line contains an explicit opening brace, the closing brace exits to the parent context of the opening brace.
In the following example with an opening brace on the command line, the closing brace exits VPRN 1, and then enters the context of VPRN 2.
In the following example without an opening brace on the command line, the first closing brace exits interface “int1”, and the second closing brace exits VPRN 1 and enters the VPRN 2 context.
The exec command executes commands from a file as if the user typed or pasted the input into the MD-CLI without command completion. The syntax can be seen as follows:
The exec command:
The system executes the file as follows:
When using commands that switch between CLI engines within an executable file, the following commands are recommended:
Note:
|
The info command shows the configuration for the present context. The command can only be executed while in a configuration mode. By default, all configured parameters in the candidate configuration datastore are displayed.
Table 14 describes the info command options.
Option | Description |
[from] (candidate | running | baseline) | Specify the source datastore (default is from candidate). This option is not supported for state elements. |
converted | Include converted configuration values from third party models. This option should only be used in the configure region when third party models are used. The output with this option is the same as info when used in other configuration regions. This option is not supported for state elements. |
detail | Include default and unconfigured values |
inheritance | Include configuration inherited from configuration groups. This option should only be used in the configure region. The output with this option is the same as info when used in other configuration regions. This option is not supported for state elements. |
units | Include unit types for applicable elements |
flat | Show the hierarchy on each line starting from the present working context |
full-context | Show the full hierarchy on each line |
json | Show the output in indented JSON format |
Note: As indicated in the choice statement, the flat, full-context, and json options are mutually exclusive. Other unsupported combinations include:
|
The order of the configuration output is as follows:
The following displays configured information for configure router bgp
The following output displays the same information in JSON format:
The configuration output can display all elements that are configured, even if an element is set to the system default state or value.
The detail option displays all data for the context, including default configurations.
The double hash (##) indicates an unconfigured element or a dynamic default.
When using the info command with both detail and json options, the output does not include unconfigured elements. Unconfigured elements in the MD-CLI are denoted with ##, and there is no standard method of supplying comments within the JSON format.
The flat option displays the context of every element in the present working context on a single line. Braces ensure that the context stays in the present working context for copy and paste purposes.
The full-context option displays the full context of every element from the present working context on a single line.
The info command always displays all keys of the list on the same line. The first key of a list is unnamed in the MD-CLI, however, there are exceptions where the key is named and must be entered. (Refer to the online help for the correct syntax of the command, or the MD-CLI Command Reference Guide.) All other keys are named. For example, the collector list has two keys, ip-address and port. The name of the first key, ip-address, does not appear in the info display. The name of the second key and any subsequent keys are always displayed.
The classic CLI show commands can be used in the MD-CLI as well as in the classic CLI, in the following ways:
Classic CLI commands that are accessible in the MD-CLI show outputs of the same information and provide the same functionality in the MD-CLI as they do in the classic CLI. No additional outputs or enhancements are included in the MD-CLI.
Note: Follow the classic CLI context when using the show command. For example, route policy information is displayed using the show router policy command in both the MD-CLI and classic CLI engines, even though this information is configured in the configure policy-options context in the MD-CLI and in the configure router policy-options context in the classic CLI. |
The following classic CLI show commands are currently blocked in the MD-CLI:
The show command in the MD-CLI is applicable only in the operational root []. The /show command can be used from the root or any configuration context.
Output modifiers (match, count, and no-more) can also be used with the show command. See Using Output Modifiers in the MD-CLI.
The admin commands are available only in the operational mode of the MD-CLI, or they can be executed with /admin from a configuration branch.
See the MD-CLI Command Reference Guide for information about the admin commands in the MD-CLI.
The following outputs show the admin show configuration command for the default configuration region (configure).