yangcli-pro

Command Line Interface for the NETCONF protocol: Client side Usage: yangcli-pro [parameters] yangcli-pro --help yangc...

  • Version: 2021-10-30

    yangcli-pro@2021-10-30


    
      module yangcli-pro {
    
        yang-version 1.1;
    
        namespace
          "http://yumaworks.com/ns/yangcli-pro";
    
        prefix yc;
    
        import ietf-origin {
          prefix or;
        }
        import ietf-yang-types {
          prefix yang;
        }
        import ietf-inet-types {
          prefix inet;
        }
        import ietf-netconf-with-defaults {
          prefix wd;
        }
        import yuma-ncx {
          prefix ncx;
        }
        import yuma-app-common {
          prefix ncxapp;
        }
        import yumaworks-types {
          prefix ywt;
        }
        import yumaworks-app-common {
          prefix ywapp;
        }
        import yumaworks-extensions {
          prefix ywx;
        }
        import yuma-types {
          prefix nt;
        }
        import yuma-netconf {
          prefix nc;
        }
        import yumaworks-restconf {
          prefix yrc;
        }
    
        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 - 2021 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 "2021-10-30" {
          description
            "Change callhome-user from leaf to leaf-list and
              support tracking failed user/server attempts
              to attempt next user if the server reconnects.";
        }
    
        revision "2021-10-21" {
          description
            "Add autoeventhandlers, use-event-handler,
              event-handlers-cfg, event-handler-cfg,
              saved-event-handlers.";
        }
    
        revision "2021-09-12" {
          description
            "Add fixed-keys to get-walk command.";
        }
    
        revision "2021-08-16" {
          description
            "Add allow-shell, shell-command, and run-shell.";
        }
    
        revision "2021-07-22" {
          description
            "Add show server-commands.";
        }
    
        revision "2021-06-30" {
          description
            "Add refresh-library command for yangcli-pro only.
               Add show search-path-module for yangcli-pro only";
        }
    
        revision "2021-04-22" {
          description
            "Add --handle-bad-reply parameter";
        }
    
        revision "2020-10-20" {
          description "Add leaflist-multi-line";
        }
    
        revision "2019-12-07" {
          description
            "Add plain and cli enums to pipe display parameter";
        }
    
        revision "2019-08-25" {
          description
            "Add sget-data and xget-data commands for NMDA support";
        }
    
        revision "2019-07-23" {
          description
            "Add --with-notif-commands parameter. yp-shell only";
        }
    
        revision "2019-07-06" {
          description
            "Add --break-key-mode parameter.
               Add prompt to user defined name for yp-shell.";
        }
    
        revision "2019-05-22" {
          description
            "Add use of with-term-msg parameter.
               Add with-enable-mode, enable, and
               restrict-edit-mode for yp-shell.
               Add CommentParm grouping; comment parm to saved users,
               devices, and sessions.";
        }
    
        revision "2019-03-30" {
          description
            "Add use of binary-display-maxlen parameter";
        }
    
        revision "2019-01-15" {
          description "Add get-walk command";
        }
    
        revision "2018-10-30" {
          description
            "Add enable-password to support privileged mode
               in yp-shell. It is only for yp-shell config mode.
               Add --history-file parameter";
        }
    
        revision "2018-08-13" {
          description
            "Add transport for saved-sessions and saved-devices.
               Add auto-discard-changes.";
        }
    
        revision "2018-07-14" {
          description
            "Add --optional CLI parameter to set default for
               $$optional variable.
               Add --fill-optional CLI parameter to set default
               for --optional RPC parameter";
        }
    
        revision "2018-06-01" {
          description
            "Add schema-server-cfg, schema-servers-cfg,
               and autoschemaserver.";
        }
    
        revision "2018-04-16" {
          description
            "Add module-tag parameter to sget* and xget* rpcs";
        }
    
        revision "2018-03-05" {
          description
            "Add insecure-ok parameter.
               Add callhome-tls-port parameter.";
        }
    
        revision "2018-02-16" {
          description "Add yangmap parameter.";
        }
    
        revision "2018-02-14" {
          description
            "Add help-width parameter.";
        }
    
        revision "2018-01-05" {
          description
            "Add config-commit-mode and config-commit.
               Add sleep command";
        }
    
        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";
        }
    
    
        typedef LogCount {
          type int32 {
            range "-1 | 1 .. max";
          }
          description
            "Number of log entries. -1 means all entries";
        }
    
        typedef LogIndex {
          type uint32;
          description "Index into a log buffer.";
        }
    
        typedef TimerId {
          type uint8 {
            range "0 .. 15";
          }
          description
            "Identifier for a local timer to use with
               the start-timer and stop-timer commands.";
        }
    
        typedef YangcliVariableType {
          type enumeration {
            enum "session" {
              value 0;
              description
                "Session variable (for future use)";
            }
            enum "local" {
              value 1;
              description "Local user variable";
            }
            enum "config" {
              value 2;
              description
                "User configuration variable";
            }
            enum "global" {
              value 3;
              description "Global user variable";
            }
            enum "system" {
              value 4;
              description "System variable";
            }
            enum "queue" {
              value 5;
              description
                "System internal Queue variable";
            }
          }
          description
            "yangcli-pro user and system variable types";
        }
    
        typedef test-result-type {
          type enumeration {
            enum "skipped" {
              value 0;
              description "Test was skipped.";
            }
            enum "pass" {
              value 1;
              description "Test passed.";
            }
            enum "fail" {
              value 2;
              description "Test failed.";
            }
          }
          description
            "The unit test general result type.";
        }
    
        typedef IdentifierOrZero {
          type union {
            type nt:NcxIdentifier;
            type string {
              length "0";
            }
          }
          description
            "Indicates an identifier or empty string to use the
             schema or application defined default.";
        }
    
        typedef config-edit-mode-type {
          type enumeration {
            enum "line" {
              value 0;
              description
                "Automatically apply a config mode edit after
                 each line";
            }
            enum "level" {
              value 1;
              description
                "Automatically apply a config mode edit when
                 the current level is exited.";
            }
            enum "manual" {
              value 2;
              description
                "Only apply a config mode edit manually with
                 the 'apply' command.";
            }
          }
          description
            "Specifies how edits will be applied in config mode.";
        }
    
        grouping SelectParm {
          leaf select {
            ncx:xpath;
            type string {
              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 SelectParm
    
        grouping FillParms {
          choice target-parm {
            leaf target {
              type yang:xpath1.0 {
                length "1..max";
              }
              mandatory true;
              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.";
            }
    
            case urltarget-case {
              leaf urltarget {
                type ywt:UrlPath;
                mandatory true;
                description
                  "URL encoded target object to fill.
                    Encoding Rules: TBD.";
              }
    
              uses ywapp:MatchParms {
                description
                  "These parameters are only supported for the
                   'urltarget' parameter.";
              }
            }  // case urltarget-case
          }  // choice target-parm
    
          leaf optional {
            type empty;
            description
              "If present, then prompt for nodes that are optional.
                If not, skip these objects.";
          }
    
          anyxml value {
            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 FillParms
    
        grouping CommonPduParms {
          description
            "Common parms for some local commands that
                 generate NETCONF PDUs";
          choice from {
            mandatory true;
            leaf varref {
              type string;
              description
                "Use the contents of the specified variable
                        as the content";
            }
    
            case from-cli {
              uses FillParms;
            }  // case from-cli
          }  // choice from
        }  // grouping CommonPduParms
    
        grouping EditParms {
          description
            "Common parms for create, merge, replace commands";
          uses CommonPduParms;
    
          leaf timeout {
            type nt:Timeout;
            description "Timeout to use";
          }
        }  // grouping EditParms
    
        grouping SGetParms {
          description
            "Common parms for sget and sget-config operations.";
          leaf nofill {
            type empty;
            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.";
          }
    
          uses ncxapp:CliWithDefaultsParm;
    
          uses yrc:depth-parameter;
    
          uses ywapp:ModuleTagParm;
        }  // grouping SGetParms
    
        grouping XGetParms {
          description
            "Common parms for xget and xget-config operations.";
          choice from {
            mandatory true;
            leaf varref {
              type string;
              description
                "Use the contents of the specified variable
                        as the content";
            }
    
            case select {
              uses SelectParm;
            }  // case select
            leaf urltarget {
              type ywt:UrlPath;
              description
                "The URL path expression to use in the retrieval
                     operation.";
            }
          }  // choice from
    
          leaf timeout {
            type nt:Timeout;
            description "Timeout to use";
          }
    
          uses ncxapp:CliWithDefaultsParm;
    
          uses yrc:depth-parameter;
    
          uses ywapp:ModuleTagParm;
    
          uses ywapp:MatchParms {
            description
              "These parameters are ignored unless the
                 'urltarget' parameter is also present.";
          }
        }  // grouping XGetParms
    
        grouping DatastoreParm {
          leaf datastore {
            type enumeration {
              enum "candidate" {
                value 0;
                description
                  "The <candidate> datastore.";
              }
              enum "running" {
                value 1;
                description
                  "The <running> datastore.";
              }
              enum "intended" {
                value 2;
                description
                  "The <intended> datastore.";
              }
              enum "startup" {
                value 3;
                description
                  "The <startup> datastore.";
              }
              enum "operational" {
                value 4;
                description
                  "The <operational> datastore.";
              }
            }
            default 'operational';
            description
              "Particular datastore to retrieve.";
          }
        }  // grouping DatastoreParm
    
        grouping ConfigFilterParm {
          leaf config-filter {
            type boolean;
            description
              "The <config-filter parm from ietf-netconf-nmda.yang
                  - not present = all
                  - true = config=true only
                  - false = config=false only
              ";
          }
        }  // grouping ConfigFilterParm
    
        grouping OriginParms {
          description
            "Filters lifted from ietf-netconf-nmda.yang";
          reference
            "RFC 8526";
    
          choice origin-filters {
            description
              "The origin-choice parameter from the get-data operation.
               These parameters will be ignored unless the datastore
               is <operational>.";
            leaf-list origin-filter {
              type or:origin-ref;
              description
                "The origin-filter parameter from ietf-netconf-nmda.yang";
            }
            leaf-list negated-origin-filter {
              type or:origin-ref;
              description
                "The negated-origin-filter parameter from ietf-netconf-nmda.yang";
            }
          }  // choice origin-filters
    
          leaf with-origin {
            type empty;
            description
              "The with-origin parameter from ietf-netconf-nmda.yang";
          }
        }  // grouping OriginParms
    
        grouping EntryPointParm {
          leaf entry-point {
            type string;
            description
              "RESTCONF entry point. Use this string instead of
                 retrieving the XRD from the RESTCONF server to
                 discover the entry point.";
          }
        }  // grouping EntryPointParm
    
        grouping ConnectParms {
          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.";
          leaf user {
            type nt:NcxUserName;
            description
              "User name to use for NETCONF sessions.";
          }
    
          leaf server {
            type inet:host;
            description
              "IP address or DNS name of the NETCONF server target.";
          }
    
          choice pass {
            leaf password {
              ncx:password;
              type string;
              description
                "User password to use for NETCONF sessions.
                   If none, then user will be prompted before connecting.";
            }
            leaf no-password {
              type empty;
              description
                "Indicates that no user password is needed for
                   the connection.";
            }
          }  // choice pass
    
          leaf ncport {
            type uint16 {
              range "1..max";
            }
            default '830';
            description
              "NETCONF port number to use.  If not present, then
                 port 830, followed by port 22, will be tried.";
          }
    
          leaf timeout {
            type nt:Timeout;
            description
              "Number of seconds to wait for a response
                 from the server before declaring a timeout.
                 Zero means do not timeout at all.";
          }
    
          uses ywapp:SshKeyParms;
    
          uses ywapp:SslKeyParms;
    
          uses ncxapp:ProtocolsParm;
    
          uses EntryPointParm;
    
          leaf transport {
            type ywt:transport-type;
            default 'ssh';
            description
              "Identifies the transport protocol that should be used.";
          }
    
          leaf encoding {
            type ywt:encoding-type;
            default 'xml';
            description
              "Identifies the desired encoding format.
                  Only supported for RESTCONF and YANG-API at this time.";
          }
        }  // grouping ConnectParms
    
        grouping XPathParms {
          description
            "Common parameters used for XPath script constructs";
          leaf expr {
            type yang:xpath1.0 {
              length "1..max";
            }
            mandatory true;
            description
              "XPath expression string to evaluate.
                 Use quotes if there are any whitespace or
                 special characters in the expression.";
          }
    
          anyxml docroot {
            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 XPathParms
    
        grouping SessionGroupParms {
          leaf missing-ok {
            type boolean;
            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.";
          }
    
          leaf missing-connect-ok {
            type boolean;
            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.";
          }
    
          leaf lost-ok {
            type boolean;
            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.";
          }
    
          leaf reconnect-tries {
            type uint32;
            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.";
          }
    
          leaf reconnect-interval {
            type uint32;
            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 SessionGroupParms
    
        grouping CommentParm {
          leaf comment {
            type string;
            description
              "User comment saved for users, devices, and sessions";
          }
        }  // grouping CommentParm
    
        container yangcli-pro {
          ncx:cli;
          description
            "CLI Parameter Set for the NETCONF Client Application.";
          leaf aliases-file {
            type string;
            default
              "~/.yumapro/.yangcli_pro_aliases";
            description
              "Specifies the yangcli-pro command aliases file to use.";
          }
    
          leaf allow-shell {
            type boolean;
            default 'false';
            description
              "Enable or disable run-shell operation.";
          }
    
          leaf ask-password {
            type boolean;
            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.";
          }
    
          leaf auto-discard-changes {
            type boolean;
            default 'false';
            description
              "Controls whether discard-change will be automatically
               sent on the errors of the edit and save mode.
               If true, discard-change will be automatically sent.
               If false, discard-change will not be automatically sent.";
          }
    
          leaf auto-keepalive {
            type boolean;
            default 'false';
            description
              "Controls whether keepalive 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.";
          }
    
          leaf auto-reconnect {
            type boolean;
            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.";
          }
    
          leaf auto-reconnect-interval {
            type uint16 {
              range "1 .. 3600";
            }
            units "seconds";
            default '10';
            description
              "Number of seconds to wait after first retry.
               The first retry will be done right away.";
          }
    
          leaf auto-reconnect-max {
            type uint16;
            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.";
          }
    
          leaf autoaliases {
            type boolean;
            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.";
          }
    
          leaf autocomp {
            type boolean;
            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.";
          }
    
          leaf autoconfig {
            type boolean;
            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.";
          }
    
          leaf autoconfig-conf-mode {
            type boolean;
            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.
               The current config will not be available to assist tab
               completion.";
          }
    
          leaf autodevices {
            type boolean;
            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.";
          }
    
          leaf autoeventhandlers {
            type boolean;
            default 'true';
            description
              "Controls whether the saved event_handlers will be loaded
               into memory at startup and saved to file at exit.
               If true, the default event-handler-cfg file will be used
               (~/.yumapro/.yangcli_pro_event_handlers.conf) for loading
               and saving the configured event-handlers in memory.
               If false, the configured event-handlers will only be stored
               and loaded manually with the event-handlers-cfg command.";
          }
    
          leaf autohistory {
            type boolean;
            default 'true';
            description
              "Controls whether the command line history buffer will
               be saved at exit and loaded at startup.
               If true, the history-file parameter will be checked
               and used if set. Otherwise 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.";
          }
    
          leaf autoload {
            type boolean;
            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.";
          }
    
          leaf autoload-cache {
            type boolean;
            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.";
          }
    
          leaf autoload-get {
            type boolean;
            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.";
          }
    
          leaf autoload-save-cache {
            type boolean;
            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.";
          }
    
          leaf autonotif {
            type boolean;
            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.
    
               This parameter does not affect echoing of
               notification messages. The --echo-notifs and
               --echo-notif-loglevel parameters need to be set
               appropriately to echo received notification messages.";
          }
    
          leaf autonvsave {
            type boolean;
            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-volatile
               memory.";
          }
    
          leaf autoschemaservers {
            type boolean;
            default 'true';
            description
              "Controls whether the saved schema servers will be loaded
               into memory at startup and saved to file at exit.
               If true, the default schemaserver-cfg file will be used
               (~/.yumapro/.yangcli_pro_schemaservers.conf) for loading
               and saving the configured devices in memory.
               If false, the configured devices will only be stored
               and loaded manually with the schemaservers-cfg command.";
          }
    
          leaf autosessions {
            type boolean;
            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.";
          }
    
          leaf autotest {
            type boolean;
            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.";
          }
    
          leaf autousers {
            type boolean;
            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.";
          }
    
          leaf autouservars {
            type boolean;
            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.";
          }
    
          leaf bad-data {
            type enumeration {
              enum "ignore" {
                value 0;
                description
                  "Silently accept invalid PDU and data model
                   parameters.  Intended for advanced server
                   testing mode only.";
              }
              enum "warn" {
                value 1;
                description
                  "Warn, but accept invalid PDU and data model
                   parameters.";
              }
              enum "check" {
                value 2;
                description
                  "Prompt the user to keep the invalid value
                   or re-enter the value.";
              }
              enum "error" {
                value 3;
                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.";
          }
    
          leaf batch-mode {
            type empty;
            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.";
          }
    
          leaf break-key-mode {
            type enumeration {
              enum "program" {
                value 0;
                description
                  "Break key will cause the program to exit no
                    matter what mode or state the program is in
                    at the moment.";
              }
              enum "command" {
                value 1;
                description
                  "Break key will cause the current command in
                    the current session to be terminated. If no
                    commnd is in progress, or currently in config mode
                    or enable mode, then the break key will have no affect.";
              }
            }
            default 'program';
            description
              "Specifies the bahavior when the break key is pressed
               during a command. The default mode is 'program' to
               maintain backward compatibility.";
          }
    
          leaf callhome-address {
            type inet: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.";
          }
    
          leaf callhome-enabled {
            type boolean;
            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.";
          }
    
          leaf callhome-port {
            type inet:port-number;
            default '4334';
            description
              "Identifies the TCP port that should be used to listen
               for NETCONF over SSH callhome connections. Ignored if
               callhome-enabled is false.";
            reference
              "RFC 8071";
    
          }
    
          leaf callhome-tls-port {
            type inet:port-number;
            default '4335';
            description
              "Identifies the TCP port that should be used to listen
               for NETCONF over TLS callhome connections. Ignored if
               callhome-enabled is false.";
            reference
              "RFC 8071";
    
          }
    
          leaf-list callhome-user {
            type nt:NcxUserName;
            ordered-by user;
            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.
    
               If a callhome session is attempted with an entry
               and that connection fails, then that callhome-user
               will not be attempted for the specific server address
               until yangcli-pro is restarted. This only applies
               if there are multiple callhome-user entries.
    
               If only one callhome-user entry exists then it will
               be used every time, to be backward-compatible with
               previous releases.
    
               If used in yp-client then it is possible an application
               callback will pick the callhome-user for a specific address.
               It that case, the ordered-by user property will be
               ignored.  Otherwise the callhome-user entries are attempted
               in the order they are processed from the CLI or configuration
               file.";
          }
    
          leaf check-output {
            type boolean;
            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.";
          }
    
          leaf check-output-error {
            type boolean;
            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.";
          }
    
          leaf check-replies {
            type boolean;
            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.";
          }
    
          leaf check-replies-error {
            type boolean;
            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.";
          }
    
          leaf config-autosave {
            type boolean;
            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.";
          }
    
          leaf config-commit-mode {
            type boolean;
            default 'false';
            description
              "If 'true' then edits done in config mode will be made to
               the candidate datastore if possible. The edits will not
               be committed to the running datastore automatically.
               Instead, <config-commit> command in config mode, or <commit>
               operation in normal mode is required to activate the edits
               in the server. If 'false' then edits done in config mode
               will be committed to the running datastore after each
               'apply' or 'exit' command in config mode.";
          }
    
          leaf config-edit-mode {
            type config-edit-mode-type;
            default 'level';
            description
              "Controls how edits are applied during config mode.";
          }
    
          leaf default-module {
            type nt: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-list disable-command {
            type nt: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
                ";
          }
    
          leaf display-mode {
            type enumeration {
              enum "plain" {
                value 0;
                description
                  "Plain identifier without any prefix format.";
              }
              enum "prefix" {
                value 1;
                description
                  "Plain text with XML prefix added format.";
              }
              enum "module" {
                value 2;
                description
                  "Plain text with module name as prefix added format.";
              }
              enum "xml" {
                value 3;
                description "XML format.";
              }
              enum "xml-nons" {
                value 4;
                description
                  "XML format, but no namespace (xmlns) attributes
                     will be generated.";
              }
              enum "json" {
                value 5;
                description "JSON format.";
              }
              enum "cli" {
                value 6;
                description "CLI format.";
              }
            }
            default 'plain';
            description
              "Controls how values are displayed during output
                to STDOUT or a log file.";
          }
    
          leaf echo-notif-loglevel {
            type nt: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.
    
               The default is different on yp-shell (debug) and
               yangcli-pro (info). The YANG default is not used
               correctly.";
          }
    
          leaf echo-notifs {
            type boolean;
            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.
    
               If --autonotif=true then this parameter will also
               be set to true.
    
               The default is different on yp-shell (false) than
               yangcli-pro (true). The YANG default is not used
               correctly.";
          }
    
          leaf echo-replies {
            type boolean;
            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.";
          }
    
          leaf fill-optional {
            type boolean;
            default 'false';
            description
              "Sets the default for the --optional parameter that can
               be passed to many interactive commands such as 'fill'
               or 'create'.
    
               If 'true' then the user will be prompted to enter
               optional nodes while filling YANG datastore content.
    
               If 'false' then the user will not be prompted to enter
               optional nodes while filling YANG datastore content.";
          }
    
          leaf fixorder {
            type boolean;
            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";
          }
    
          leaf force-target {
            type enumeration {
              enum "candidate" {
                value 0;
                description
                  "Force default edit target to be candidate.";
              }
              enum "running" {
                value 1;
                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.";
          }
    
          leaf handle-bad-reply {
            type enumeration {
              enum "adapt" {
                value 0;
                description
                  " - Leaf or leaf-list: convert bad value to a string value
                      and try to keep it if possible or prune if not.
                    - Container or list: leave in the data if
                      possible or prune if not.";
              }
              enum "prune" {
                value 1;
                description
                  "Prune failing node(s).";
              }
              enum "error" {
                value 2;
                description
                  "Do not attempt to prune or modify nodes. Report an error.";
              }
            }
            default 'error';
            description
              "Controls the behavior of the XML parser and dictates
               how a bad RPC reply will be handled, whether the bad
               node(s) will be pruned or the value will be adapted
               and the client will try to convert it to an acceptable
               type.";
          }
    
          leaf help-width {
            type uint16 {
              range "80 .. 511";
            }
            default '80';
            description
              "The line width to use when displaying help text for the
               help key '?' within config term mode.
    
               This help mode aligns the description to the right
               of the widest object node name being displayed.
    
               If the 'help' extension is used, then that text is
               displayed in its entirety. Otherwise the total line
               width will be limited to this help-width value.";
          }
    
          leaf history-file {
            type string;
            default
              "~/.yumapro/.yangcli_pro_history";
            description
              "Specifies the file location for the libtecla command
               line history file used if autohistory is 'true'. This
               file will be created if it does not exist and the
               autohistory parameter is 'true'.";
          }
    
          leaf keepalive-interval {
            type uint32 {
              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.";
          }
    
          leaf leaflist-multi-line {
            type boolean;
            default 'false';
            description
              "Controls how the leaflist can be edited in config-mode.
               If true, multiple leaf-lists can be configured at the
               same line. If false, only one leaf-list can be configured
               and it must be configured at the end of the line.";
          }
    
          leaf no-aliases {
            type empty;
            description
              "Disables the alias substitution feature.
               The alias file will not be read.
               The aliases and alias commands will be disabled.";
          }
    
          leaf optional {
            type boolean;
            default 'false';
            description
              "Sets the default for the $$optional global variable.
               If 'true' then the user will be prompted to enter
               optional nodes for all input.
    
               If 'false' then the user will not be prompted to enter
               optional nodes for all input.
    
               This parameter affects all YANG input and should normally
               not be used. The fill-optional parameter should be used
               instead.";
          }
    
          leaf prompt {
            type string {
              length "1 .. 512";
            }
            description
              "Set the prompt to the user defined value.
                This parameter is supported only for yp-shell.
                The prompt can also be set using the $$prompt variable
                at any time.  If the --prompt CLI parameter is set
                then that value will be used as the prompt when yp-shell starts.
                If prompt is used, prompt-name and prompt-type will be ignored.";
          }
    
          leaf prompt-name {
            type string {
              length "1 .. 512";
            }
            description
              "Customize a prompt name for yp-shell.";
          }
    
          leaf prompt-type {
            type ywt:show-mode;
            default 'normal';
            description
              "Selects the type of prompt string that will be used
               in interactive mode.";
          }
    
          leaf restrict-edit-mode {
            type boolean;
            default 'false';
            description
              "If true then the yp-shell editing commands (create, merge,
               replace, delete, remove, insert, delete-all, remove-all, nvsave)
               will not be available to the user. Also, the NETCONF edit-config,
               copy-config, delete-config, commit, cancel-commit, discard-changes
               commands will not be available to the user.
    
               If true then only the config mode will be available for
               editing configuration data on the server.
    
               This parameter can be used instead of specifying individual
               disable-command parameters for the editing commands.";
          }
    
          choice run-startup-mode {
            leaf run-command {
              type string {
                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.";
            }
            leaf run-script {
              type string {
                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-mode
    
          leaf script-input {
            type boolean;
            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.";
          }
    
          leaf server-commands {
            type boolean;
            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.";
          }
    
          leaf shell-command {
            type string;
            default "/bin/bash";
            description
              "The shell program to invoke with the 'run-shell' command,
               in case the default cannot be used.";
          }
    
          leaf term-length {
            type uint16 {
              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.";
          }
    
          leaf test-suite-file {
            type string;
            default
              "~/.yumapro/yangcli_pro_tests.conf";
            description
              "Specifies the yangcli-pro test suite config
               file to use.";
          }
    
          leaf time-rpcs {
            type boolean;
            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.";
          }
    
          leaf time-rpcs-stats {
            type boolean;
            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.";
          }
    
          leaf time-rpcs-stats-file {
            type string {
              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.";
          }
    
          leaf use-rawxml {
            type boolean;
            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.";
          }
    
          leaf use-traceid {
            type boolean;
            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.";
          }
    
          leaf use-xmlheader {
            type boolean;
            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.";
          }
    
          leaf uservars-file {
            type string;
            default
              "~/.yumapro/yangcli_pro_uservars.xml";
            description
              "Specifies the yangcli-pro user variables file to use.";
          }
    
          uses ncxapp:NcxAppCommon;
    
          uses ncxapp:NewConfigParm;
    
          uses ywapp:LoggingCommonParms;
    
          uses ywapp:MessageIndentParm;
    
          leaf with-enable-mode {
            type boolean;
            default 'false';
            description
              "Controls whether an 'enable mode' will be supported
               for yp-shell.
    
               If 'true', the user must enter the 'enable' command
               to enter enable mode. If the 'enable password' has been
               configured then this password must be provided by the
               user in order to enter enable mode. Within enable mode,
               the 'config term' command can be used to enter
               configuration mode.
    
               If 'false', then enable mode will not be used and
               the 'enable' and 'enable password' will not be present.";
          }
    
          leaf with-notif-commands {
            type boolean;
            default 'false';
            description
              "Specifies that yp-shell should include the
               create-subscription and cancel-subscription commands.
               This parameter does not affect yp-shell echoing of
               notification messages. The --echo-notifs and
               --echo-notif-loglevel parameters need to be set
               appropriately to echo received notification messages.";
          }
    
          leaf-list yangmap {
            type string;
            description
              "Specifies a yangmap XML file that should be loaded
               into the program. See yumaworks-yangmap.yang for
               details on using YANG mappings in config term mode.";
          }
    
          uses ywapp:YumaproHomeParm;
    
          uses ywapp:DataTemplateParms;
    
          uses ywapp:UseSessionVarsParm;
    
          uses ywapp:SaveSessionVarsParm;
    
          uses ncxapp:CommonFeatureParms;
    
          uses ncxapp:SubdirsParm;
    
          uses ncxapp:HomeParm;
    
          uses ConnectParms;
    
          uses ywapp:OcPatternParm;
    
          uses ywapp:BinaryDisplayMaxlenParm;
    
          uses ywapp:MatchParms {
            refine match-names {
              default 'one-nocase';
            }
    
            refine alt-names {
              default 'true';
            }
    
            refine wildcard-keys {
              default 'false';
            }
          }
    
          uses ywapp:WithTermMsgParm;
    
          uses ncxapp:ModuleParm;
    
          uses ncxapp:DeviationParm;
    
          uses ncxapp:DatapathParm;
    
          uses ncxapp:RunpathParm;
    
          uses ywapp:InsecureOkParm;
        }  // container yangcli-pro
    
        rpc action {
          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";
            uses CommonPduParms;
    
            leaf timeout {
              type nt:Timeout;
              description "Timeout to use";
            }
          }
        }  // rpc action
    
        rpc alias {
          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;
            leaf var {
              type string {
                length "1 .. max";
              }
              description
                "The alias command string.";
            }
          }
        }  // rpc alias
    
        rpc aliases {
          description
            "Manage the yangcli-pro command aliases";
          input {
            choice alias-action {
              default 'show';
              leaf show {
                type empty;
                description
                  "Show all the yangcli-pro command aliases.";
              }
              leaf clear {
                type empty;
                description
                  "Delete all the yangcli-pro aliases from memory.";
              }
              leaf load {
                type string;
                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.";
              }
              leaf save {
                type string;
                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 aliases
    
        rpc auto-test {
          description
            "Run automatic edit testing on the specified object";
          input {
            ncx:default-parm "target";
            leaf target {
              ncx:schema-instance;
              type string;
              mandatory true;
              description
                "Schema-instance identifier string indicating the
                  node which is going to be tested.";
            }
    
            leaf session-name {
              type nt:NcxIdentifier;
              description
                "Named session to use for the testing.  If missing the
                 current session will be used.";
            }
    
            leaf iterations {
              type uint32 {
                range "1..max";
              }
              default '1';
              description
                "Number of commits to make.";
            }
          }
        }  // rpc auto-test
    
        rpc cache {
          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 {
            choice cache-input {
              mandatory true;
              leaf clear {
                type empty;
                description
                  "Clear the YANG module cache on disk.";
              }
    
              case delete-cache {
                leaf delete {
                  type nt:NcxIdentifier;
                  mandatory true;
                  description
                    "Name of the module to delete from the YANG
                     module cache.";
                }
    
                leaf revision {
                  type nt: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 cache
    
        rpc cd {
          description
            "Change the current working directory.";
          input {
            ncx:default-parm "dir";
            leaf dir {
              type string;
              mandatory true;
              description
                "Directory path to use.";
            }
          }
        }  // rpc cd
    
        rpc clear {
          description
            "Clear the screen in interactive mode.";
        }  // rpc clear
    
        rpc config {
          description
            "Enter the configuration mode for the current session.
             There must be a current active session or this command
             will fail.";
          input {
            choice config-source {
              default 'term';
              leaf term {
                type empty;
                description
                  "Use the terminal for configuration input.";
              }
            }  // choice config-source
          }
        }  // rpc config
    
        rpc connect {
          description
            "Connect to a NETCONF server.";
          input {
            ncx:default-parm "server";
            uses ConnectParms {
              refine user {
                mandatory true;
              }
    
              refine server {
                mandatory true;
              }
    
              refine pass {
                mandatory true;
              }
            }
    
            leaf session-name {
              type nt:NcxIdentifier;
              description
                "Create a new session configuration record
                 using this new session name.";
            }
          }
        }  // rpc connect
    
        rpc create {
          description
            "Create some NETCONF config data with the edit-config operation";
          input {
            ncx:default-parm "target";
            uses EditParms;
          }
        }  // rpc create
    
        rpc delete {
          description
            "Delete some NETCONF config data with the edit-config operation";
          input {
            ncx:default-parm "target";
            choice delete-target {
              mandatory true;
              leaf target {
                type string;
                description
                  "Xpath expression indicating the node which is going
                  to be deleted.";
              }
              leaf urltarget {
                type ywt:UrlPath;
                description
                  "The URL path expression to use in the delete
                   operation.";
              }
            }  // choice delete-target
    
            anyxml value {
              description
                "Contains a string representing the content
                to use for the variable.  Only applies if the
                delete-target is a leaf-list node.";
            }
          }
        }  // rpc delete
    
        rpc delete-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";
            choice delete-target {
              mandatory true;
              leaf target {
                type string;
                description
                  "Xpath expression indicating the list or leaf-list nodes
                  which are going to be deleted.";
              }
              leaf urltarget {
                type ywt:UrlPath;
                description
                  "The URL path expression to use in the delete
                   operation.";
              }
            }  // choice delete-target
          }
        }  // rpc delete-all
    
        rpc elif {
          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";
            uses XPathParms;
          }
        }  // rpc elif
    
        rpc else {
          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 else
    
        rpc enable {
          description
            "Use 'enable' to enter enable mode for yp-shell.
             Use 'enable password' to configure the password.
             Use 'enable no-password' to remove the password.
    
             If a password has been set, then it will be required to
             enter enable mode.";
          input {
            choice pass {
              leaf password {
                ncx:password;
                type string;
                description
                  "Configure the password.";
              }
              leaf no-password {
                type empty;
                description
                  "Remove the password.";
              }
            }  // choice pass
          }
        }  // rpc enable
    
        rpc enable-password {
          description
            "Use <enable-password> to config the password in
           the config mode for yp-shell.";
          input {
            leaf password {
              ncx:password;
              type string;
              mandatory true;
              description
                "Use <enable-password> to enable the privileged mode
           and use <no enable-password> to disable the privileged
           mode in config mode for yp-shell.";
            }
          }
        }  // rpc enable-password
    
        rpc end {
          description
            "End an 'if' command block or a 'while' command block.
             If no block is in progress then an error will occur.
            ";
        }  // rpc end
    
        rpc eval {
          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";
            uses XPathParms;
          }
    
          output {
            anyxml data {
              mandatory true;
              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 eval
    
        rpc eventlog {
          description
            "Access the notification event log";
          input {
            ncx:default-parm "show";
            choice eventlog-action {
              default 'show-case';
              case show-case {
                leaf show {
                  type LogCount;
                  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.";
                }
    
                leaf start {
                  type LogIndex;
                  description
                    "Start at the specified event index number instead of
                     the beginning of the event log.";
                }
    
                uses ncxapp:HelpMode;
              }  // case show-case
              leaf clear {
                type LogCount;
                default '25';
                description
                  "Clear the specified number of notification
                   event log entries.  The value -1 means
                   clear all the entries.";
              }
            }  // choice eventlog-action
          }
        }  // rpc eventlog
    
        rpc exit {
          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 exit
    
        rpc fill {
          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";
            uses FillParms;
          }
    
          output {
            anyxml data {
              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 fill
    
        rpc get-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 {
            leaf lock-timeout {
              type nt: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.";
            }
    
            leaf retry-interval {
              type uint32 {
                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.";
            }
    
            leaf cleanup {
              type boolean;
              default 'true';
              description
                "Indicates whether the locks obtained should be
                  automatically released if an RPC operation
                  fails (after the get-locks succeeds).";
            }
          }
        }  // rpc get-locks
    
        rpc get-walk {
          description
            "Walk the entries of a YANG list using the netconfd-pro
             <get-bulk> operation. This command will send <get-bulk>
             requests to the server until the entire list has been
             retrieved or the user quits the walk.
    
             If the yumaworks-getbulk YANG module is not supported by
             the server then this command will not be attempted.
    
             If the program is in interactive mode, then after each
             retrieval, the user will be prompted to continue or quit
             the walk. In batch mode the entries will be displayed
             until the walk terminates.
    
             The server will wait the normal 'timeout' period after
             each request. It will display each response and check it
             for 'last-keys' data.  If present, these values will
             be used for the 'last-keys' parameter in the next request.
             If not present, then the walk will end.
    
             The walk will be done on the YANG list specified by the
             the 'list-target' parameter. Each retrieval will request
             1 or more entries, based on the 'count' parameter. The
             data returned can be filtered according to the 'content',
             'depth', 'with-defaults', and 'list-test' parameters,
             which as passed to the <get-bulk> operation each time.";
          input {
            leaf datastore {
              type enumeration {
                enum "candidate" {
                  value 0;
                }
                enum "running" {
                  value 1;
                }
                enum "startup" {
                  value 2;
                }
              }
              default "running";
              description
                "Identifies the datastore source for the retrieval,
                 if the list-object is a configuration data node.
                 If not a configuration node, then this object
                 will be ignored if present.";
            }
    
            leaf list-target {
              type string;
              mandatory true;
              description
                "Identifies the list object that is being retrieved.
                 This must be a path expression used to represent
                 a list data node.  It is formated like a RESTCONF
                 path expression, except module names are not mandatory
                 if they are unique.";
            }
    
            leaf count {
              type uint32 {
                range "1 .. max";
              }
              default '1';
              description
                "The maximum number of list entries to return.";
            }
    
            uses yrc:content-parameter {
              description
                "The content parameter is used as defined in the
                 RESTCONF protocol. This parameter will be ignored
                 if the list-target is a nonconfig node. In that case
                 only nonconfig data nodes will be returned.";
              refine content {
                default 'all';
              }
            }
    
            uses yrc:depth-parameter {
              description
                "The depth parameter is used as defined in the
                 RESTCONF protocol. The value '1' is associated
                 with the list-object node itself.  This value
                 can be used to simply test for the existence
                 of any instances of the list-object.";
            }
    
            uses wd:with-defaults-parameters {
              description
                "The with-defaults parameter is used as defined in the
                 NETCONF protocol.";
            }
    
            leaf list-test {
              type yang:xpath1.0;
              description
                "Specifies an XPath boolean expression that will
                 be used to determine if a list entry specified
                 by the list target should be included in the
                 response.
    
                 The document root and the context node for the
                 XPath evaluation will be each list-target instance.
                 If the list-test expression is invalid, then an
                 error will be returned. If the expression evaluates
                 successfully then the function boolean(result)
                 will be used to determine if the list instance
                 should be included in the response.
    
                 For example, if the list-target is /interfaces/interface
                 then the expression type = 'ethernetCsmacd' will select
                 only interface entries with the specified type leaf value.
                ";
            }
    
            anydata fixed-keys {
              description
                "If the server supports the fixed-keys parameter
                 then this parameter can be passed as a parameter
                 to the <get-bulk> operation.
    
                 This parameter is only relevant if the list-target
                 has multiple key leafs defined. It allows the get-walk
                 to only select 'next' entries for the unfixed key values.
    
                 This filter can be used instead of 'list-test' to
                 optimize the internal server callbacks to get list entries.
                 The unwanted entries can be pruned more efficiently
                 if the fixed keys are known to the server.
    
                 Each child entry represents a key leaf value
                 that should be treated as a fixed key leaf.
                 The namespace is not important as the server
                 will attempt to apply the list-target template to
                 the child nodes of this node.";
            }
          }
        }  // rpc get-walk
    
        rpc group {
          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";
            choice groupcmd {
              mandatory true;
              case connect {
                leaf connect {
                  type nt:NcxIdentifier;
                  description
                    "Connect to all sessions in the specified group.";
                }
    
                uses SessionGroupParms;
              }  // case connect
              leaf create {
                type nt:NcxIdentifier;
                description
                  "Name of the group to create.  The 'session' parameter
                     must also be present";
              }
              leaf delete {
                type nt:NcxIdentifier;
                description
                  "Name of the group to delete";
              }
              leaf add {
                type nt:NcxIdentifier;
                description
                  "Name of the group to add some sessions.  The 'session'
                     parameter must also be present.";
              }
              leaf remove {
                type nt:NcxIdentifier;
                description
                  "Name of the group to remove some sessions.  The
                     'session' parameter must also be present.";
              }
              leaf show {
                type nt:NcxIdentifier;
                description
                  "Name of the group to show";
              }
              leaf list {
                type empty;
                description
                  "List the names of all the groups";
              }
            }  // choice groupcmd
    
            leaf-list session {
              when
                "../create or ../add or ../remove";
              type nt:NcxIdentifier;
              min-elements 1;
              description
                "Name of a session that is being added to the group.";
            }
          }
        }  // rpc group
    
        rpc help {
          description
            "Print the yangcli-pro help text";
          input {
            ncx:default-parm "command";
            choice helptype {
              leaf command {
                type nt:NcxIdentifier;
                description
                  "Show help for the specified command,
                             also called an RPC method";
              }
              leaf commands {
                type empty;
                description
                  "Show info for all local commands";
              }
              leaf notification {
                type nt:NcxIdentifier;
                description
                  "Show help for the specified notification";
              }
              leaf object {
                type union {
                  type nt:NcxIdentifier;
                  type ywt:UrlPath;
                }
                description
                  "Show help for the specified object";
              }
              leaf type {
                type nt:NcxIdentifier;
                description
                  "Show help for the specified type";
              }
            }  // choice helptype
    
            uses ncxapp:HelpMode;
          }
        }  // rpc help
    
        rpc history {
          description
            "Access the command line history buffer";
          input {
            ncx:default-parm "show";
            choice history-action {
              default 'show-case';
              case show-case {
                leaf show {
                  type LogCount;
                  default '25';
                  description
                    "Show the specified number of history
                     buffer entries. -1 means show all entries.";
                }
    
                uses ncxapp:HelpMode;
              }  // case show-case
              leaf clear {
                type empty;
                description
                  "Clear all the history buffer entries.";
              }
              leaf load {
                type string;
                default
                  "~/.yumapro/.yangcli_pro_history";
                description
                  "Load the command history buffer from the
                   specified file spec.";
              }
              leaf save {
                type string;
                default
                  "~/.yumapro/.yangcli_pro_history";
                description
                  "Save the command history buffer in the
                   specified filespec.";
              }
            }  // choice history-action
          }
        }  // rpc history
    
        rpc if {
          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";
            uses XPathParms;
          }
        }  // rpc if
    
        rpc insert {
          description
            "Insert some NETCONF config data with the edit-config operation";
          input {
            ncx:default-parm "target";
            uses EditParms;
    
            leaf order {
              type enumeration {
                enum "first" {
                  value 0;
                }
                enum "last" {
                  value 1;
                }
                enum "before" {
                  value 2;
                }
                enum "after" {
                  value 3;
                }
              }
              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.";
            }
    
            leaf operation {
              type enumeration {
                enum "create" {
                  value 0;
                }
                enum "merge" {
                  value 1;
                }
                enum "replace" {
                  value 2;
                }
              }
              default 'merge';
              description
                "The edit-config operation that should be used.";
            }
    
            leaf edit-target {
              type string;
              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 insert
    
        rpc list {
          description "List some NETCONF info.";
          input {
            choice listtype {
              mandatory true;
              leaf commands {
                type empty;
                description
                  "List all local and remote commands";
              }
              leaf files {
                type empty;
                description
                  "List all available data files.";
              }
              leaf objects {
                type empty;
                description
                  "List all available top-level object names.";
              }
              leaf oids {
                type empty;
                description
                  "List all available object identifiers.";
              }
              leaf modules {
                type empty;
                description
                  "List all available local YANG files.";
              }
              leaf scripts {
                type empty;
                description
                  "List all available script files.";
              }
            }  // choice listtype
    
            leaf module {
              type nt:NcxIdentifier;
              description
                "List only from this module, if specified.";
            }
    
            uses ncxapp:HelpMode;
          }
        }  // rpc list
    
        rpc log-debug {
          description
            "Write a message to the output log if the log-level
            is greater or equal to 'debug'.";
          input {
            ncx:default-parm "msg";
            leaf msg {
              type string;
              mandatory true;
              description
                "The formatted text string to write to the log.";
            }
          }
        }  // rpc log-debug
    
        rpc log-info {
          description
            "Write a message to the output log if the log-level
            is greater or equal to 'info'.";
          input {
            ncx:default-parm "msg";
            leaf msg {
              type string;
              mandatory true;
              description
                "The formatted text string to write to the log.";
            }
          }
        }  // rpc log-info
    
        rpc log-error {
          description
            "Write a message to the output log if the log-level
            is greater or equal to 'error'.";
          input {
            ncx:default-parm "msg";
            leaf msg {
              type string;
              mandatory true;
              description
                "The formatted text string to write to the log.";
            }
          }
        }  // rpc log-error
    
        rpc log-warn {
          description
            "Write a message to the output log if the log-level
            is greater or equal to 'warn'.";
          input {
            ncx:default-parm "msg";
            leaf msg {
              type string;
              mandatory true;
              description
                "The formatted text string to write to the log.";
            }
          }
        }  // rpc log-warn
    
        rpc merge {
          description
            "Merge some NETCONF config data with the edit-config operation";
          input {
            ncx:default-parm "target";
            uses EditParms;
          }
        }  // rpc merge
    
        rpc mgrload {
          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";
            leaf module {
              type nt:NcxName;
              mandatory true;
              description "Module name to load";
            }
    
            leaf revision {
              type nt:Date;
              description
                "Module revision to load.";
            }
    
            uses ncxapp:DeviationParm;
          }
        }  // rpc mgrload
    
        rpc pwd {
          description
            "Print the current working directory.";
        }  // rpc pwd
    
        rpc nvsave {
          description
            "Save the running datastore to the startup datastore.";
        }  // rpc nvsave
    
        rpc quit {
          description
            "Quit the yangcli-pro application";
        }  // rpc quit
    
        rpc recall {
          description
            "Recall the specified command line history
              buffer entry into the current command line.";
          input {
            ncx:default-parm "index";
            leaf index {
              type LogIndex;
              mandatory true;
              description
                "Index [0..N] of the command line
                  history entry to recall.";
            }
          }
        }  // rpc recall
    
        rpc refresh-library {
          description
            "If the YANG modules available on disk changes while
               the program is running, then this command can be
               used to refresh the module version list used
               to determine the 'best-match' for imports.";
        }  // rpc refresh-library
    
        rpc release-locks {
          description
            "Unlock all the server databases that were
              previously locked with the get-locks command.";
        }  // rpc release-locks
    
        rpc replace {
          description
            "Create some NETCONF config data with the edit-config operation";
          input {
            ncx:default-parm "target";
            uses EditParms;
          }
        }  // rpc replace
    
        rpc remove {
          description
            "Remove some NETCONF config data with the edit-config operation";
          input {
            ncx:default-parm "target";
            leaf target {
              type string;
              mandatory true;
              description
                "Xpath expression indicating the node which is going
                to be deleted.";
            }
    
            anyxml value {
              description
                "Contains a string representing the content
                to use for the variable.  Only applies if the
                target is a leaf-list node.";
            }
          }
        }  // rpc remove
    
        rpc remove-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";
            choice delete-target {
              mandatory true;
              leaf target {
                type string;
                description
                  "Xpath expression indicating the list or leaf-list nodes
                  which are going to be removed.";
              }
              leaf urltarget {
                type ywt:UrlPath;
                description
                  "The URL path expression to use in the remove
                   operation.";
              }
            }  // choice delete-target
          }
        }  // rpc remove-all
    
        rpc run {
          description
            "Internal command to run a script.";
          input {
            ncx:default-parm "script";
            leaf script {
              type string;
              mandatory true;
              description
                "script filespec to run";
            }
    
            leaf P1 {
              type string;
              description "script parameter $1";
            }
    
            leaf P2 {
              type string;
              description "script parameter $2";
            }
    
            leaf P3 {
              type string;
              description "script parameter $3";
            }
    
            leaf P4 {
              type string;
              description "script parameter $4";
            }
    
            leaf P5 {
              type string;
              description "script parameter $5";
            }
    
            leaf P6 {
              type string;
              description "script parameter $6";
            }
    
            leaf P7 {
              type string;
              description "script parameter $7";
            }
    
            leaf P8 {
              type string;
              description "script parameter $8";
            }
    
            leaf P9 {
              type string;
              description "script parameter $9";
            }
          }
        }  // rpc run
    
        rpc run-shell {
          description
            "Internal command to run a shell script.
    
              The parameters P1 .. P9 will be converted to dollar parameters
              $0 to $N, where N is the number of 'Pn' parameters provided.
              The parameters will be added to the command line in named order
              P1 through P9.
    
              Example:  run-script test1.sh P3=foo P6=bar P1=baz
              This script will be invoked with parameters $1=baz $2=foo $3=bar
    
              Environment variables are not used for script parameters since
              they could have naming conflicts, especially for recursive scripts.";
          input {
            ncx:default-parm "script";
            leaf script {
              type string;
              mandatory true;
              description
                "Run shell command if --allow-shell=true";
            }
    
            leaf P1 {
              type string;
              description "script parameter $1";
            }
    
            leaf P2 {
              type string;
              description "script parameter $2";
            }
    
            leaf P3 {
              type string;
              description "script parameter $3";
            }
    
            leaf P4 {
              type string;
              description "script parameter $4";
            }
    
            leaf P5 {
              type string;
              description "script parameter $5";
            }
    
            leaf P6 {
              type string;
              description "script parameter $6";
            }
    
            leaf P7 {
              type string;
              description "script parameter $7";
            }
    
            leaf P8 {
              type string;
              description "script parameter $8";
            }
    
            leaf P9 {
              type string;
              description "script parameter $9";
            }
          }
        }  // rpc run-shell
    
        rpc save {
          description
            "Meta command to save configuration edits.";
        }  // rpc save
    
        rpc sleep {
          description
            "Pause for a number of seconds. Intended for use
             in yangcli scripts.";
          input {
            leaf seconds {
              type uint16 {
                range "1 .. 3600";
              }
              units "seconds";
              mandatory true;
              description
                "Number of seconds to sleep.";
            }
          }
        }  // rpc sleep
    
        rpc device-cfg {
          description
            "Access a device configuration";
          input {
            choice device-action {
              default 'show-case';
              case show-case {
                leaf show {
                  type IdentifierOrZero;
                  default "";
                  description
                    "Show the specified device or the current device
                     if an empty string is entered.";
                }
    
                uses ncxapp:HelpMode;
              }  // case show-case
              leaf delete {
                type nt:NcxIdentifier;
                description
                  "Delete the specified device from the saved
                   devices in memory.";
              }
              leaf save {
                type nt:NcxIdentifier;
                description
                  "Save the specified device to the
                   saved devices in memory.";
              }
    
              case create {
                leaf create {
                  type nt:NcxName;
                  mandatory true;
                  description
                    "An device id to use to create a new device.";
                }
    
                leaf server {
                  type inet:host;
                  mandatory true;
                  description
                    "IP address or DNS name of the NETCONF server target.";
                }
    
                leaf ncport {
                  type uint16 {
                    range "1..max";
                  }
                  default '830';
                  description
                    "NETCONF port number to use.  If not present, then
                     port 830, followed by port 22, will be tried.";
                }
    
                uses EntryPointParm;
    
                uses ncxapp:ProtocolsParm;
              }  // case create
            }  // choice device-action
          }
        }  // rpc device-cfg
    
        rpc devices-cfg {
          description
            "Controls access to the saved devices file";
          input {
            choice devices-action {
              default 'show-case';
              case show-case {
                leaf show {
                  type empty;
                  description
                    "Show all saved devices in memory";
                }
    
                uses ncxapp:HelpMode;
              }  // case show-case
              leaf clear {
                type empty;
                description
                  "Clear all the saved sessions in memory.
                   Use 'devices-cfg load' to restore the saved devices.
                   Use 'devices-cfg save' to clear the saved devices
                   file.";
              }
              leaf load {
                type string;
                default
                  "~/.yumapro/.yangcli_pro_devices.conf";
                description
                  "Load the saved devices in memory from the
                   specified file spec.";
              }
              leaf save {
                type string;
                default
                  "~/.yumapro/.yangcli_pro_devices.conf";
                description
                  "Save the current saved devices in memory to the
                   specified saved devices filespec.";
              }
            }  // choice devices-action
          }
        }  // rpc devices-cfg
    
        rpc session {
          description "Access an active session";
          input {
            leaf set-current {
              type nt:NcxIdentifier;
              mandatory true;
              description
                "Set the specified session or group as the current session.
                 The named session or group must already be loaded in memory.";
            }
          }
        }  // rpc session
    
        rpc session-cfg {
          description
            "Access a session configuration";
          input {
            choice session-action {
              default 'show-case';
              case show-case {
                leaf show {
                  type IdentifierOrZero;
                  default "";
                  description
                    "Show the specified session or the current session
                     if an empty string is entered.";
                }
    
                uses ncxapp:HelpMode;
              }  // case show-case
              leaf delete {
                type nt:NcxIdentifier;
                description
                  "Delete the specified session from the saved
                   sessions in memory.";
              }
              leaf save {
                type nt:NcxIdentifier;
                description
                  "Save the specified session to the
                   saved sessions in memory.";
              }
              leaf-list use-event-handler {
                type nt:NcxIdentifier;
                description
                  "Name of an event-handler to use within this session.
                  When notification delivery for this session is started
                  the event handler will be installed. A warning will be
                  printed if no event-handler with this name is found.";
              }
            }  // choice session-action
          }
        }  // rpc session-cfg
    
        rpc user-cfg {
          description
            "Access a user configuration";
          input {
            choice user-action {
              default 'show-case';
              case show-case {
                leaf show {
                  type IdentifierOrZero;
                  default "";
                  description
                    "Show the specified user or the current user
                     if an empty string is entered.";
                }
    
                uses ncxapp:HelpMode;
              }  // case show-case
              leaf delete {
                type nt:NcxIdentifier;
                description
                  "Delete the specified user from the saved
                   users in memory.";
              }
              leaf save {
                type nt:NcxIdentifier;
                description
                  "Save the specified user to the
                   saved users in memory.";
              }
    
              case create {
                leaf create {
                  type nt:NcxName;
                  mandatory true;
                  description
                    "An user id to use to create a new user.";
                }
    
                leaf user-name {
                  type nt:NcxName;
                  mandatory true;
                  description
                    "An user name to use to create a new user.";
                }
    
                leaf password {
                  ncx:password;
                  type string;
                  mandatory true;
                  description
                    "An user password to use to create a new user.";
                }
              }  // case create
            }  // choice user-action
          }
        }  // rpc user-cfg
    
        rpc users-cfg {
          description
            "Controls access to the saved users file";
          input {
            choice users-action {
              default 'show-case';
              case show-case {
                leaf show {
                  type empty;
                  description
                    "Show all saved users in memory";
                }
    
                uses ncxapp:HelpMode;
              }  // case show-case
              leaf clear {
                type empty;
                description
                  "Clear all the saved users in memory.
                   Use 'users-cfg load' to restore the saved users.
                   Use 'users-cfg save' to clear the saved users
                   file.";
              }
              leaf load {
                type string;
                default
                  "~/.yumapro/.yangcli_pro_users.conf";
                description
                  "Load the saved users in memory from the
                   specified file spec.";
              }
              leaf save {
                type string;
                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-cfg
    
        rpc schema-server-cfg {
          description
            "Access a schema-server configuration";
          input {
            choice schema-server-action {
              default 'show-case';
              case show-case {
                leaf show {
                  type IdentifierOrZero;
                  default "";
                  description
                    "Show the specified schema-server.";
                }
    
                uses ncxapp:HelpMode;
              }  // case show-case
              leaf delete {
                type nt:NcxIdentifier;
                description
                  "Delete the specified schema-server from the saved
                   schema-server in memory.";
              }
    
              case create {
                leaf create {
                  type nt:NcxName;
                  mandatory true;
                  description
                    "An schema-server id to use to create a new schema server.";
                }
    
                leaf user-id {
                  type nt:NcxName;
                  mandatory true;
                  description
                    "The id of the saved user to create a schema-server.";
                }
    
                leaf device-id {
                  type nt:NcxName;
                  description
                    "The id of the saved device to create a schema-server.";
                }
              }  // case create
            }  // choice schema-server-action
          }
        }  // rpc schema-server-cfg
    
        rpc schema-servers-cfg {
          description
            "Controls access to the saved schema-servers file";
          input {
            choice schema-servers-action {
              default 'show-case';
              case show-case {
                leaf show {
                  type empty;
                  description
                    "Show all saved schema servers in memory";
                }
    
                uses ncxapp:HelpMode;
              }  // case show-case
              leaf clear {
                type empty;
                description
                  "Clear all the saved schema servers in memory.
                   Use 'schema-servers-cfg load' to restore the saved schema servers.
                   Use 'scheam-servers-cfg clear' to clear the saved schema servers.
                   file.";
              }
              leaf load {
                type string;
                default
                  "~/.yumapro/.yangcli_pro_schema_servers.conf";
                description
                  "Load the saved schema servers in memory from the
                   specified file spec.";
              }
              leaf save {
                type string;
                default
                  "~/.yumapro/.yangcli_pro_schema_servers.conf";
                description
                  "Save the current saved schema servers in memory to the
                   specified saved schema servers filespec.";
              }
            }  // choice schema-servers-action
          }
        }  // rpc schema-servers-cfg
    
        rpc sessions-cfg {
          description
            "Controls access to the saved sessions file";
          input {
            choice sessions-action {
              default 'show-case';
              case show-case {
                leaf show {
                  type empty;
                  description
                    "Show all saved sessions in memory";
                }
    
                uses ncxapp:HelpMode;
              }  // case show-case
              leaf clear {
                type empty;
                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.";
              }
              leaf load {
                type string;
                default
                  "~/.yumapro/.yangcli_pro_sessions.conf";
                description
                  "Load the saved sessions in memory from the
                   specified file spec.";
              }
              leaf save {
                type string;
                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-cfg
    
        rpc sget {
          description
            "Get some NETCONF running config or state data with the get
            operation, using an optional subtree filter.";
          input {
            ncx:default-parm "target";
            uses CommonPduParms;
    
            uses SGetParms;
          }
    
          output {
            anyxml data {
              description
                "The data resulting from the retrieval operation.";
            }
          }
        }  // rpc sget
    
        rpc sget-config {
          description
            "Get some NETCONF config data with the get-config
            operation, using an optional subtree filter.";
          input {
            ncx:default-parm "target";
            uses CommonPduParms;
    
            uses SGetParms;
    
            container source {
              description
                "Particular configuration to retrieve.";
              choice config-source {
                mandatory true;
                leaf candidate {
                  if-feature nc:candidate;
                  type empty;
                  description
                    "Only available if 'candidate' capability supported.";
                }
                leaf running {
                  type empty;
                }
                leaf startup {
                  if-feature nc:startup;
                  type empty;
                  description
                    "Only available if 'startup' capability supported.";
                }
                leaf url {
                  if-feature nc:url;
                  type nc:ConfigURIType;
                  description
                    "URL pointing to config data. Only available
                     if 'url' capability supported.";
                }
              }  // choice config-source
            }  // container source
          }
    
          output {
            anyxml data {
              description
                "The data resulting from the retrieval operation.";
            }
          }
        }  // rpc sget-config
    
        rpc sget-data {
          description
            "Get some NETCONF datastore data with the <get-data>
            operation, using an optional subtree filter.
            The server must support the <get-data> operation
            from the ietf-netconf-nmda module.";
          input {
            ncx:default-parm "target";
            uses DatastoreParm;
    
            uses CommonPduParms;
    
            uses SGetParms;
    
            uses ConfigFilterParm;
    
            uses OriginParms;
          }
    
          output {
            anyxml data {
              description
                "The data resulting from the retrieval operation.";
            }
          }
        }  // rpc sget-data
    
        rpc show {
          description
            "Local show command for yangcli-pro session info.";
          input {
            choice showtype {
              mandatory true;
              leaf cache {
                type empty;
                description
                  "Show the yangcli-pro YANG module cache.";
              }
              leaf cli {
                type empty;
                description
                  "Show the yangcli-pro CLI parameters.";
              }
              leaf diff {
                type empty;
                description
                  "Show the differences between current config
                   and the edits that have not been applied yet.";
              }
              leaf edit {
                type empty;
                description
                  "Show the subtree that is the current node which
                   is from the current edit, not the stored config.";
              }
              leaf connected {
                type empty;
                description
                  "Show all connected sessions.";
              }
              leaf module {
                type nt:NcxIdentifier;
                description
                  "Show full info for one module loaded
                   within the current session.";
              }
              leaf modules {
                type empty;
                description
                  "Show info for all modules loaded within the
                   current session.";
              }
              leaf modules-state {
                type empty;
                description
                  "Show info for cached modules-state for each server.";
              }
              leaf local {
                type nt:NcxName;
                description
                  "Show info for one local user variable.";
              }
              leaf locals {
                type empty;
                description
                  "Show info for all local user variables.";
              }
              leaf global {
                type nt:NcxName;
                description
                  "Show full info for one global user variable.";
              }
              leaf globals {
                type empty;
                description
                  "Show info for all global user variables.";
              }
              leaf group-vars {
                type IdentifierOrZero;
                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.";
              }
              leaf objects {
                type empty;
                description
                  "Show config database objects loaded within the
                   current session.";
              }
    
              case running {
                leaf running {
                  type empty;
                  mandatory true;
                  description
                    "Show entire config for the current session
                     error if there is no current session.";
                }
    
                uses SelectParm;
              }  // case running
              leaf search-path-module {
                type empty;
                description
                  "Display the YANG module search path in use.";
              }
              leaf server-commands {
                type empty;
                description
                  "Display server commands (not in config mode).
                   It is top-level only and only relevant if session is connected.";
              }
              leaf session {
                type empty;
                description
                  "Show the current session info, including the initial
                   server capabilities for the session.";
              }
              leaf session-vars {
                type IdentifierOrZero;
                description
                  "Show the session-specific user variables for the
                   named session. An empty string means show the
                   variables for the current session.";
              }
              leaf system {
                type empty;
                description
                  "Show the read-only system environment variables
                   and the read-write yangcli-pro program variables.";
              }
              leaf terminal {
                type empty;
                description
                  "Show the terminal settings.";
              }
              leaf var {
                type nt:NcxName;
                description
                  "Show info for one local or global variable.";
              }
              leaf vars {
                type empty;
                description
                  "Show truncated info for all program variables";
              }
              leaf version {
                type empty;
                description
                  "Show yangcli-pro version info.";
              }
            }  // choice showtype
    
            uses ncxapp:HelpMode;
          }
        }  // rpc show
    
        rpc start-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";
            leaf statfile {
              type string {
                length "1 .. max";
              }
              description
                "The file specification for the timing statistics.";
            }
          }
        }  // rpc start-rpc-timing
    
        rpc start-session {
          description
            "Start an active session from the specified configured
             session.";
          input {
            ncx:default-parm "name";
            leaf name {
              type nt:NcxIdentifier;
              description
                "The name of the session to start.";
            }
          }
        }  // rpc start-session
    
        rpc start-timer {
          description
            "Start a timer to do simple performance measurements.";
          input {
            ncx:default-parm "id";
            leaf id {
              type TimerId;
              default '0';
              description "The timer ID to use.";
            }
    
            leaf restart-ok {
              type boolean;
              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-timer
    
        rpc stop-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-timing
    
        rpc stop-session {
          description
            "Terminate an active session.";
          input {
            ncx:default-parm "name";
            leaf name {
              type nt:NcxIdentifier;
              mandatory true;
              description
                "The name of the session to stop.";
            }
          }
        }  // rpc stop-session
    
        rpc stop-timer {
          description
            "Stop a timer and output the delta value.";
          input {
            ncx:default-parm "id";
            leaf id {
              type TimerId;
              default '0';
              description "The timer ID to use.";
            }
    
            leaf echo {
              type boolean;
              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 {
            leaf delta {
              type decimal64 {
                fraction-digits 6;
              }
              units "seconds";
              description
                "The elapsed time since the timer started.";
            }
          }
        }  // rpc stop-timer
    
        rpc record-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 {
            choice record-test-action {
              mandatory true;
              description
                "The recording action to perform.";
              leaf cancel {
                type empty;
                description
                  "Stop recording for the specified test in progress,
                   and discard the recorded results.";
              }
    
              case start-case {
                leaf start {
                  type empty;
                  mandatory true;
                  description
                    "Start recording for the specified test.";
                }
    
                leaf suite-name {
                  type nt:NcxIdentifier;
                  mandatory true;
                  description
                    "The name of the test-suite that contains the test
                    being recorded.";
                }
    
                leaf test-name {
                  type nt:NcxIdentifier;
                  mandatory true;
                  description
                    "The name of the test being recorded.";
                }
              }  // case start-case
              leaf finish {
                type empty;
                description
                  "Finish recording for the specified test in progress
                   and save the recorded results in the test-suite.";
              }
              leaf pause {
                type empty;
                description
                  "Pause recording for the specified test in progress.";
              }
              leaf resume {
                type empty;
                description
                  "Resume recording for the specified test in progress.";
              }
            }  // choice record-test-action
          }
        }  // rpc record-test
    
        rpc terminal {
          description
            "Configure the terminal settings";
          input {
            leaf length {
              type uint16 {
                range "0 .. 511";
              }
              mandatory true;
              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 terminal
    
        rpc test-suite {
          description
            "Use the unit test-suite feature.";
          input {
            leaf suite-name {
              type nt: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.";
            }
    
            leaf log {
              type string;
              must "../start or ../run-all";
              description
                "The file pathspec of the test suite result file
                 to use, or an empty string to use STDOUT.";
            }
    
            choice test-suite-action {
              default 'show-case';
              leaf delete {
                type empty;
                must "../suite-name";
                description
                  "Delete the specified test-suite.  The suite-name
                   parameter must also be present.";
              }
    
              case delete-test-case {
                leaf delete-test {
                  type empty;
                  must "../suite-name";
                  description
                    "Delete the specified test.  The suite-name
                     and test-name parameters must also be present.";
                }
    
                leaf test-name {
                  type nt:NcxIdentifier;
                  mandatory true;
                  description
                    "The name of the test being recorded.";
                }
              }  // case delete-test-case
    
              case show-case {
                leaf show {
                  type IdentifierOrZero;
                  default "";
                  description
                    "Show the specified test-suite or the current
                     test-suite if an empty string is entered.";
                }
    
                uses ncxapp:HelpMode;
              }  // case show-case
              leaf load {
                type string;
                default
                  "~/.yumapro/yangcli_pro_tests.conf";
                description
                  "The file pathspec of the test suite config file
                   to load.";
              }
              leaf run-all {
                type empty;
                description
                  "Run all the test-suites defined in the test suite
                   config file.";
              }
              leaf start {
                type nt:NcxIdentifier;
                description
                  "Start running the specified test-suite";
              }
              leaf save {
                type string;
                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-suite
    
        rpc update-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-config
    
        rpc unset {
          description
            "Delete a specific yangcli-pro command alias.
    
             * Delete one alias 'foo':
               yangcli-pro>  unset foo
           ";
          input {
            leaf name {
              type nt:NcxName;
              mandatory true;
              description
                "Name of the yangcli-pro command alias to delete.";
            }
          }
        }  // rpc unset
    
        rpc uservars {
          description
            "Manage the yangcli-pro user variables";
          input {
            choice uservars-action {
              mandatory true;
              leaf clear {
                type empty;
                description
                  "Delete all the yangcli-pro user variables from memory.";
              }
              leaf load {
                type string;
                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.";
              }
              leaf save {
                type string;
                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 uservars
    
        rpc while {
          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";
            uses XPathParms;
    
            leaf maxloops {
              type uint32;
              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 while
    
        rpc xget {
          description
            "Get some NETCONF running config or state data with the get
            operation, using an optional XPath filter.";
          input {
            ncx:default-parm "select";
            uses XGetParms;
          }
    
          output {
            anyxml data {
              description
                "The data resulting from the retrieval operation.";
            }
          }
        }  // rpc xget
    
        rpc xget-config {
          description
            "Get some NETCONF config data with the get-config
            operation, using an optional XPath filter.";
          input {
            ncx:default-parm "select";
            uses XGetParms;
    
            container source {
              description
                "Particular configuration to retrieve.";
              choice config-source {
                mandatory true;
                leaf candidate {
                  if-feature nc:candidate;
                  type empty;
                  description
                    "Only available if 'candidate' capability supported.";
                }
                leaf running {
                  type empty;
                }
                leaf startup {
                  if-feature nc:startup;
                  type empty;
                  description
                    "Only available if 'startup' capability supported.";
                }
                leaf url {
                  if-feature nc:url;
                  type nc:ConfigURIType;
                  description
                    "URL pointing to config data. Only available
                     if 'url' capability supported.";
                }
              }  // choice config-source
            }  // container source
          }
    
          output {
            anyxml data {
              description
                "The data resulting from the retrieval operation.";
            }
          }
        }  // rpc xget-config
    
        rpc xget-data {
          description
            "Get some NETCONF datastore data with the <get-data>
            operation, using an optional XPath filter.
            The server must support the <get-data> operation
            from the ietf-netconf-nmda module.";
          input {
            ncx:default-parm "select";
            uses DatastoreParm;
    
            uses XGetParms;
    
            uses ConfigFilterParm;
    
            uses OriginParms;
          }
    
          output {
            anyxml data {
              description
                "The data resulting from the retrieval operation.";
            }
          }
        }  // rpc xget-data
    
        rpc event-handlers-cfg {
          description
            "Controls access to the saved event-handlers file";
          input {
            choice event-handlers-action {
              default 'show-case';
              case show-case {
                leaf show {
                  type empty;
                  description
                    "Show all saved event-handlers in memory";
                }
    
                uses ncxapp:HelpMode;
              }  // case show-case
              leaf clear {
                type empty;
                description
                  "Clear all the saved event-handlers in memory.
                   Use 'event-handlers-cfg load' to restore the saved event-handlers.
                   Use 'event-handlers-cfg save' to clear the saved event-handlers
                   file.";
              }
              leaf load {
                type string;
                default
                  "~/.yumapro/.yangcli_pro_event-handlers.conf";
                description
                  "Load the saved event-handlers in memory from the
                   specified file spec.";
              }
              leaf save {
                type string;
                default
                  "~/.yumapro/.yangcli_pro_event-handlers.conf";
                description
                  "Save the current saved event-handlers in memory to the
                   specified saved event-handlers filespec.";
              }
            }  // choice event-handlers-action
          }
        }  // rpc event-handlers-cfg
    
        rpc event-handler-cfg {
          description
            "Access an event handler mapping configuration.";
          input {
            choice user-action {
              default 'show-case';
              case show-case {
                leaf show {
                  type IdentifierOrZero;
                  default "";
                  description
                    "Show the specified event-handler or the current
                     event-handler if an empty string is entered.";
                }
    
                uses ncxapp:HelpMode;
              }  // case show-case
              leaf delete {
                type nt:NcxIdentifier;
                description
                  "Delete the specified event-handler from the saved
                   event handlers in memory.";
              }
              leaf save {
                type nt:NcxIdentifier;
                description
                  "Save the specified event handler to the
                   saved event handlers in memory.";
              }
    
              case create {
                leaf create {
                  type nt:NcxName;
                  mandatory true;
                  description
                    "An event-handler name to use to create a new event handler.";
                }
    
                leaf module-name {
                  type nt:NcxName;
                  description
                    "The module name for the event handler. If specified then only
                   events from this YANG module will cause the event handler to be
                   invoked.  If this leaf is not present then all modules will
                   be considered for event handler processing.";
                }
    
                leaf event-name {
                  type nt:NcxName;
                  description
                    "The event name for the event handler. If specified then only
                   this event name will cause the event handler to be invoked.
                   If this leaf is not present then all event names will be
                   considered for event handler processing.";
                }
    
                choice script-type {
                  mandatory true;
                  description
                    "The yangcli or shell script to run as the event handler.
                     This script should follow the Event Handler Callback
                     template described in the user documentation.
    
                     The script MUST be non-interactive. It will be invoked
                     in batch mode and no commands that expect to prompt
                     and wait for user keyboard input will work.
    
                     The shell-script is supported. yangcli script is not
                     supported.
    
                     The script file path is set in ncxmod:
    
                       * 1) current directory or absolute path
                       * 2) YUMAPRO_RUNPATH environment var
                            (or set by runpath CLI var)
                       * 3) HOME/scripts directory
                       * 4) YUMAPRO_HOME/scripts directory
                       * 5) YUMAPRO_INSTALL/scripts directory
                       * 6) start-dir/scripts
                    ";
                  leaf script {
                    type string;
                    description
                      "The yangcli script name to use for the event handler.";
                  }
                  leaf shell-script {
                    type string;
                    description
                      "The shell script name to use for the event handler.";
                  }
                }  // choice script-type
              }  // case create
            }  // choice user-action
          }
        }  // rpc event-handler-cfg
    
        grouping VarsContainer {
        }  // grouping VarsContainer
    
        uses VarsContainer;
    
        container saved-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.";
          list device {
            key "name";
            description
              "The list of devices to use during this test-suite.";
            leaf name {
              type nt:NcxName;
              description
                "The name of the saved device.
                The 'device save' command will use the
                string <user>@<server-address> as the default.";
            }
    
            leaf devicetype {
              type string;
              description
                "Device type for NETCONF devices.";
            }
    
            leaf server {
              type inet:host;
              mandatory true;
              description
                "IP address or DNS name of the NETCONF server target.";
            }
    
            leaf ncport {
              type uint16 {
                range "1..max";
              }
              default '830';
              description
                "NETCONF port number to use.  If not present, then
                 port 830, followed by port 22, will be tried.";
            }
    
            uses EntryPointParm;
    
            uses ncxapp:ProtocolsParm;
    
            leaf transport {
              type ywt:transport-type;
              default 'ssh';
              description
                "Identifies the transport protocol that should be used.";
            }
    
            uses CommentParm;
          }  // list device
        }  // container saved-devices
    
        container saved-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.";
          list session {
            key "name";
            description
              "The list of sessions to use during this test-suite.";
            leaf name {
              type nt:NcxName;
              description
                "The name of the saved session.
                The 'session save' command will use the
                string <user>@<server-address> as the default.";
            }
    
            leaf-list use-event-handler {
              type nt:NcxIdentifier;
              description
                "Name of an event-handler to use within this session.
                  When notification delivery for this session is started
                  the event handler will be installed. A warning will be
                  printed if no event-handler with this name is found.";
            }
    
            leaf device {
              type nt:NcxDeviceName;
              mandatory true;
              description
                "Device name of the NETCONF server target.";
            }
    
            leaf userid {
              type nt:NcxName;
              mandatory true;
              description
                "User Id of the NETCONF user.";
            }
    
            leaf user {
              type nt:NcxName;
              mandatory true;
              description
                "The user name of the session.";
            }
    
            choice pass {
              mandatory true;
              leaf password {
                ncx:password;
                type string;
                description
                  "User password to use for NETCONF sessions.
                   If none, then user will be prompted before connecting.";
              }
              leaf no-password {
                type empty;
              }
            }  // choice pass
    
            uses ywapp:SshKeyParms;
    
            uses ywapp:SslKeyParms;
    
            leaf server {
              type inet:host;
              mandatory true;
              description
                "IP address or DNS name of the NETCONF server target.";
            }
    
            leaf ncport {
              type uint16 {
                range "1..max";
              }
              default '830';
              description
                "NETCONF port number to use.  If not present, then
                 port 830, followed by port 22, will be tried.";
            }
    
            uses EntryPointParm;
    
            uses ncxapp:ProtocolsParm;
    
            leaf transport {
              type ywt:transport-type;
              default 'ssh';
              description
                "Identifies the transport protocol that should be used.";
            }
    
            container start-commands {
              ywx:cli-text-block;
              description
                "An optional block of yangcli commands to run
                 after the session is successfully started.";
            }  // container start-commands
    
            uses VarsContainer;
    
            uses CommentParm;
          }  // list session
    
          list group {
            key "name";
            description
              "A list of groups of sessions to manage at once.";
            leaf name {
              type nt:NcxName;
              description
                "The name of the saved group. This name must not conflict
                with any session name.";
            }
    
            leaf-list session {
              type nt:NcxName;
              description
                "The name of a session that belongs to this group.";
            }
    
            uses SessionGroupParms;
    
            uses VarsContainer;
          }  // list group
        }  // container saved-sessions
    
        container saved-schema-servers {
          ncx:abstract;
          description
            "Represents all the saved schema-servers in
            the ~/.yumapro/yangcli_pro_schema_server file.
            Use the 'schema-server' command to access this file.
            Edit by hand only if you follow this YANG definition.";
          list schema-server-id {
            key "name";
            description
              "The list of schema-servers to use.";
            leaf name {
              type nt:NcxName;
              description
                "The id of the saved server.";
            }
    
            leaf user-id {
              type nt:NcxName;
              description
                "The id of the saved user.";
            }
    
            leaf device-id {
              type nt:NcxName;
              description
                "The id of the saved device.";
            }
          }  // list schema-server-id
        }  // container saved-schema-servers
    
        container saved-event-handlers {
          ncx:abstract;
          description
            "Represents all the saved event-handlers in
            the ~/.yumapro/yangcli_event_handlers file.
            Use the 'event-handlers' command to access this file.
            Edit by hand only if you follow this YANG definition.";
          list eventid {
            key "name";
            description
              "The list of event-handlers to use.";
            leaf name {
              type nt:NcxName;
              description
                "The id of the saved event.";
            }
    
            leaf module-name {
              type nt:NcxName;
              mandatory true;
              description "The module name.";
            }
    
            leaf event-name {
              type nt:NcxName;
              mandatory true;
              description "The event name.";
            }
    
            leaf script {
              type string;
              description
                "The yangcli script name to use for the event handler.";
            }
    
            leaf shell-script {
              type string;
              description
                "The shell script name to use for the event handler.";
            }
          }  // list eventid
        }  // container saved-event-handlers
    
        container saved-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.";
          list userid {
            key "name";
            description
              "The list of users to use.";
            leaf name {
              type nt:NcxName;
              description
                "The id of the saved user.";
            }
    
            leaf user {
              type nt:NcxName;
              mandatory true;
              description
                "The user name of the session.";
            }
    
            choice pass {
              mandatory true;
              leaf password {
                ncx:password;
                type string;
                description
                  "User password to use for NETCONF users.
                   If none, then user will be prompted before connecting.";
              }
              leaf no-password {
                type empty;
              }
            }  // choice pass
    
            uses ywapp:SshKeyParms;
    
            uses ywapp:SslKeyParms;
    
            uses CommentParm;
          }  // list userid
        }  // container saved-users
    
        leaf do {
          ncx:abstract;
          ncx:hidden;
          type string;
          description
            "Do <command>, Execute a normal mode command in config mode";
        }
    
        leaf no {
          ncx:abstract;
          ncx:hidden;
          type string;
          description
            "No <command>, Delete or negate a command in config mode";
        }
    
        leaf apply {
          ncx:abstract;
          ncx:hidden;
          type empty;
          description
            "Apply the pending edits in config mode";
        }
    
        leaf return {
          ncx:abstract;
          ncx:hidden;
          type empty;
          description
            "Exit all config sub-modes and discard any pending edits";
        }
    
        leaf config-commit {
          ncx:abstract;
          ncx:hidden;
          type empty;
          description
            "Use <config-commit> to commit the candidate datastore
             to the running datastore in config mode.";
        }
    
        container pipe {
          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.";
          leaf begin {
            ywx:help "Begin output after the string is found";
            type string;
            description
              "Specifies the pipe begin line pattern.";
          }
    
          leaf-list include {
            ywx:help "Include output if the string is found";
            type string;
            description
              "Specifies a pipe include line pattern.
               Multiple parameters are treated as a logical-OR
               expression.";
          }
    
          leaf-list exclude {
            ywx:help "Exclude output if the string is found";
            type string;
            description
              "Specifies a pipe exclude line pattern.
               Multiple parameters are treated as a logical-OR
               expression.";
          }
    
          leaf redirect {
            ywx:help "Redirect output to a file";
            type string;
            description
              "Specifies the pipe output redirect filespec.
               If this filespec already exists then output
               will be appended to the file.";
          }
    
          leaf display {
            ywx:help "Display output in XML or JSON format";
            type enumeration {
              enum "xml" {
                value 0;
                description
                  "Display output in XML format";
              }
              enum "json" {
                value 1;
                description
                  "Display output in JSON format";
              }
              enum "curmode" {
                value 2;
                description
                  "Display output is the current $$display-mode format";
              }
              enum "plain" {
                value 3;
                description
                  "Display output in plain format";
              }
              enum "cli" {
                value 4;
                description
                  "Display output in CLI format";
              }
            }
            default "curmode";
            description
              "Specifies the pipe output display format.";
          }
        }  // container pipe
    
        leaf xml {
          ncx:abstract;
          ncx:hidden;
          type string;
          description
            "Display output in XML format";
        }
    
        leaf json {
          ncx:abstract;
          ncx:hidden;
          type string;
          description
            "Display output in JSON format";
        }
      }  // module yangcli-pro
    

© 2023 YumaWorks, Inc. All rights reserved.