moduleyangcli-pro {
yang-version1.1;
namespace"http://yumaworks.com/ns/yangcli-pro";
prefixyc;
importietf-yang-types {
prefixyang;
}
importietf-inet-types {
prefixinet;
}
importyuma-ncx {
prefixncx;
}
importyuma-app-common {
prefixncxapp;
}
importyumaworks-types {
prefixywt;
}
importyumaworks-app-common {
prefixywapp;
}
importyumaworks-extensions {
prefixywx;
}
importyuma-types {
prefixnt;
}
importyuma-netconf {
prefixnc;
}
importyumaworks-restconf {
prefixyrc;
}
organization"YumaWorks, Inc.";
contact"Support <support@yumaworks.com>.";
description"
Command Line Interface for the NETCONF protocol: Client side
Usage:
yangcli-pro [parameters]
yangcli-pro --help
yangcli-pro --version
Normal Mode:
An interactive CLI shell with command line history.
Autostart-mode:
If the 'server' parameter is present, then yangcli-pro will
attempt to connect to that server upon startup. If the
'user' and 'password' parameters are also present, then
the user will not be prompted before the connection
is attempted. This parameter will be processed first,
if script-mode or batch-mode is used.
Script-mode:
If the 'run-script' or 'run-command' parameter is present,
then the specified script or command will be run
automatically upon startup.
Batch-mode:
If the 'batch-mode' parameter is present, then either the
'run-script' or 'run-command' parameter will be invoked, if
present, and then the program will exit. Any interactive
input breaks in the script or command will be skipped.
Copyright (c) 2010 - 2017 YumaWorks, Inc. All rights reserved.
Redistribution and use in source and binary forms, with or
without modification, is permitted pursuant to, and subject
to the license terms contained in, the BSD 3-Clause License
http://opensource.org/licenses/BSD-3-Clause";
revision"2017-12-12" {
description"Add CLI enum to display-mode.
Add clear command.
Add term-length parameter.
Add terminal command.
Add show terminal command.";
}
revision"2017-10-14" {
description"Add action RPC.";
}
revision"2017-09-24" {
description"Add no-aliases parameter.
Add server-commands parameter.
Add disable-command parameter.
Add prompt-name parameter.";
}
revision"2017-09-12" {
description"Add autoconfig-conf-mode parameter.";
}
revision"2017-08-12" {
description"Add create parameter of user-cfg to create a new user.";
}
revision"2017-04-27" {
description"Add with-ocpattern parameter.";
}
revision"2017-04-20" {
description"Add show modules-state command.";
}
revision"2017-03-18" {
description"Add callhome-user parameter.";
}
revision"2017-02-11" {
description"Add RESTCONF entry-point parameter.
Add callhome-enabled, callhome-address and callhome-port
parameters.";
}
revision"2016-05-26" {
description"Add auto-reconnect, auto-reconnect-interval, and
auto-reconnect-max.";
}
revision"2016-03-17" {
description"Add use-traceid parameter and variable.";
}
revision"2016-03-10" {
description"Add autonvsave parameter and variable.
Add nvsave command";
}
revision"2015-12-04" {
description"Change target parameter to xpath1.0 to allow content-match
expressions to be entered.
Add device-cfg, devices-cfg, user-cfg,
users-cfg CLI parameters.
Add the leaf of device and userid to saved-sessions.
Add autodevices and autousers parameter.
Add auto-keepalive and keepalive-interval.
Add delete-all and remove-all operations.
Add 'depth' parameter to sget, sget-config, xget,
and xget-config commands.";
}
revision"2015-09-07" {
description"Add encoding parameter to connect parameters";
}
revision"2015-07-07" {
description"Add config-autosave CLI parameter.";
}
revision"2015-06-25" {
description"Add transport tls parameter";
}
revision"2015-06-03" {
description"Add value parameter to delete and remove commands";
}
revision"2015-01-08" {
description"Add no-password leaf and make password part of
pass choice. Add ask-password CLI parameter";
}
revision"2014-10-02" {
description"Add select parameter to show running command.
Add 'mandatory true' for stop-session command.";
}
revision"2014-09-18" {
description"Add show running to show the entire configuration.
Add show edit to display the subtree that is the current
edit node.
Add show diff to display the difference of the current config
and edits that have not been applied yet.";
}
revision"2014-07-11" {
description"Add tcp-ncx enum to the transport enumeration type.";
}
revision"2014-05-22" {
description"Add show cache command. Add cache command.";
}
revision"2014-04-07" {
description"Add check-output and check-replies CLI parameters.
Add check-output-mode and check-replies-mode CLI parameters.
Add use-session-vars CLI parameter.
Add abstract objects for config mode help key support.
Add session-vars and group-vars to the show command.
Add vars struct to the saved-sessions struct.
Add data template support.
Add use-rawxml parameter.
Add autoload-get, autoload-cache, autoload-save-cache
parameters";
}
revision"2014-01-02" {
description"Add show connected command.";
}
revision"2013-06-20" {
description"Change defaults for --autonotif and --autoconfig
from true to false. Add group command";
}
revision"2013-03-17" {
description"Add message-indent parameter.
Add config and exit commands.
Add autoconfig CLI parameter.
Fix bug in default sessions file name.
Add prompt-type CLI parameter.
Add config-edit-mode parameter.
Add update-config command.
Add start-session parameter to connect command.
Add echo-notifs and echo-notif-loglevel CLI parameters.
Add autonotif CLI parameter.
Add session-name to connect a named session.
Add connect-all to start all sessions in memory.
Add record-test command.
Move MatchParms to yumaworks-app-common.
Add auto-test command.";
}
revision"2012-10-27" {
description"Add run-unit-test operation
Convert from yangcli to yangcli-pro
Add sessions-cfg and session-cfg commands
Added saved-sessions template for .conf file
Added autosessions parameter
Added start-session, stop-session commands
Added start-rpc-timing, stop-rpc-timing commands.
Added autotest, test-suite, session-cfg, session-cfg.";
}
revision"2011-10-10" {
description"Add CLI parameters:
--aliases-file
--autoaliases
--autouservars
--uservars-file
--home
Add yangcli-pro local commands:
alias
aliases
unset
uservars
";
}
revision"2011-09-05" {
description"Add 'json' to --display-mode enumerations.";
}
revision"2011-08-06" {
description"Add --transport to ConnectParms grouping.";
}
revision"2011-07-19" {
description"Add PublicKeyParms grouping.
Added MatchParms (--match-names and --alt-names).
Added --force-target parameter.
Added show session command.
Added --urltarget=<url> parameter to FillParms grouping
to allow URL encoded requests to be converted to XPath
before use.
Added --use-xmlheader=<boolean> parameter to control
how XML file variables are generated when written.";
}
revision"2011-06-05" {
description"Added start-timer and stop-timer local RPC functions.
Added --echo-replies parameter and system variable.
Added --time-rpcs parameter and system variable
Added remove command for base:1.1 support";
}
revision"2011-04-22" {
description"Added --protocols parm via uses ProtocolsParm.
Also allow setting --protocols in <connect> RPC.";
}
revision"2011-03-19" {
description"Added 'xml-nons' display mode to display-mode parameter.
Added 'cli' and 'system' to show command; subset of
show vars.
Changed history show default from -1 to 25.";
}
revision"2010-04-16" {
description"Added eval command for XPath expression support";
}
revision"2010-01-14" {
description"Initial published version for 0.9.9 release";
}
typedefLogCount {
typeint32 {
range"-1 | 1 .. max";
}
description"Number of log entries. -1 means all entries";
}
typedefLogIndex {
typeuint32;
description"Index into a log buffer.";
}
typedefTimerId {
typeuint8 {
range"0 .. 15";
}
description"Identifier for a local timer to use with
the start-timer and stop-timer commands.";
}
typedefYangcliVariableType {
typeenumeration {
enum"session" {
value0;
description"Session variable (for future use)";
}
enum"local" {
value1;
description"Local user variable";
}
enum"config" {
value2;
description"User configuration variable";
}
enum"global" {
value3;
description"Global user variable";
}
enum"system" {
value4;
description"System variable";
}
enum"queue" {
value5;
description"System internal Queue variable";
}
}
description"yangcli-pro user and system variable types";
}
typedeftest-result-type {
typeenumeration {
enum"skipped" {
value0;
description"Test was skipped.";
}
enum"pass" {
value1;
description"Test passed.";
}
enum"fail" {
value2;
description"Test failed.";
}
}
description"The unit test general result type.";
}
typedefIdentifierOrZero {
typeunion {
typent:NcxIdentifier;
typestring {
length"0";
}
}
description"Indicates an identifier or empty string to use the
schema or application defined default.";
}
typedefconfig-edit-mode-type {
typeenumeration {
enum"line" {
value0;
description"Automatically apply a config mode edit after
each line";
}
enum"level" {
value1;
description"Automatically apply a config mode edit when
the current level is exited.";
}
enum"manual" {
value2;
description"Only apply a config mode edit manually with
the 'apply' command.";
}
}
description"Specifies how edits will be applied in config mode.";
}
groupingSelectParm {
leafselect {
ncx:xpath;
typestring {
length"1..max";
}
description"The XPath expression to use in the retrieval
operation. The string may only contain
single quotes, which are required for
string literals. The entire string
will be inserted into a double-quoted
string, within the get-config PDU.
Character entities will be inserted as
needed to maintain well-formed XML.";
}
} // grouping SelectParmgroupingFillParms {
choicetarget-parm {
leaftarget {
typeyang:xpath1.0 {
length"1..max";
}
mandatorytrue;
description"XPath target object to fill. If prefixes are missing
then the first match in any namespace will be used.
Any prefix used must be the default prefix
assigned to the desired YANG module. Prefix usage is
optional.";
}
caseurltarget-case {
leafurltarget {
typeywt:UrlPath;
mandatorytrue;
description"URL encoded target object to fill.
Encoding Rules: TBD.";
}
usesywapp:MatchParms {
description"These parameters are only supported for the
'urltarget' parameter.";
}
} // case urltarget-case
} // choice target-parmleafoptional {
typeempty;
description"If present, then prompt for leafs that are optional.
If not, skip these objects.";
}
anyxmlvalue {
description"Contains a string representing the content
to use for the filled variable.
If a string is entered, then the target value being
filled must be a leaf or leaf-list.
If a variable is referenced, then it will
be used as the content, if the target value being
filled is a leaf or a leaf-list.
If the target value is a complex object,
then the referenced variable must also be
a complex object of the same type. E.g.,
The global variable 'foo' would be specified as:
value=$$foo
The local variable 'bar' would be specified as:
value=$bar
An error will be reported if the global or local
variable does not reference the same object type
as the target parameter.";
}
} // grouping FillParmsgroupingCommonPduParms {
description"Common parms for some local commands that
generate NETCONF PDUs";
choicefrom {
mandatorytrue;
leafvarref {
typestring;
description"Use the contents of the specified variable
as the content";
}
casefrom-cli {
usesFillParms;
} // case from-cli
} // choice from
} // grouping CommonPduParmsgroupingEditParms {
description"Common parms for create, merge, replace commands";
usesCommonPduParms;
leaftimeout {
typent:Timeout;
description"Timeout to use";
}
} // grouping EditParmsgroupingSGetParms {
description"Common parms for sget and sget-config operations.";
leafnofill {
typeempty;
description"If present, and the 'from-cli' option is used
for input, then filling of mandatory nodes
and key leafs will be skipped. Instead, the target
object will be treated as a terminating select node
in the filter element.";
}
usesncxapp:CliWithDefaultsParm;
usesyrc:depth-parameter;
} // grouping SGetParmsgroupingXGetParms {
description"Common parms for xget and xget-config operations.";
choicefrom {
mandatorytrue;
leafvarref {
typestring;
description"Use the contents of the specified variable
as the content";
}
caseselect {
usesSelectParm;
} // case selectleafurltarget {
typeywt:UrlPath;
description"The URL path expression to use in the retrieval
operation.";
}
} // choice fromleaftimeout {
typent:Timeout;
description"Timeout to use";
}
usesncxapp:CliWithDefaultsParm;
usesyrc:depth-parameter;
usesywapp:MatchParms {
description"These parameters are ignored unless the
'urltarget' parameter is also present.";
}
} // grouping XGetParmsgroupingEntryPointParm {
leafentry-point {
typestring;
description"RESTCONF entry point. Use this string instead of
retrieving the XRD from the RESTCONF server to
discover the entry point.";
}
} // grouping EntryPointParmgroupingSshKeyParms {
leafpublic-key {
typestring {
length"1 .. max";
}
default"$HOME/.ssh/id_rsa.pub";
description"Contains the file path specification
for the file containing the client-side public key.
If both 'public-key' and 'private-key' files are
present, the client will attempt to connect
to the server using these keys. If this fails,
or not done, then password authentication will
be attempted.";
}
leafprivate-key {
typestring {
length"1 .. max";
}
default"$HOME/.ssh/id_rsa";
description"Contains the file path specification
for the file containing the client-side private key.
If both 'public-key' and 'private-key' files are
present, the client will attempt to connect
to the server using these keys. If this fails,
or not done, then password authentication will
be attempted.";
}
} // grouping SshKeyParmsgroupingSslKeyParms {
leafssl-fallback-ok {
typeboolean;
default'true';
description"If true then an attempt to establish a plain TCP
connection will be made if an SSL connection cannot
be made. This parameter only applies of the
'transport' is 'ssl'";
}
leafssl-certificate {
typestring {
length"1 .. max";
}
default"$HOME/.ssl/yangapi-client.crt";
description"Contains the file path specification
for the file containing the client-side ssl certificate.
If both 'certificate' and 'key' files are
present, the client will attempt to setup a secure
connection with the server using the certificate and
SSL key.
If this fails, and the 'ssl-fallback-ok' leaf is
set to true, the client will attempt to setup
a raw tcp connection with the server.";
}
leafssl-key {
typestring {
length"1 .. max";
}
default"$HOME/.ssl/yangapi-client.key";
description"Contains the file path specification
for the file containing the client-side ssl key.
If both 'certificate' and 'key' files are
present, the client will attempt to setup a secure
connection with the server using the certificate and
SSLe key. If this fails, client will attempt to setup
a raw tcp connection with the server.";
}
leafssl-trust-store {
typestring {
length"1 .. max";
}
default"$HOME/.ssl/trust-store.pem";
description"Contains the file path specification
for the file containing the client-side ssl trust-store.
It includes the CA certificates of the server for
verification purposes. Certificates in trust-store
are trusted.";
}
} // grouping SslKeyParmsgroupingConnectParms {
description"Common parms for connecting to a NETCONF server.
Used by the connect operation and if present at
the command line invocation, then the connect
operation will be invoked automatically.";
leafuser {
typent:NcxUserName;
description"User name to use for NETCONF sessions.";
}
leafserver {
typeinet:host;
description"IP address or DNS name of the NETCONF server target.";
}
choicepass {
leafpassword {
ncx:password;
typestring;
description"User password to use for NETCONF sessions.
If none, then user will be prompted before connecting.";
}
leafno-password {
typeempty;
description"Indicates that no user password is needed for
the connection.";
}
} // choice passleafncport {
typeuint16 {
range"1..max";
}
default'830';
description"NETCONF port number to use. If not present, then
port 830, followed by port 22, will be tried.";
}
leaftimeout {
typent:Timeout;
description"Number of seconds to wait for a response
from the server before declaring a timeout.
Zero means do not timeout at all.";
}
usesSshKeyParms;
usesSslKeyParms;
usesncxapp:ProtocolsParm;
usesEntryPointParm;
leaftransport {
typeenumeration {
enum"ssh" {
value0;
description"NETCONF over SSH.";
reference"RFC 4742; RFC 6242";
}
enum"tcp" {
value1;
description"The transport is TCP. The usage depends on
the protocol used.
NETCONF over TCP: (tail-f NETCONF over TCP)
If this enum is selected, then the default --ncport
value is set to 2023 and the --protocols value
is set to netconf1.0. The --password value will
be ignored.
YANG-API or RESTCONF over HTTP/TCP:
If this enum is selected, then the default --ncport
value is set to 80, and the --protocols value
will not be changed.";
reference"NETCONF: tail-f conf-d
RESTCONF: HTTP";
}
enum"tcp-ncx" {
value2;
description"NETCONF over TCP.
If this enum is selected, then the default --ncport
value is set to 2023, and the --protocols value
is set to netconf1.0 and netconf1.1. The --password
value will be ignored.";
reference"YumaWorks <ncx-connect>";
}
enum"tls" {
value3;
description"If this enum is selected the restconf client will try
to communicate with web server using https protocol.";
reference"RFC 2818";
}
enum"coap" {
value4;
description"RESTCONF over CoAP.
If this enum is selected, then the default --ncport
value is set to 5683. The --password value will be
ignored.";
reference"YumaWorks <ncx-connect>";
}
}
default'ssh';
description"Identifies the transport protocol that should be used.";
}
leafencoding {
typeywt:encoding-type;
default'xml';
description"Identifies the desired encoding format.
Only supported for RESTCONF and YANG-API at this time.";
}
} // grouping ConnectParmsgroupingXPathParms {
description"Common parameters used for XPath script constructs";
leafexpr {
typeyang:xpath1.0 {
length"1..max";
}
mandatorytrue;
description"XPath expression string to evaluate.
Use quotes if there are any whitespace or
special characters in the expression.";
}
anyxmldocroot {
description"Use the contents of the specified variable or
external XML file as the conceptual document to
apply the expression specified in the 'expr' parameter.
If this parameter is missing then a dummy document
will be used. This is only allowed if the
expression only contains variable references
or numeric/string constants.";
}
} // grouping XPathParmsgroupingSessionGroupParms {
leafmissing-ok {
typeboolean;
default'false';
description"If truew, then it is OK to manage this group if 1 or
more sessions identified in the session leaf-list
are not found in the session list. The default is
to require all session names to exist in the session list
for the group to be used.";
}
leafmissing-connect-ok {
typeboolean;
default'false';
description"If true, then it is OK to manage this group if 1 or
more sessions identified in the session leaf-list
cannot be established when the connect -group=name
operation is used. The default is to require all
sessions to connect OK for the group to be used.";
}
leaflost-ok {
typeboolean;
default'false';
description"If true, then it is OK to manage this group if 1 or
more sessions are lost after connection is made.
The default is to require all sessions to remain
connected for the group to be used.";
}
leafreconnect-tries {
typeuint32;
default'5';
description"Indicates the number of times yangcli will attempt
to reconnect to a session if the server becomes unreachable.
The default is 5 tries.";
}
leafreconnect-interval {
typeuint32;
units"seconds";
default'10';
description"Indicates the number of seconds yangcli will wait to
re-establish a connection if a session is dropped
and the server becomes unreachable.
The default is 10 seconds.";
}
} // grouping SessionGroupParmscontaineryangcli-pro {
ncx:cli;
description"CLI Parameter Set for the NETCONF Client Application.";
leafaliases-file {
typestring;
default"~/.yumapro/.yangcli_pro_aliases";
description"Specifies the yangcli-pro command aliases file to use.";
}
leafask-password {
typeboolean;
default'true';
description"Specifies whether the user will be required and
prompted to provide a password parameter for the
connect command.
This parameter is intended to support servers
that use keys for authentication instead of passwords.
If 'true' then the connect command will expect
that a password is needed. If 'false' the connect
command will no require a password, but it will
use the password parameter if it is set.";
}
leafauto-keepalive {
typeboolean;
default'false';
description"Controls whether kepalive messages will be automatically
sent on a connected session.
If true, keepalive message is sent every keepalive-interval.
If false, keepalive message will not be sent.";
}
leafauto-reconnect {
typeboolean;
default'true';
description"Controls whether yangcli will try to reconnect to
the server If the session gets dropped by the server.
If true, yangcli-pro will try to reconnect to the server.
If false, yangcli-pro will not try to reconnect to
the server.";
}
leafauto-reconnect-interval {
typeuint16 {
range"1 .. 3600";
}
units"seconds";
default'10';
description"Number of seconds to wait after first retry.
The first retry will be done right away.";
}
leafauto-reconnect-max {
typeuint16;
default'5';
description"Number of times to retry the connection.
Zero means no limit, otherwise re-connect attempts
will stop after this number of failures.";
}
leafautoaliases {
typeboolean;
default'true';
description"Controls whether the yangcli-pro command aliases will
be saved at exit and loaded at startup.
If true, the 'aliases-file' parameter will be used if it is set,
or else the default aliases file will be used
(~/.yumapro/.yangcli_pro_aliases), for loading
and saving the yangcli-pro command aliases.
If false, the yangcli-pro command aliases will only be stored
and loaded manually with the aliases command.";
}
leafautocomp {
typeboolean;
default'true';
description"Controls whether partial keywords will be
checked for interactive or script commands.
By default, the first match for a partial keyword
will be used if no definition is found for
a command name or parameter name.";
}
leafautoconfig {
typeboolean;
default'false';
description"Controls whether the running configuration
will be retrieved automatically for active sessions.
By default, the running config will not be retrieved
and maintained. This option must be set to true to
support value-node command tab completion.";
}
leafautoconfig-conf-mode {
typeboolean;
default'true';
description"Controls whether the running configuration
will be retrieved automatically for active sessions
in config-mode.
If autoconfig == TRUE then autoconfig-conf-mode is ignored
and autoconfig will be done for config mode.
If autoconfig == FALSE then autoconfig-conf-mode is checked
and only set if autoconf-conf-mode == TRUE
If false, the requests after each update will not be done.
If false, the requests after each update will not be done.
The current config will not be available to assist tab completion.
Default for autoconfig-conf-mode is TRUE.";
}
leafautodevices {
typeboolean;
default'true';
description"Controls whether the saved devices will be loaded
into memory at startup and saved to file at exit.
If true, the default device-cfg file will be used
(~/.yumapro/.yangcli_pro_devices.conf) for loading
and saving the configured devices in memory.
If false, the configured devices will only be stored
and loaded manually with the devices-cfg command.";
}
leafautohistory {
typeboolean;
default'true';
description"Controls whether the command line history buffer will
be saved at exit and loaded at startup.
If true, the default history file will be used
(~/.yumapro/.yangcli_pro_history) for loading
and saving the history buffer.
If false, the history buffer will only be stored
and loaded manually with the history command.";
}
leafautoload {
typeboolean;
default'true';
description"Controls whether any modules (except this one)
will be automatically loaded upon startup or
upon session startup with a server. If false,
the 'mgrload' command must be used to
explicitly load all the desired YANG modules.";
}
leafautoload-cache {
typeboolean;
default'true';
description"Controls whether the modules retrieved with the
<get-schema> operation are cached for use by the
running instance of yangcli-pro.
If true, then the YANG modules that are retrieved
with the <get-schema> operation will be cached.
A cached module will be used by yangcli-pro instead
of calling <get-schema>, if that module revision
is requested again.
If false, then the YANG modules that are retrieved
with the <get-schema> operation will not be cached.";
}
leafautoload-get {
typeboolean;
default'true';
description"Controls whether the <get> operation will be used
to retrieve the /netconf-state/schemas sub-tree.
If 'true', then the schema list will be used instead
of the <hello> message module capabilities, if the
server supports the 'ietf-netconf-monitoring' module.
If 'false', then just the <hello> message module
list will be used to retrieve YANG modules with
the <get-schema> operation.
This option is needed to autoload sub-modules
that are not available to yangcli-pro, since
YANG submodules are not advertised in the <hello>
message.";
}
leafautoload-save-cache {
typeboolean;
default'true';
description"Controls whether the modules held in the YANG module
cache (retrieved with the <get-schema> operation)
are saved when yangcli-pro exits.
If true, then the YANG modules that are cached
will not be deleted when yangcli-pro exit.
If false, then the YANG modules that are cached
will be deleted when yangcli-pro exits.";
}
leafautonotif {
typeboolean;
default'false';
description"Controls whether notifications will automatically
be enabled when a session starts.
By default, notifications will not be enabled.
If enabled, a <create-subscription> operation will
be performed when the session starts, and notification
events for the sesion will be monitored.";
}
leafautonvsave {
typeboolean;
default'true';
description"Controls whether the 'save' and 'apply' commands
will NV-save the configuration changes or not.
If the server advertises the :startup capability
and this variable is set to 'false', then the
final step to save running to startup will not
be done. The 'nvsave' command can be used to
manually save the running datastore to non-volative
memory.";
}
leafautosessions {
typeboolean;
default'true';
description"Controls whether the saved sessions will be loaded
into memory at startup and saved to file at exit.
If true, the default session-cfg file will be used
(~/.yumapro/.yangcli_pro_sessions.conf) for loading
and saving the configured sessions in memory.
If false, the configured sessions will only be stored
and loaded manually with the sessions-cfg command.";
}
leafautotest {
typeboolean;
default'true';
description"Controls whether the saved test suites will be loaded
into memory at startup and saved to file at exit.
If true, the default test-suite-cfg file will be used
(~/.yumapro/yangcli_pro_tests.conf) for loading
and saving the configured test-suites in memory.
If false, the configured test-suites will only be stored
and loaded manually with the test-suite command.";
}
leafautousers {
typeboolean;
default'true';
description"Controls whether the saved users will be loaded
into memory at startup and saved to file at exit.
If true, the default user-cfg file will be used
(~/.yumapro/.yangcli_pro_users.conf) for loading
and saving the configured users in memory.
If false, the configured users will only be stored
and loaded manually with the users-cfg command.";
}
leafautouservars {
typeboolean;
default'true';
description"Controls whether the yangcli-pro user variables will
be saved at exit and loaded at startup.
If true, the 'uservars-file' parameter will be used if set,
or else the default user variables file will be used
(~/.yumapro/yangcli_pro_uservars.xml), for loading
and saving the yangcli-pro user variables.
If false, the yangcli-pro user variables will only be stored
and loaded manually with the uservars command.";
}
leafbad-data {
typeenumeration {
enum"ignore" {
value0;
description"Silently accept invalid PDU and data model
parameters. Intended for advanced server
testing mode only.";
}
enum"warn" {
value1;
description"Warn, but accept invalid PDU and data model
parameters.";
}
enum"check" {
value2;
description"Prompt the user to keep the invalid value
or re-enter the value.";
}
enum"error" {
value3;
description"Prompt the user to re-enter the invalid value.";
}
}
default"check";
description"Specifies how invalid user input from the CLI
will be handled when filling PDUs for remote
operations.";
}
leafbatch-mode {
typeempty;
description"If present, the interactive CLI will not be used.
A script should be provided with the 'run-script'
parameter, or a command provided with the 'run-command'
parameter, or else the program will simply exit.
If the auto-connect mode is enabled, then this will mode
simply test if a NETCONF session can be established,
then exit.";
}
leafcallhome-address {
typeinet:ip-address;
default"0.0.0.0";
description"Identifies the IP address that should be used to listen
for callhome connections. Ignored if callhome-enabled
is false.";
}
leafcallhome-enabled {
typeboolean;
default'false';
description"If true, then yangcli-pro will listen for SSH CallHome
connections on the socket identified by the
callhome-address and callhome-port parameters.";
}
leafcallhome-port {
typeinet:port-number;
default'4334';
description"Identifies the TCP port that should be used to listen
for callhome connections. Ignored if callhome-enabled
is false.";
reference"RFC 8071";
}
leafcallhome-user {
typent:NcxUserName;
description"Specifies the name of a configured user entry that
should be used as the default user for callhome
sessions, if no saved session entry is found matching
the server IP address. Will be ignored if the user
is not currently configured.";
}
leafcheck-output {
typeboolean;
default'true';
description"If true, then yangcli-pro will validate remote commands
against the YANG definition for the rpc/input node.
This checks the operation parameters about to be sent to
a server session. Validation of the contents of a <config>
element are not done. Also the $$check-output global
parameter.";
}
leafcheck-output-error {
typeboolean;
default'false';
description"If 'true', then errors found during the check-output
validation tests will be treated as errors, causing
the <rpc> about to be sent to fail.
If 'false', then errors found during the check-output
validation tests will be treated as warnings.
Also the $$check-output-error global parameter.";
}
leafcheck-replies {
typeboolean;
default'true';
description"If true, then yangcli-pro will validate responses for
remote commands against the YANG definition for
the rpc/output node. This checks the parameters
in the <rpc-reply> sent from a server session.
If the 'output' section is missing or empty, then
the <rpc-reply> will be checked to make sure it
contains either <ok> or 1 or more <rpc-error> elements.
Also the $$check-replies global parm.";
}
leafcheck-replies-error {
typeboolean;
default'false';
description"If 'false', then errors found during the check-replies
validation tests will be treated as warnings.
If 'true', then errors found during the check-replies
validation tests will be treated as errors, causing
the <rpc-reply> about to be processed to be rejected.";
}
leafconfig-autosave {
typeboolean;
default'true';
description"Controls how edits in config term mode are saved to
NV-storage if the server supports the :startup capability.
If 'true', automatically copy running to startup when
an edit is applied. If 'false', no automatically copy
from running to startup when an edit is applied.
The user will enter 'save' or 'copy-config'
manually once config term mode is exited.";
}
leafconfig-edit-mode {
typeconfig-edit-mode-type;
default'level';
description"Controls how edits are applied during config mode.";
}
leafdefault-module {
typent:NcxName;
description"Default module name string to use before 'yuma-netconf'
and 'yangcli-pro' are tried. The module prefix may need to be
used for other modules.";
}
leaf-listdisable-command {
typent:NcxIdentifier;
description"Specifies a top-level command that should be disabled
and not visible or available to a user. If the value
does not contain a module name prefix, then the command
will be disabled in all modules.
For example, to disable the NETCONF <delete-config>
operation:
disable-command ietf-netconf:delete-config
";
}
leafdisplay-mode {
typeenumeration {
enum"plain" {
value0;
description"Plain identifier without any prefix format.";
}
enum"prefix" {
value1;
description"Plain text with XML prefix added format.";
}
enum"module" {
value2;
description"Plain text with module name as prefix added format.";
}
enum"xml" {
value3;
description"XML format.";
}
enum"xml-nons" {
value4;
description"XML format, but no namespace (xmlns) attributes
will be generated.";
}
enum"json" {
value5;
description"JSON format.";
}
enum"cli" {
value6;
description"CLI format.";
}
}
default'plain';
description"Controls how values are displayed during output
to STDOUT or a log file.";
}
leafecho-notif-loglevel {
typent:NcDebugType;
default'debug';
description"Specifies the log-level value that must be active before
notifications will be echoed to the log or STDOUT.
This parameter has no affect if 'echo-notifs' is false.
The $$echo-notif-loglevel system variable is derived from
this parameter.";
}
leafecho-notifs {
typeboolean;
default'true';
description"Allow notifications to be echoed to the log or STDOUT
If 'true', <notification> messages will be output
to the log, if log-level is set to the value
specified by the echo-notif-loglevel or higher.
If 'false', <notifications> messages will not be
output to the log.
The $$echo-notifs system variable is derived from
this parameter.";
}
leafecho-replies {
typeboolean;
default'true';
description"Allow RPC replies to be echoed to the log or STDOUT
If 'true', <rpc-reply> messages containing data
will be output to the log, if log-level is
'info' or higher.
If 'false', <rpc-reply> messages containing data
will not be output to the log, regardless of
the value of log-level.
The $$echo-replies system variable is derived from
this parameter.";
}
leaffixorder {
typeboolean;
default'true';
description"Controls whether PDU parameters will be
automatically sent to the server in the
correct order. If false, the specified order
will be used. If true, then canonical order will
be used";
}
leafforce-target {
typeenumeration {
enum"candidate" {
value0;
description"Force default edit target to be candidate.";
}
enum"running" {
value1;
description"Force default edit target to be running.";
}
}
default'candidate';
description"Controls whether the candidate or running
configuration datastore will be used as
the default edit target, when both are supported
by the server.";
}
leafkeepalive-interval {
typeuint32 {
range"1 .. 3600";
}
units"seconds";
default'4';
description"Specifies the time interval, in seconds, between keepalive
messages sent from a session. This value is only used
if 'auto-keepalive' is true.";
}
leafno-aliases {
typeempty;
description"Disables the alias substitution feature.
The alias file will not be read.
The aliases and alias commands will be disabled.";
}
leafprompt-name {
typestring {
length"1 .. 512";
}
description"Customize a prompt name for yp-shell.";
}
leafprompt-type {
typeywt:show-mode;
default'normal';
description"Selects the type of prompt string that will be used
in interactive mode.";
}
choicerun-startup-mode {
leafrun-command {
typestring {
length"1 .. 4095";
}
description"The specified command will be invoked upon startup.
If the auto-connect parameters are provided, then
a session will be established before running the
command.";
}
leafrun-script {
typestring {
length"1 .. 4095";
}
description"The specified script will be invoked upon startup.
If the auto-connect parameters are provided, then
a session will be established before running the
script. If a quoted string is used, then any parameters
after the script name will be passed to the script.";
}
} // choice run-startup-modeleafscript-input {
typeboolean;
default'true';
description"Specifies whether scripts run in interactive mode should
attempt to fill in missing command parameters from the
CLI command line or not.
If not, then script commands will be attempted with
whatever parameters are present in the script.";
}
leafserver-commands {
typeboolean;
default'true';
description"Specifies whether RPC operations learned from server
YANG modules will be added as a command available to
the user.
The module ietf-netconf is exempt from this parameter.
Use the disable-command parameter to disable individual
NETCONF operations.";
}
leafterm-length {
typeuint16 {
range"0 .. 511";
}
default'0';
description"Specifies the length of the terminal to use for page
mode output with the -More- prompt. This parameter
is ignored in batch mode. It is only used if the
output session is operating in interactive mode.
If the value 0 is used then the 'More' prompt will
be disabled. Otherwise this value represents the
number of lines to output for each screen in pagination
output mode.";
}
leaftest-suite-file {
typestring;
default"~/.yumapro/yangcli_pro_tests.conf";
description"Specifies the yangcli-pro test suite config
file to use.";
}
leaftime-rpcs {
typeboolean;
default'false';
description"Measure the round-trip time of each <rpc> request and
<rpc-reply> at the session level.
Echo the elapsed time value to screen if in
interactive mode, as well as the log if the
log is a file instead of stdout.
The $$time-rpcs system variable is derived from this
parameter.";
}
leaftime-rpcs-stats {
typeboolean;
default'false';
description"Save rpc statistics to the default statistics file
if the time-rpcs variable is also true.
The $$time-rpcs-stats system variable is derived
from this parameter.";
}
leaftime-rpcs-stats-file {
typestring {
length"1 .. max";
}
default"~/yangcli_pro_rpc_stats.txt";
description"The default filename to use for saving RPC timing statistics.
if the time-rpcs and time-rpc-stats variables are true.
The $$time-rpcs-stats-file system variable is derived
from this parameter.";
}
leafuse-rawxml {
typeboolean;
default'false';
description"Specifies how file result variables will be read
for XML files. Controls whether the XML will be
parsed against the target YANG object (the default)
or injected into a variable or request message from
the raw XML text in the file.";
}
leafuse-traceid {
typeboolean;
default'false';
description"Controls whether the 'trace-id' attribute will
be set in the RPC requests or not.
By default, 'trace-id' will be disabled.";
}
leafuse-xmlheader {
typeboolean;
default'true';
description"Specifies how file result variables will be written
for XML files. Controls whether the XML preamble
header will be written or not.";
}
leafuservars-file {
typestring;
default"~/.yumapro/yangcli_pro_uservars.xml";
description"Specifies the yangcli-pro user variables file to use.";
}
usesncxapp:NcxAppCommon;
usesncxapp:NewConfigParm;
usesywapp:LoggingCommonParms;
usesywapp:MessageIndentParm;
usesywapp:YumaproHomeParm;
usesywapp:DataTemplateParms;
usesywapp:UseSessionVarsParm;
usesywapp:SaveSessionVarsParm;
usesncxapp:CommonFeatureParms;
usesncxapp:SubdirsParm;
usesncxapp:HomeParm;
usesConnectParms;
usesywapp:OcPatternParm;
usesywapp:MatchParms {
refinematch-names {
default'one-nocase';
}
refinealt-names {
default'true';
}
refinewildcard-keys {
default'false';
}
}
usesncxapp:ModuleParm;
usesncxapp:DeviationParm;
usesncxapp:DatapathParm;
usesncxapp:RunpathParm;
} // container yangcli-prorpcaction {
description"Invoke a YANG action.
The target of the action must identify a YANG action
statement, which is not a real node in the server data
tree.";
input {
ncx:default-parm"target";
usesCommonPduParms;
leaftimeout {
typent:Timeout;
description"Timeout to use";
}
}
} // rpc actionrpcalias {
description"Show or set a specific yangcli-pro command alias.
* Show all aliases in memory (same as aliases):
yangcli-pro> alias
* Show one alias 'foo':
yangcli-pro> alias foo
* Set one alias; make sure there is no whitespace
between the '=' char and either string. If the value
has whitespace, it must be quoted. If the equals sign
is present, then a valid value string must be present.
Quotes will be preserved if used:
* Single quotes can appear within doubled-quoted
strings but not any double quotes.
* Double quotes can appear within single-quoted strings
but not any single quotes.
The first token in a plain command or the first token
in the right-hand-side expression in an assignment
statement can be an alias.
The alias name must exact match the token.
A new command line will be constructed replacing
the alias name with its value. The new command
line will then be parsed as usual.
yangcli-pro> alias s=show
yangcli-pro> alias getfoo='sget-config source=running /top/foo'
* Aliases can override real commands, so be careful
not to unintentionally alter real commands.
yangcli-pro> alias get-config='get-config source=running'
";
input {
ncx:default-parm"var";
ncx:default-parm-equals-ok;
leafvar {
typestring {
length"1 .. max";
}
description"The alias command string.";
}
}
} // rpc aliasrpcaliases {
description"Manage the yangcli-pro command aliases";
input {
choicealias-action {
default'show';
leafshow {
typeempty;
description"Show all the yangcli-pro command aliases.";
}
leafclear {
typeempty;
description"Delete all the yangcli-pro aliases from memory.";
}
leafload {
typestring;
default"~/.yumapro/.yangcli_pro_aliases";
description"Load the yangcli-pro command aliases from the
specified file spec. The default aliases
file will be loaded automatically at startup
if the '--autoaliases' parameter is present.";
}
leafsave {
typestring;
default"~/.yumapro/.yangcli_pro_aliases";
description"Save the yangcli-pro command aliases to the
specified filespec. The default aliases
file will be saved automatically at shutdown
if the '--autoaliases' parameter is present.";
}
} // choice alias-action
}
} // rpc aliasesrpcauto-test {
description"Run automatic edit testing on the specified object";
input {
ncx:default-parm"target";
leaftarget {
ncx:schema-instance;
typestring;
mandatorytrue;
description"Schema-instance identifier string indicating the
node which is going to be tested.";
}
leafsession-name {
typent:NcxIdentifier;
description"Named session to use for the testing. If missing the
current session will be used.";
}
leafiterations {
typeuint32 {
range"1..max";
}
default'1';
description"Number of commits to make.";
}
}
} // rpc auto-testrpccache {
description"Clear 1 or all entries from the YANG module cache.
There are 3 forms of this command:
cache clear
cache delete foo
cache delete=foo revision=2014-05-22";
input {
choicecache-input {
mandatorytrue;
leafclear {
typeempty;
description"Clear the YANG module cache on disk.";
}
casedelete-cache {
leafdelete {
typent:NcxIdentifier;
mandatorytrue;
description"Name of the module to delete from the YANG
module cache.";
}
leafrevision {
typent:Date;
description"Revision date of the module to delete from the
YANG module cache. OIf missing then all revisions
will be deleted from the cache.";
}
} // case delete-cache
} // choice cache-input
}
} // rpc cacherpccd {
description"Change the current working directory.";
input {
ncx:default-parm"dir";
leafdir {
typestring;
mandatorytrue;
description"Directory path to use.";
}
}
} // rpc cdrpcclear {
description"Clear the screen in interactive mode.";
} // rpc clearrpcconfig {
description"Enter the configuration mode for the current session.
There must be a current active session or this command
will fail.";
input {
choiceconfig-source {
default'term';
leafterm {
typeempty;
description"Use the terminal for configuration input.";
}
} // choice config-source
}
} // rpc configrpcconnect {
description"Connect to a NETCONF server.";
input {
ncx:default-parm"server";
usesConnectParms {
refineuser {
mandatorytrue;
}
refineserver {
mandatorytrue;
}
refinepass {
mandatorytrue;
}
}
leafsession-name {
typent:NcxIdentifier;
description"Create a new session configuration record
using this new session name.";
}
}
} // rpc connectrpccreate {
description"Create some NETCONF config data with the edit-config operation";
input {
ncx:default-parm"target";
usesEditParms;
}
} // rpc createrpcdelete {
description"Delete some NETCONF config data with the edit-config operation";
input {
ncx:default-parm"target";
choicedelete-target {
mandatorytrue;
leaftarget {
typestring;
description"Xpath expression indicating the node which is going
to be deleted.";
}
leafurltarget {
typeywt:UrlPath;
description"The URL path expression to use in the delete
operation.";
}
} // choice delete-targetanyxmlvalue {
description"Contains a string representing the content
to use for the variable. Only applies if the
delete-target is a leaf-list node.";
}
}
} // rpc deleterpcdelete-all {
description"Delete some NETCONF config data with the edit-config operation.
Delete all instances of a leaf-list or list object. At least
one instance must exist or the server will return an error.";
input {
ncx:default-parm"target";
choicedelete-target {
mandatorytrue;
leaftarget {
typestring;
description"Xpath expression indicating the list or leaf-list nodes
which are going to be deleted.";
}
leafurltarget {
typeywt:UrlPath;
description"The URL path expression to use in the delete
operation.";
}
} // choice delete-target
}
} // rpc delete-allrpcelif {
ywx:help"Start an intermediate block in a conditional statement";
description"Evaluate an XPath expression locally on the manager.
and execute the block of commands that follow
if the expression is true. The block ends
when a matching 'elif', 'else', or 'end' command is reached.
This may only be used after an 'if' or 'elif' command
or an error (no matching if command) will occur.
";
input {
ncx:default-parm"expr";
usesXPathParms;
}
} // rpc elifrpcelse {
ywx:help"Start the last block in a conditional statement";
description"End an 'if' or 'elif' command block, and start a new
command block that must end with an 'end' command.
If no 'if' or 'elif' block is in progress then an error
will occur.
";
} // rpc elserpcend {
description"End an 'if' command block or a 'while' command block.
If no block is in progress then an error will occur.
";
} // rpc endrpceval {
description"Evaluate an XPath expression locally on the manager.
All local variables will be available to the session
context, in the following precedence:
1) current script run level
2) global variable
When the result of an eval command is saved
to a user variable, it may be altered as follows:
Convert to string:
- <data> is a simple type
- <data> contains 1 node that is a simple type
Remove the <data> container:
- <data> contains a single complex element
Retain the <data> container:
- <data> contains multiple elements
Usage Examples:
> $x = 5
x = '5'
> $x = eval '$x + 10'
x = '15'
> $y = xget /system
y = data {
system { ... }
}
> $z = eval '//sysname' docroot=$y
z = 'Linux'
> $w = eval '/system/uname' docroot=$y
w = uname {
sysname 'Linux'
...
}
";
input {
ncx:default-parm"expr";
usesXPathParms;
}
output {
anyxmldata {
mandatorytrue;
description"The XPath result, returned in a data element.
The content will be a simple string for boolean, string,
and number result types.
The content will be zero or more child elements,
in their proper namespaces, if the result is a node-set.
Only the requested node(s) will be returned,
not their entire path to the document root,
like the get and get-config operations.
An empty 'data' element will be returned if the result
is an empty node-set.";
}
}
} // rpc evalrpceventlog {
description"Access the notification event log";
input {
ncx:default-parm"show";
choiceeventlog-action {
default'show-case';
caseshow-case {
leafshow {
typeLogCount;
default'-1';
description"Show the specified number of event log
buffer entries. -1 means show all entries.
If the --full or --brief help-mode parameters
are entered, then the output will be altered.";
}
leafstart {
typeLogIndex;
description"Start at the specified event index number instead of
the beginning of the event log.";
}
usesncxapp:HelpMode;
} // case show-caseleafclear {
typeLogCount;
default'25';
description"Clear the specified number of notification
event log entries. The value -1 means
clear all the entries.";
}
} // choice eventlog-action
}
} // rpc eventlogrpcexit {
description"Exit the currrent configuration level for the current session.
There must be a current active session or this command
will fail. The current session must also be in the
configuration mode. Any pending edits will be applied
if the edit-config-mode is set to 'level'.";
} // rpc exitrpcfill {
description"Fill a value for reuse in a NETCONF PDU or other operation.
Used in an assignment statement to create a variable
for later use:
$foo = fill --target=/t:foo-con/bar-list";
input {
ncx:default-parm"target";
usesFillParms;
}
output {
anyxmldata {
description"The result of the fill operation.
The name of the value node may not really
be 'data'. If the 'target' or 'current-value'
input parameters are used, then the name
of the result node will be copied instead.
The data type will be inherited from the 'target'
or 'current_value' parameters, and not really be
an 'anyxml' structure. YANG does have a data
type that supports this feature.";
}
}
} // rpc fillrpcget-locks {
description"Get a lock for the running configuration
and the candidate and startup configurations,
if needed. If all the locks cannot be obtained,
then release all of them (all-or-nothing).
The entire operation must be completed within
the lock timeout interval, if it is set.";
input {
leaflock-timeout {
typent:Timeout;
default'120';
description"Total time to wait to retrieve all the locks needed
to complete the get-locks command. A value of zero
means to wait forever and not use a timeout value.";
}
leafretry-interval {
typeuint32 {
range"1 .. 300";
}
units"seconds";
default'2';
description"Retry interval to use if a lock is temporarily
unavailable. The client will wait this number of
seconds before attempting to get the current lock.";
}
leafcleanup {
typeboolean;
default'true';
description"Indicates whether the locks obtained should be
automatically released if an RPC operation
fails (after the get-locks succeeds).";
}
}
} // rpc get-locksrpcgroup {
description"Manage the yangcli-pro session groups.
A group name is not allowed to have the same name as any
session name. This allows the 'session set-current' command
to select a group or an individual session.";
input {
ncx:default-parm"session";
choicegroupcmd {
mandatorytrue;
caseconnect {
leafconnect {
typent:NcxIdentifier;
description"Connect to all sessions in the specified group.";
}
usesSessionGroupParms;
} // case connectleafcreate {
typent:NcxIdentifier;
description"Name of the group to create. The 'session' parameter
must also be present";
}
leafdelete {
typent:NcxIdentifier;
description"Name of the group to delete";
}
leafadd {
typent:NcxIdentifier;
description"Name of the group to add some sessions. The 'session'
parameter must also be present.";
}
leafremove {
typent:NcxIdentifier;
description"Name of the group to remove some sessions. The
'session' parameer must also be present.";
}
leafshow {
typent:NcxIdentifier;
description"Name of the group to show";
}
leaflist {
typeempty;
description"List the names of all the groups";
}
} // choice groupcmdleaf-listsession {
when"../create or ../add or ../remove";
typent:NcxIdentifier;
min-elements1;
description"Name of a session that is being added to the group.";
}
}
} // rpc grouprpchelp {
description"Print the yangcli-pro help text";
input {
ncx:default-parm"command";
choicehelptype {
leafcommand {
typent:NcxIdentifier;
description"Show help for the specified command,
also called an RPC method";
}
leafcommands {
typeempty;
description"Show info for all local commands";
}
leafnotification {
typent:NcxIdentifier;
description"Show help for the specified notification";
}
leafobject {
typeunion {
typent:NcxIdentifier;
typeywt:UrlPath;
}
description"Show help for the specified object";
}
leaftype {
typent:NcxIdentifier;
description"Show help for the specified type";
}
} // choice helptypeusesncxapp:HelpMode;
}
} // rpc helprpchistory {
description"Access the command line history buffer";
input {
ncx:default-parm"show";
choicehistory-action {
default'show-case';
caseshow-case {
leafshow {
typeLogCount;
default'25';
description"Show the specified number of history
buffer entries. -1 means show all entries.";
}
usesncxapp:HelpMode;
} // case show-caseleafclear {
typeempty;
description"Clear all the history buffer entries.";
}
leafload {
typestring;
default"~/.yumapro/.yangcli_pro_history";
description"Load the command history buffer from the
specified file spec.";
}
leafsave {
typestring;
default"~/.yumapro/.yangcli_pro_history";
description"Save the command history buffer in the
specified filespec.";
}
} // choice history-action
}
} // rpc historyrpcif {
description"Evaluate an XPath expression locally on the manager.
and execute the block of commands that follow
if the expression is true. The block ends
when a matching 'elif', 'else', or 'end' command is reached.
";
input {
ncx:default-parm"expr";
usesXPathParms;
}
} // rpc ifrpcinsert {
description"Insert some NETCONF config data with the edit-config operation";
input {
ncx:default-parm"target";
usesEditParms;
leaforder {
typeenumeration {
enum"first" {
value0;
}
enum"last" {
value1;
}
enum"before" {
value2;
}
enum"after" {
value3;
}
}
default'last';
description"The insert order that should be used.
If the values 'before' or 'after' are selected,
then the edit-target parameter must also be present.";
}
leafoperation {
typeenumeration {
enum"create" {
value0;
}
enum"merge" {
value1;
}
enum"replace" {
value2;
}
}
default'merge';
description"The edit-config operation that should be used.";
}
leafedit-target {
typestring;
description"The value or key clause that should be used.
This parameter should only be present if the
order selected is 'before' or 'after'.
For a leaf-list, the edit-target contains the
value of the target leaf-list node within the
configuration being edited. The new config
will be inserted before or after this leaf-list
node, depending on the order selected.
E.g., edit-target='some leaf content'.
For a list, the edit-target contains the
key values of the target list node within the
configuration being edited. The new config
will be inserted before or after this list
node, depending on the order selected.
E.g., edit-target=[name='fred'][zipcode=90210].";
}
}
} // rpc insertrpclist {
description"List some NETCONF info.";
input {
choicelisttype {
mandatorytrue;
leafcommands {
typeempty;
description"List all local and remote commands";
}
leaffiles {
typeempty;
description"List all available data files.";
}
leafobjects {
typeempty;
description"List all available top-level object names.";
}
leafoids {
typeempty;
description"List all available object identifiers.";
}
leafmodules {
typeempty;
description"List all available local YANG files.";
}
leafscripts {
typeempty;
description"List all available script files.";
}
} // choice listtypeleafmodule {
typent:NcxIdentifier;
description"List only from this module, if specified.";
}
usesncxapp:HelpMode;
}
} // rpc listrpclog-debug {
description"Write a message to the output log if the log-level
is greater or equal to 'debug'.";
input {
ncx:default-parm"msg";
leafmsg {
typestring;
mandatorytrue;
description"The formatted text string to write to the log.";
}
}
} // rpc log-debugrpclog-info {
description"Write a message to the output log if the log-level
is greater or equal to 'info'.";
input {
ncx:default-parm"msg";
leafmsg {
typestring;
mandatorytrue;
description"The formatted text string to write to the log.";
}
}
} // rpc log-inforpclog-error {
description"Write a message to the output log if the log-level
is greater or equal to 'error'.";
input {
ncx:default-parm"msg";
leafmsg {
typestring;
mandatorytrue;
description"The formatted text string to write to the log.";
}
}
} // rpc log-errorrpclog-warn {
description"Write a message to the output log if the log-level
is greater or equal to 'warn'.";
input {
ncx:default-parm"msg";
leafmsg {
typestring;
mandatorytrue;
description"The formatted text string to write to the log.";
}
}
} // rpc log-warnrpcmerge {
description"Merge some NETCONF config data with the edit-config operation";
input {
ncx:default-parm"target";
usesEditParms;
}
} // rpc mergerpcmgrload {
description"Load a module or other file into the client.
Use the 'load' command to load a module into
the server.";
input {
ncx:default-parm"module";
leafmodule {
typent:NcxName;
mandatorytrue;
description"Module name to load";
}
leafrevision {
typent:Date;
description"Module revision to load.";
}
usesncxapp:DeviationParm;
}
} // rpc mgrloadrpcpwd {
description"Print the current working directory.";
} // rpc pwdrpcnvsave {
description"Save the running datastore to the startup datastore.";
} // rpc nvsaverpcquit {
description"Quit the yangcli-pro application";
} // rpc quitrpcrecall {
description"Recall the specified command line history
buffer entry into the current command line.";
input {
ncx:default-parm"index";
leafindex {
typeLogIndex;
mandatorytrue;
description"Index [0..N] of the command line
history entry to recall.";
}
}
} // rpc recallrpcrelease-locks {
description"Unlock all the server databases that were
previously locked with the get-locks command.";
} // rpc release-locksrpcreplace {
description"Create some NETCONF config data with the edit-config operation";
input {
ncx:default-parm"target";
usesEditParms;
}
} // rpc replacerpcremove {
description"Remove some NETCONF config data with the edit-config operation";
input {
ncx:default-parm"target";
leaftarget {
typestring;
mandatorytrue;
description"Xpath expression indicating the node which is going
to be deleted.";
}
anyxmlvalue {
description"Contains a string representing the content
to use for the variable. Only applies if the
target is a leaf-list node.";
}
}
} // rpc removerpcremove-all {
description"Remove some NETCONF config data with the edit-config operation.
Remove all instances of a leaf-list or list object.";
input {
ncx:default-parm"target";
choicedelete-target {
mandatorytrue;
leaftarget {
typestring;
description"Xpath expression indicating the list or leaf-list nodes
which are going to be removed.";
}
leafurltarget {
typeywt:UrlPath;
description"The URL path expression to use in the remove
operation.";
}
} // choice delete-target
}
} // rpc remove-allrpcrun {
description"Internal command to run a script.";
input {
ncx:default-parm"script";
leafscript {
typestring;
mandatorytrue;
description"script filespec to run";
}
leafP1 {
typestring;
description"script parameter $1";
}
leafP2 {
typestring;
description"script parameter $2";
}
leafP3 {
typestring;
description"script parameter $3";
}
leafP4 {
typestring;
description"script parameter $4";
}
leafP5 {
typestring;
description"script parameter $5";
}
leafP6 {
typestring;
description"script parameter $6";
}
leafP7 {
typestring;
description"script parameter $7";
}
leafP8 {
typestring;
description"script parameter $8";
}
leafP9 {
typestring;
description"script parameter $9";
}
}
} // rpc runrpcsave {
description"Meta command to save configuration edits.";
} // rpc saverpcdevice-cfg {
description"Access a device configuration";
input {
choicedevice-action {
default'show-case';
caseshow-case {
leafshow {
typeIdentifierOrZero;
default"";
description"Show the specified device or the current device
if an empty string is entered.";
}
usesncxapp:HelpMode;
} // case show-caseleafdelete {
typent:NcxIdentifier;
description"Delete the specified device from the saved
devices in memory.";
}
leafsave {
typent:NcxIdentifier;
description"Save the specified device to the
saved devices in memory.";
}
} // choice device-action
}
} // rpc device-cfgrpcdevices-cfg {
description"Controls access to the saved devices file";
input {
choicedevices-action {
default'show-case';
caseshow-case {
leafshow {
typeempty;
description"Show all saved devices in memory";
}
usesncxapp:HelpMode;
} // case show-caseleafclear {
typeempty;
description"Clear all the saved sessions in memory.
Use 'sessions load' to restore the saved sessions.
Use 'sessions save' to clear the saved sessions
file.";
}
leafload {
typestring;
default"~/.yumapro/.yangcli_pro_devices.conf";
description"Load the saved sessions in memory from the
specified file spec.";
}
leafsave {
typestring;
default"~/.yumapro/.yangcli_pro_devices.conf";
description"Save the current saved devices in memory to the
specified saved users filespec.";
}
} // choice devices-action
}
} // rpc devices-cfgrpcsession {
description"Access an active session";
input {
leafset-current {
typent:NcxIdentifier;
mandatorytrue;
description"Set the specified session or group as the current session.
The named session or group must already be loaded in memory.";
}
}
} // rpc sessionrpcsession-cfg {
description"Access a session configuration";
input {
choicesession-action {
default'show-case';
caseshow-case {
leafshow {
typeIdentifierOrZero;
default"";
description"Show the specified session or the current session
if an empty string is entered.";
}
usesncxapp:HelpMode;
} // case show-caseleafdelete {
typent:NcxIdentifier;
description"Delete the specified session from the saved
sessions in memory.";
}
leafsave {
typent:NcxIdentifier;
description"Save the specified session to the
saved sessions in memory.";
}
} // choice session-action
}
} // rpc session-cfgrpcuser-cfg {
description"Access a user configuration";
input {
choiceuser-action {
default'show-case';
caseshow-case {
leafshow {
typeIdentifierOrZero;
default"";
description"Show the specified user or the current user
if an empty string is entered.";
}
usesncxapp:HelpMode;
} // case show-caseleafdelete {
typent:NcxIdentifier;
description"Delete the specified user from the saved
users in memory.";
}
leafsave {
typent:NcxIdentifier;
description"Save the specified user to the
saved users in memory.";
}
casecreate {
leafcreate {
typent:NcxName;
mandatorytrue;
description"An user id to use to create a new user.";
}
leafuser-name {
typent:NcxName;
mandatorytrue;
description"An user name to use to create a new user.";
}
leafpassword {
ncx:password;
typestring;
mandatorytrue;
description"An user password to use to create a new user.";
}
} // case create
} // choice user-action
}
} // rpc user-cfgrpcusers-cfg {
description"Controls access to the saved users file";
input {
choiceusers-action {
default'show-case';
caseshow-case {
leafshow {
typeempty;
description"Show all saved users in memory";
}
usesncxapp:HelpMode;
} // case show-caseleafclear {
typeempty;
description"Clear all the saved users in memory.
Use 'users load' to restore the saved users.
Use 'users save' to clear the saved users
file.";
}
leafload {
typestring;
default"~/.yumapro/.yangcli_pro_users.conf";
description"Load the saved users in memory from the
specified file spec.";
}
leafsave {
typestring;
default"~/.yumapro/.yangcli_pro_users.conf";
description"Save the current saved users in memory to the
specified saved users filespec.";
}
} // choice users-action
}
} // rpc users-cfgrpcsessions-cfg {
description"Controls access to the saved sessions file";
input {
choicesessions-action {
default'show-case';
caseshow-case {
leafshow {
typeempty;
description"Show all saved sessions in memory";
}
usesncxapp:HelpMode;
} // case show-caseleafclear {
typeempty;
description"Clear all the saved sessions in memory.
Use 'sessions load' to restore the saved sessions.
Use 'sessions save' to clear the saved sessions
file.";
}
leafload {
typestring;
default"~/.yumapro/.yangcli_pro_sessions.conf";
description"Load the saved sessions in memory from the
specified file spec.";
}
leafsave {
typestring;
default"~/.yumapro/.yangcli_pro_sessions.conf";
description"Save the current saved sessions in memory to the
specified saved sessions filespec.";
}
} // choice sessions-action
}
} // rpc sessions-cfgrpcsget {
description"Get some NETCONF running config or state data with the get
operation, using an optional subtree filter.";
input {
ncx:default-parm"target";
usesCommonPduParms;
usesSGetParms;
}
output {
anyxmldata {
description"The data resulting from the retrieval operation.";
}
}
} // rpc sgetrpcsget-config {
description"Get some NETCONF config data with the get-config
operation, using an optional subtree filter.";
input {
ncx:default-parm"target";
usesCommonPduParms;
usesSGetParms;
containersource {
description"Particular configuration to retrieve.";
choiceconfig-source {
mandatorytrue;
leafcandidate {
if-featurenc:candidate;
typeempty;
description"Only available if 'candidate' capability supported.";
}
leafrunning {
typeempty;
}
leafstartup {
if-featurenc:startup;
typeempty;
description"Only available if 'startup' capability supported.";
}
leafurl {
if-featurenc:url;
typenc:ConfigURIType;
description"URL pointing to config data. Only available
if 'url' capability supported.";
}
} // choice config-source
} // container source
}
output {
anyxmldata {
description"The data resulting from the retrieval operation.";
}
}
} // rpc sget-configrpcshow {
description"Local show command for yangcli-pro session info.";
input {
choiceshowtype {
mandatorytrue;
leafcache {
typeempty;
description"Show the yangcli-pro YANG module cache.";
}
leafcli {
typeempty;
description"Show the yangcli-pro CLI parameters.";
}
leafdiff {
typeempty;
description"Show the differences between current config
and the edits that have not been applied yet.";
}
leafedit {
typeempty;
description"Show the subtree that is the current node which
is from the current edit, not the stored config.";
}
leafconnected {
typeempty;
description"Show all connected sessions.";
}
leafmodule {
typent:NcxIdentifier;
description"Show full info for one module loaded
within the current session.";
}
leafmodules {
typeempty;
description"Show info for all modules loaded within the
current session.";
}
leafmodules-state {
typeempty;
description"Show info for cached modules-state for each server.";
}
leaflocal {
typent:NcxName;
description"Show info for one local user variable.";
}
leaflocals {
typeempty;
description"Show info for all local user variables.";
}
leafglobal {
typent:NcxName;
description"Show full info for one global user variable.";
}
leafglobals {
typeempty;
description"Show info for all global user variables.";
}
leafgroup-vars {
typeIdentifierOrZero;
description"Show the group-specific user variables for the
named group. A zero-length string means show
the variables for the group of the current session.";
}
leafobjects {
typeempty;
description"Show config database objects loaded within the
current session.";
}
caserunning {
leafrunning {
typeempty;
mandatorytrue;
description"Show entire config for the current session
error if there is no current session.";
}
usesSelectParm;
} // case runningleafsession {
typeempty;
description"Show the current session info, including the initial
server capabilities for the session.";
}
leafsession-vars {
typeIdentifierOrZero;
description"Show the session-specific user variables for the
named session. An empty string means show the
variables for the current session.";
}
leafsystem {
typeempty;
description"Show the read-only system environment variables
and the read-write yangcli-pro program variables.";
}
leafterminal {
typeempty;
description"Show the terminal settings.";
}
leafvar {
typent:NcxName;
description"Show info for one local or global variable.";
}
leafvars {
typeempty;
description"Show truncated info for all program variables";
}
leafversion {
typeempty;
description"Show yangcli-pro version info.";
}
} // choice showtypeusesncxapp:HelpMode;
}
} // rpc showrpcstart-rpc-timing {
description"Start collecting RPC timing statistics for the current session.
Will set $$echo-replies to false and $$time-rpcs to true
WIll record stats to output file if specified.";
input {
ncx:default-parm"statfile";
leafstatfile {
typestring {
length"1 .. max";
}
description"The file specification for the timing statistics.";
}
}
} // rpc start-rpc-timingrpcstart-session {
description"Start an active session from the specified configured
session.";
input {
ncx:default-parm"name";
leafname {
typent:NcxIdentifier;
description"The name of the session to start.";
}
}
} // rpc start-sessionrpcstart-timer {
description"Start a timer to do simple performance measurements.";
input {
ncx:default-parm"id";
leafid {
typeTimerId;
default'0';
description"The timer ID to use.";
}
leafrestart-ok {
typeboolean;
default'true';
description"Indicates whether the timer will be used if
it is already running. If 'true', the timer
will be restarted if it is already running.
If 'false', an error will occur if the timer
is already running.";
}
}
} // rpc start-timerrpcstop-rpc-timing {
description"Stop collecting RPC timing statistics for the current session.
Will set session $$echo-replies to true and
$$time-rpcs-state to false. Will close the stats file,
if opened.";
} // rpc stop-rpc-timingrpcstop-session {
description"Terminate an active session.";
input {
ncx:default-parm"name";
leafname {
typent:NcxIdentifier;
mandatorytrue;
description"The name of the session to stop.";
}
}
} // rpc stop-sessionrpcstop-timer {
description"Stop a timer and output the delta value.";
input {
ncx:default-parm"id";
leafid {
typeTimerId;
default'0';
description"The timer ID to use.";
}
leafecho {
typeboolean;
default'true';
description"Echo the elapsed time value to screen if in
interactive mode, as well as the log if the
log is a file instead of stdout.";
}
}
output {
leafdelta {
typedecimal64 {
fraction-digits6;
}
units"seconds";
description"The elapsed time since the timer started.";
}
}
} // rpc stop-timerrpcrecord-test {
description"Use the unit test-suite automatic test recording feature.
Only one test can be recorded at a time. Either cancel
or finish a test in progress in order to start recording
a new test.";
input {
choicerecord-test-action {
mandatorytrue;
description"The recording action to perform.";
leafcancel {
typeempty;
description"Stop recording for the specified test in progress,
and discard the recorded results.";
}
casestart-case {
leafstart {
typeempty;
mandatorytrue;
description"Start recording for the specified test.";
}
leafsuite-name {
typent:NcxIdentifier;
mandatorytrue;
description"The name of the test-suite that contains the test
being recorded.";
}
leaftest-name {
typent:NcxIdentifier;
mandatorytrue;
description"The name of the test being recorded.";
}
} // case start-caseleaffinish {
typeempty;
description"Finish recording for the specified test in progress
and save the recorded results in the test-suite.";
}
leafpause {
typeempty;
description"Pause recording for the specified test in progress.";
}
leafresume {
typeempty;
description"Resume recording for the specified test in progress.";
}
} // choice record-test-action
}
} // rpc record-testrpcterminal {
description"Configure the terminal settings";
input {
leaflength {
typeuint16 {
range"0 .. 511";
}
mandatorytrue;
description"Specifies the length of the terminal to use for page
mode output with the -More- prompt. This parameter
is ignored in batch mode. It is only used if the
output session is operating in interactive mode.
If the value 0 is used then the 'More' prompt will
be disabled. Otherwise this value represents the
number of lines to output for each screen in pagination
output mode.";
}
}
} // rpc terminalrpctest-suite {
description"Use the unit test-suite feature.";
input {
leafsuite-name {
typent:NcxIdentifier;
must"../delete or ../delete-test";
description"The name of the test-suite that contains the test
being recorded. Used for start, delete, and
delete-test sub-commands only.";
}
leaflog {
typestring;
must"../start or ../run-all";
description"The file pathspec of the test suite result file
to use, or an empty string to use STDOUT.";
}
choicetest-suite-action {
default'show-case';
leafdelete {
typeempty;
must"../suite-name";
description"Delete the specified test-suite. The suite-name
parameter must also be present.";
}
casedelete-test-case {
leafdelete-test {
typeempty;
must"../suite-name";
description"Delete the specified test. The suite-name
and test-name parameters must also be present.";
}
leaftest-name {
typent:NcxIdentifier;
mandatorytrue;
description"The name of the test being recorded.";
}
} // case delete-test-casecaseshow-case {
leafshow {
typeIdentifierOrZero;
default"";
description"Show the specified test-suite or the current
test-suite if an empty string is entered.";
}
usesncxapp:HelpMode;
} // case show-caseleafload {
typestring;
default"~/.yumapro/yangcli_pro_tests.conf";
description"The file pathspec of the test suite config file
to load.";
}
leafrun-all {
typeempty;
description"Run all the test-suites defined in the test suite
config file.";
}
leafstart {
typent:NcxIdentifier;
description"Start running the specified test-suite";
}
leafsave {
typestring;
default"~/.yumapro/yangcli_pro_tests.conf";
description"Save the current test-suite configuration to the
specified (or default) config file.";
}
} // choice test-suite-action
}
} // rpc test-suiterpcupdate-config {
description"Update the configuration cache for the current session.
The current session must be connected and the
$$autoconfig system variable must be 'true',
or an error will be returned.";
} // rpc update-configrpcunset {
description"Delete a specific yangcli-pro command alias.
* Delete one alias 'foo':
yangcli-pro> unset foo
";
input {
leafname {
typent:NcxName;
mandatorytrue;
description"Name of the yangcli-pro command alias to delete.";
}
}
} // rpc unsetrpcuservars {
description"Manage the yangcli-pro user variables";
input {
choiceuservars-action {
mandatorytrue;
leafclear {
typeempty;
description"Delete all the yangcli-pro user variables from memory.";
}
leafload {
typestring;
default"~/.yumapro/yangcli_pro_uservars.xml";
description"Load the yangcli-pro user variables from the
specified XML file spec. The default user variables
file will be loaded automatically at startup
if the '--autouservars' parameter is present.
The container 'vars' data structure represents
the format of the XML file expected.";
}
leafsave {
typestring;
default"~/.yumapro/yangcli_pro_uservars.xml";
description"Save the yangcli-pro user variables to the
specified filespec. The default user variables
file will be saved automatically at shutdown
if the '--autouservars' parameter is present.
The container 'vars' data structure represents
the format of the XML file that will be written.";
}
} // choice uservars-action
}
} // rpc uservarsrpcwhile {
description"Evaluate an XPath expression locally on the manager.
and execute the block of commands that follow
while the expression is true. The block ends
when a matching 'end' command is reached.
";
input {
ncx:default-parm"expr";
usesXPathParms;
leafmaxloops {
typeuint32;
default'65535';
description"Set a maximum number of loops that can be
iterated for this while command.
The value zero means that no maximum will be
enforced. Use this mode with caution.";
}
}
} // rpc whilerpcxget {
description"Get some NETCONF running config or state data with the get
operation, using an optional XPath filter.";
input {
ncx:default-parm"select";
usesXGetParms;
}
output {
anyxmldata {
description"The data resulting from the retrieval operation.";
}
}
} // rpc xgetrpcxget-config {
description"Get some NETCONF config data with the get-config
operation, using an optional XPath filter.";
input {
ncx:default-parm"select";
usesXGetParms;
containersource {
description"Particular configuration to retrieve.";
choiceconfig-source {
mandatorytrue;
leafcandidate {
if-featurenc:candidate;
typeempty;
description"Only available if 'candidate' capability supported.";
}
leafrunning {
typeempty;
}
leafstartup {
if-featurenc:startup;
typeempty;
description"Only available if 'startup' capability supported.";
}
leafurl {
if-featurenc:url;
typenc:ConfigURIType;
description"URL pointing to config data. Only available
if 'url' capability supported.";
}
} // choice config-source
} // container source
}
output {
anyxmldata {
description"The data resulting from the retrieval operation.";
}
}
} // rpc xget-configgroupingVarsContainer {
} // grouping VarsContainerusesVarsContainer;
containersaved-devices {
ncx:abstract;
description"Represents all the saved devices in
the ~/.yumapro/yangcli_pro_devices file.
Use the 'devices' command to access this file.
Edit by hand only if you follow this YANG definition.";
listdevice {
key "name";
description"The list of devices to use during this test-suite.";
leafname {
typent:NcxName;
description"The name of the saved device.
The 'device save' command will use the
string <user>@<server-address> as the default.";
}
leafdevicetype {
typestring;
description"Device type for NETCONF devices.";
}
leafserver {
typeinet:host;
mandatorytrue;
description"IP address or DNS name of the NETCONF server target.";
}
leafncport {
typeuint16 {
range"1..max";
}
default'830';
description"NETCONF port number to use. If not present, then
port 830, followed by port 22, will be tried.";
}
usesEntryPointParm;
usesncxapp:ProtocolsParm;
} // list device
} // container saved-devicescontainersaved-sessions {
ncx:abstract;
description"Represents all the saved sessions in
the ~/.yumapro/yangcli_pro_sessions file.
Use the 'sessions' command to access this file.
Edit by hand only if you follow this YANG definition.";
listsession {
key "name";
description"The list of sessions to use during this test-suite.";
leafname {
typent:NcxName;
description"The name of the saved session.
The 'session save' command will use the
string <user>@<server-address> as the default.";
}
leafdevice {
typent:NcxDeviceName;
mandatorytrue;
description"Device name of the NETCONF server target.";
}
leafuserid {
typent:NcxName;
mandatorytrue;
description"User Id of the NETCONF user.";
}
leafuser {
typent:NcxName;
mandatorytrue;
description"The user name of the session.";
}
choicepass {
mandatorytrue;
leafpassword {
ncx:password;
typestring;
description"User password to use for NETCONF sessions.
If none, then user will be prompted before connecting.";
}
leafno-password {
typeempty;
}
} // choice passusesSshKeyParms;
usesSslKeyParms;
leafserver {
typeinet:host;
mandatorytrue;
description"IP address or DNS name of the NETCONF server target.";
}
leafncport {
typeuint16 {
range"1..max";
}
default'830';
description"NETCONF port number to use. If not present, then
port 830, followed by port 22, will be tried.";
}
usesEntryPointParm;
usesncxapp:ProtocolsParm;
containerstart-commands {
ywx:cli-text-block;
description"An optional block of yangcli commands to run
after the session is successfully started.";
} // container start-commandsusesVarsContainer;
} // list sessionlistgroup {
key "name";
description"A list of groups of sessions to manage at once.";
leafname {
typent:NcxName;
description"The name of the saved group. This name must not conflict
with any session name.";
}
leaf-listsession {
typent:NcxName;
description"The name of a session that belongs to this group.";
}
usesSessionGroupParms;
usesVarsContainer;
} // list group
} // container saved-sessionscontainersaved-users {
ncx:abstract;
description"Represents all the saved users in
the ~/.yumapro/yangcli_pro_users file.
Use the 'users' command to access this file.
Edit by hand only if you follow this YANG definition.";
listuserid {
key "name";
description"The list of users to use.";
leafname {
typent:NcxName;
description"The id of the saved user.";
}
leafuser {
typent:NcxName;
mandatorytrue;
description"The user name of the session.";
}
choicepass {
mandatorytrue;
leafpassword {
ncx:password;
typestring;
description"User password to use for NETCONF users.
If none, then user will be prompted before connecting.";
}
leafno-password {
typeempty;
}
} // choice passusesSshKeyParms;
usesSslKeyParms;
} // list userid
} // container saved-usersleafdo {
ncx:abstract;
ncx:hidden;
typestring;
description"Do <command>, Execute a normal mode command in config mode";
}
leafno {
ncx:abstract;
ncx:hidden;
typestring;
description"No <command>, Delete or negate a command in config mode";
}
leafapply {
ncx:abstract;
ncx:hidden;
typeempty;
description"Apply the pending edits in config mode";
}
leafreturn {
ncx:abstract;
ncx:hidden;
typeempty;
description"Exit all config sub-modes and discard any pending edits";
}
containerpipe {
ncx:abstract;
ncx:hidden;
description"Pipe command sub-commands.
The 'begin', 'include', and 'exclude' parameters are used
to filter command output. If these parameters contain
any pattern meta-characters, then they will be treated
as a YANG pattern string. If a plain string is found
instead, then this string must be found in the line
to be considered a match.
Each output line is processed in the following manner:
1) if begin set and not triggered yet, then test
the line. If a match then disable this step
for future lines and continue testing output,
else skip this line.
2) check each exclude parameter. If any match then
skip this line.
3) check each include parameter. If any match then
include this line, else skip this line.
4) include the line in the output.
If the 'redirect' parameter is present then the filtered
output will be sent to a file instead of the session.
If the 'display'parameter is present then the specifed
display format will be used for the output and the
filtering format. By default, the current display-mode
is used for both filtering and output formats.";
leafbegin {
typestring;
description"Specifies the pipe begin line pattern.";
}
leaf-listinclude {
typestring;
description"Specifies a pipe include line pattern.
Multiple parameters are treated as a logical-OR
expression.";
}
leaf-listexclude {
typestring;
description"Specifies a pipe exclude line pattern.
Multiple parameters are treated as a logical-OR
expression.";
}
leafredirect {
typestring;
description"Specifies the pipe output redirect filespec.
If this filespec already exists then output
will be appended to the file.";
}
leafdisplay {
typeenumeration {
enum"xml" {
value0;
description"Display output in XML";
}
enum"json" {
value1;
description"Display output in JSON";
}
enum"curmode" {
value2;
description"Display output is the current $$display-mode";
}
}
default"curmode";
description"Specifies the pipe output display format.";
}
} // container pipe
} // module yangcli-pro