The MD-CLI tree contains the following elements from the Nokia YANG models:
container
This is an element that contains other elements.
In the following example, tcp-keepalive and gnmi are containers.
tcp-keepalive {
admin-state disable
idle-time 600
interval 15
retries 4
}
gnmi {
admin-state enable
auto-config-save false
}
list
This is a sequence of list entries.
In the following example, the entire set of interfaces is a list.
group "group-1" {
connect-retry 600
keepalive 33
}
group "group-2" {
description "Text description for group-2"
local-preference 8
}
list entry
This is an element similar to a container with multiple instances where each list entry is identified by the values of its keys.
In the following example, group ‟group-2” is identified in this way.
router "Base" {
bgp {
group "group-1" {
connect-retry 600
keepalive 33
}
group "group-2" {
description "Text description for group-2"
local-preference 8
}
}
}
key
This is a unique identifier for a list entry.
In the following example, ‟group-1” and ‟group-2” are unique identifiers.
router "Base" {
bgp {
group "group-1" {
connect-retry 600
keepalive 33
}
group "group-2" {
description "Text description for group-2"
local-preference 8
}
}
}
leaf
This is an element that does not contain any other elements and has a data type (for example, string or integer). A leaf can also be defined with no data type where the leaf takes no parameter value (that is, an empty leaf).
tcp-keepalive {
admin-state disable
idle-time 600
interval 15
retries 4
}
gnmi {
admin-state enable
auto-config-save false
}
leaf-list
This is an element that contains a sequence of values of a particular data type.
In the following example, ‟policy” is a leaf-list element.
policy ["policy-a" "policy-b" "policy-c"]
leaf-list entry
This is one of the values of a leaf-list.
In the following example, ‟policy-a”, ‟policy-b”, and ‟policy-c” are leaf-list entries.
policy ["policy-a" "policy-b" "policy-c"]
The following terms are also used:
keyword
This is an element with a name defined by SR OS. For example, enumerated values, leaf names, and container names.
variable parameter
This is an element with a name defined by the user. For example, descriptions, names, integer or string leaf values.
immutable element
This is an element that can only be configured in the transaction in which the parent element is created. It cannot be modified while the parent element exists.
choice element
This is an element which is part of a set of mutually exclusive elements. Setting a choice element clears all configuration from the other choice elements.
In the following example, admin-state (leaf name), enable (enumerated value), and connect-retry (leaf name) are keywords, and ‟800” is a variable parameter.
*[ex:/configure router "Base" bgp]
A:admin@node-2# info
admin-state enable
connect-retry 800
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, the bold elements are containers (or container lists) which contain leafs (or leaf-lists).
*[ex:/configure system]
A:admin@node-2# tree detail
+-- alarms
| +-- admin-state <keyword>
| +-- apply-groups <reference>
| +-- apply-groups-exclude <reference>
| +-- max-cleared <number>
+-- allow-boot-license-violations <boolean>
+-- apply-groups <reference>
+-- apply-groups-exclude <reference>
+-- boot-bad-exec <string>
+-- boot-good-exec <string>
+-- central-frequency-clock
| +-- apply-groups <reference>
| +-- apply-groups-exclude <reference>
| +-- bits
| | +-- input
| | | +-- admin-state <keyword>
| | +-- interface-type <keyword>
| | +-- output
| | | +-- admin-state <keyword>
| | | +-- line-length <keyword>
| | | +-- ql-minimum <keyword>
| | | +-- source <keyword>
| | | +-- squelch <boolean>
| | +-- ql-override <keyword>
| | +-- ssm-bit <number>
| +-- ptp
| | +-- admin-state <keyword>
| +-- ql-minimum <keyword>
| +-- ql-selection <boolean>
| +-- ref-order
| | +-- fifth <keyword>
| | +-- first <keyword>
| | +-- fourth <keyword>
| | +-- second <keyword>
| | +-- third <keyword>
---snip---