netconfcentral logo

yumaworks-app-common

HTML

yumaworks-app-common@2019-05-22



  module yumaworks-app-common {

    yang-version 1;

    namespace
      "http://yumaworks.com/ns/yumaworks-app-common";

    prefix ywapp;

    import yuma-ncx {
      prefix ncx;
    }
    import yumaworks-types {
      prefix ywt;
    }
    import yuma-types {
      prefix yt;
    }

    organization "YumaWorks, Inc.";

    contact
      "Support <support at yumaworks.com>";

    description
      "Common CLI parameters used in all yumapro applications.

Copyright (c) 2012 - 2019 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 "2019-05-22" {
      description
        "Add WithTermMsgParm grouping.
Add MaxStrlenParm grouping.";
    }

    revision "2019-03-30" {
      description
        "Add binary-display-maxlen parameter in
BinaryDisplayMaxlenParm grouping";
    }

    revision "2018-06-26" {
      description
        "Move SshKeyParms and SslKeyParms to this module
so they can be shared by yumaworks-sesmgr";
    }

    revision "2018-03-26" {
      description
        "Add ErrMsgParm and ErrMsgLangParm groupings.
Add ModuleTagParm grouping";
    }

    revision "2018-03-08" {
      description
        "Add InsecureOkParm grouping";
    }

    revision "2018-01-07" {
      description
        "Add LoadPathParm grouping";
    }

    revision "2017-04-27" {
      description
        "Add OcPatternParm grouping";
    }

    revision "2016-04-11" {
      description
        "Add AnnotationParm grouping";
    }

    revision "2014-02-14" {
      description
        "Add UseSesssionVars CLI variable grouping.
Add SaveSesssionVars CLI variable grouping.
Add DataTemplateParms grouping.";
    }

    revision "2013-08-13" {
      description
        "Split log-vendor and log-vendor-level parameters into
their own grouping.";
    }

    revision "2013-05-25" {
      description
        "Add log-console param as user friendly synonym
for log-mirroring.";
    }

    revision "2013-02-11" {
      description
        "Move common yangcli-pro grouping to this module";
    }

    revision "2012-11-30" {
      description
        "Add message-indent parameter.";
    }

    revision "2012-10-23" {
      description
        "Remove log-custom and log-localtime empty leafs and convert
          to "bits" entity: log-header="custom localtime".";
    }

    revision "2012-10-10" {
      description
        "Change log-backtrace-level to and add log-backtrace-stream
parameters as 'bits' type entities. Eliminate
log-backtrace-xxx 'type empty' leafs.";
    }

    revision "2012-08-16" {
      description
        "Split from yuma-app-common; Add new logging parameters.";
    }


    grouping LoggingCommonParms {
      leaf log-backtrace {
        type uint32 {
          range "0 .. 100";
        }
        description
          "If present, log output will include traceback
detail for each log message, subject to further
filtering by --log-backtrace-level and/or
log-backtrace-stream qualifiers";
      }

      leaf log-backtrace-detail {
        type empty;
        description
          "If present in conjunction with --log-backtrace
log messages will include 'detailed' backtrace
information (if supported by the compiler).";
      }

      leaf log-backtrace-level {
        type bits {
          bit write {
            position 0;
            description
              "Include backtrace info in write messages.";
          }
          bit dev0 {
            position 1;
            description
              "Include backtrace info in developer
level 0 messages.";
          }
          bit error {
            position 2;
            description
              "Include backtrace info in error messages.";
          }
          bit warn {
            position 3;
            description
              "Include backtrace info in warning messages.";
          }
          bit info {
            position 4;
            description
              "Include backtrace info in info messages.";
          }
          bit dev1 {
            position 5;
            description
              "Include backtrace info in developer
level 1 messages.";
          }
          bit debug {
            position 6;
            description
              "Include backtrace info in debug messages.";
          }
          bit debug2 {
            position 7;
            description
              "Include backtrace info in debug2 messages.";
          }
          bit debug3 {
            position 8;
            description
              "Include backtrace info in debug3 messages.";
          }
          bit debug4 {
            position 9;
            description
              "Include backtrace info in debug4 messages.";
          }
        }
        description
          "Indicates for which debug level(s) backtrace
             info will be generated. Param string is an XSD
             list: a double quoted series of whitespace
             separated (level) strings like "error warn debug"";
      }

      leaf log-backtrace-stream {
        type bits {
          bit logfile {
            position 0;
            description
              "Include backtrace in logfile stream.";
          }
          bit stderr {
            position 1;
            description
              "Include backtrace in stderr stream.";
          }
          bit stdout {
            position 2;
            description
              "Include backtrace in stdout stream.";
          }
          bit syslog {
            position 3;
            description
              "Include backtrace in syslog stream.";
          }
          bit vendor {
            position 4;
            description
              "Include backtrace in vendor stream.";
          }
        }
        description
          "Indicates in which log stream(s) backtrace info
             will be included. Param string is an XSD list:
             a double quoted series of whitespace separated
             (log stream) strings like "logfile syslog"";
      }

      leaf log-header {
        type bits {
          bit custom {
            position 0;
            description
              "Include date, time, and level.";
          }
          bit localtime {
            position 1;
            description
              "Include localtime instead of Yang canonical format.";
          }
        }
        description
          "Indicates what header elements to include in
             header output. Param string is an XSD list:
             a double quoted series of whitespace separated
             (element) strings like "custom localtime"";
      }

      leaf log-mirroring {
        type empty;
        description
          "If present in conjunction with --log, --log-syslog,
and/or --log-vendor, log output will be directed to
the normal stdout/stderr/logfile as well as
to the syslog or vendor log stream";
      }

      leaf log-console {
        type empty;
        description
          "User friendly synonym for --log-mirroring.";
      }

      leaf log-stderr {
        type empty;
        description
          "If present, error level output be directed to stderr
instead of stdout (as well as log file, if specified)";
      }

      leaf log-syslog {
        type empty;
        description
          "If present, log output will be directed to the
standard syslog interface. Yuma log priorities
will be translated into the appropriate syslog
equivalents.";
      }

      leaf log-syslog-level {
        type yt:NcDebugType;
        description
          "Sets the syslog debug logging level filter for output to
the syslog file for the program.";
      }
    }  // grouping LoggingCommonParms

    grouping LoggingVendorParms {
      leaf log-vendor {
        type empty;
        description
          "If present, log messages will be directed to a
customer-written and registered callback function.
This functionality is defined by an API specified in
the YumaWorks API Reference Manual. In the absence of
a registered callback, this parameter will direct
logging messages to syslog in order to facilitate
standalone testing.";
      }

      leaf log-vendor-level {
        type yt:NcDebugType;
        description
          "Sets the vendor debug logging level filter for output to
the vendor-specific log output file stream for the program.";
      }
    }  // grouping LoggingVendorParms

    grouping MessageIndentParm {
      leaf message-indent {
        type int8 {
          range "-1 .. 9";
        }
        default "-1";
        description
          "The number of spaces to indent for each level of
output in a protocol message, e.g. NETCONF request.
The value zero means no indent, just line feeds.
The value -1 means no indent and no line feeds either.";
      }
    }  // grouping MessageIndentParm

    grouping YumaproHomeParm {
      leaf yumapro-home {
        type string;
        description
          "Directory for the yumapro project root to use.
If present, this directory location will
override the 'YUMAPRO_HOME' environment variable,
if it is present.  If a zero-length string is
entered, then the YUMAPRO_HOME environment variable
will be ignored.";
      }
    }  // grouping YumaproHomeParm

    grouping MatchParms {
      leaf match-names {
        type ywt:NameMatchMode;
        description
          "Match mode to use for UrlPath name searches.";
      }

      leaf alt-names {
        type ywt:AltNameMode;
        description
          "Match mode to use for UrlPath name searches.";
      }

      leaf wildcard-keys {
        type boolean;
        description
          "Enable wildcards on key leaf values.
Set to 'true' if UrlPath targets for GET operations
are allowed to replace key values with the dash '-'
character to indicate that all instances of that key
are requested.

Set to false to treat the '-' character as a plain
character if entered as a key value in a UrlPath string.";
      }
    }  // grouping MatchParms

    grouping UseSessionVarsParm {
      leaf use-session-vars {
        type boolean;
        default "true";
        description
          "Specifies how global variables will be handled when
set from the context of a named session.  If 'true',
then an assignment (e.g., $$foo = 'bar') will only
affect the session-specific instance of the variable,
and only be visible within the scope of the named
session.

If 'false', then assignment statements for global
variables will affect the global instance of the
variable, and be visible to all sessions.

If the current session is the default session,
and not a named session, then the value of this
variable is ignored, and all global variable
assignments will affect the global instance of
the variable, and be visible to all sessions.";
      }
    }  // grouping UseSessionVarsParm

    grouping SaveSessionVarsParm {
      leaf save-session-vars {
        type boolean;
        default "true";
        description
          "Specifies if session variables will be saved
when the program exits. If use-session-vars
is 'false' then this variable is ignored.

If 'false', then session variables will not be
saved when the program exits.

If 'true', then session variables will be
saved when the program exits, but only if user
variables are being saved.";
      }
    }  // grouping SaveSessionVarsParm

    grouping DataTemplateParms {
      leaf use-data-templates {
        type boolean;
        default "true";
        description
          "Specifies if variable expressions are enabled for
data in XML, JSON or .conf instance documents.

If 'false', then text matching the pattern for
variable expressions in these instance documents
will be treated as plain strings.

If 'true', then text matching the pattern for
variable expressions in these instance documents
will be processed as variable expressions.";
      }

      leaf ignore-missing-vars {
        type boolean;
        default "false";
        description
          "Specifies how missing variable errors in data
templates are handled. This parameter has no
affect unless the 'use-data-templates' parameter
is 'true'.

If 'false', then variable expressions that contain
references to missing variables will cause a parsing
error.

If 'true', then variable expressions that contain
references to missing variables will not cause a
parsing error. Instead, an empty string will be used
for the value of a missing variable.";
      }
    }  // grouping DataTemplateParms

    grouping AnnotationParm {
      leaf-list annotation {
        type yt:NcModuleSpec;
        description
          "YANG deviation file representing model annotations.
Processed the same as a deviation parameter except
the module is not advertised to any client sessions.

Only the deviation 'deviate add' operation can be
used to transfer extension statements to another
model.

The annotations will be applied to a data definition
statement, as if they were defined as sub-statements
of the deviation target.

   --annotation=acme-dev1

Example object annotations (contents of acme-dev1)

  deviation /if:interfaces {
    deviate add {
      ncx:sil-delete-chilren-first;
    }
  }

  deviation /if:interfaces/if:interface {
    deviate add {
      ncx:sil-delete-chilren-first;
      acme:my-deviation1 'the deviation parm';
    }
  }
";
      }
    }  // grouping AnnotationParm

    grouping OcPatternParm {
      leaf with-ocpattern {
        type boolean;
        default "false";
        description
          "If true, then OpenConfig patterns with be checked.
If the module name starts with the string 'openconfig-'
then all pattern statements within that module
are treated as POSIX patterns, not YANG patterns.

If false, then the pattern statements in all modules
will be checked as YANG patterns.
";
      }
    }  // grouping OcPatternParm

    grouping LoadPathParm {
      leaf loadpath {
        type yt:NcPathList;
        description
          "Directory load path for YANG or YIN modules.
This will be checked before the modpath setting
if present when finding modules. After all module
and bundle parameters have been processed, this
load path will be checked and the server will
attempt to load any modules not already loaded.
Overrides the YUMA_LOADPATH environment variable.";
      }
    }  // grouping LoadPathParm

    grouping InsecureOkParm {
      leaf insecure-ok {
        type boolean;
        default "false";
        description
          "Specifies if insecure NETCONF over TLS should be allowed.
If true then X.509 certificates will be accepted even
if they cannot be verified. Used for debugging only!
This parameter is only available if the image was built
with the DEBUG=1 parameter.";
      }
    }  // grouping InsecureOkParm

    grouping ErrMsgParm {
      leaf-list errmsg {
        type string;
        description
          "Specifies a replacement string for a specific error number.
Can specify error message for 1 specific language.

The 'num' component must match the <error-number>
found in status_enum.h. New error enums are always added
at the end of the list, so the numbers will not change.

The 'lang' component should use the ISO-639-1 code
Max length is 7 characters.

The string has the format: '<num>:<lang>:error string'
where:
    <num> = error number to use for error message
    <lang> = language code (en for English)
    error string = error string text

Example:

  Replace error 117 (ERR_WB_WRITE_FAILED) 'db write failed'

  errmsg='117:en:The database could not be written'
";
      }
    }  // grouping ErrMsgParm

    grouping ErrMsgLangParm {
      leaf errmsg-lang {
        type string {
          length "1 .. 7";
        }
        default "en";
        description
          "Specifies the language code for the error-message
language. This is only relevant if there are errmsg
parameters for multiple languages loaded in the program.
This value should use the ISO-639-1 code.
";
      }
    }  // grouping ErrMsgLangParm

    grouping ModuleTagParm {
      leaf-list module-tag {
        type string {
          length "1 .. 1023";
        }
        description
          "Include only data nodes that match the module-tag.

Multiple module-tag parameters are combined as a
logical OR expression. Matching any tag value will
cause the data node to be included.

It is not an error to include an unknown module-tag.
Such tag values will simply be treated as a 'false'
match result, when evaluating the filter.

If any module-tag parameters are provided at all,
and there are no matches found, then no data will be
returned in the response.";
      }
    }  // grouping ModuleTagParm

    grouping SshKeyParms {
      leaf public-key {
        type string {
          length "1 .. max";
        }
        default "$HOME/.ssh/id_rsa.pub";
        description
          "Contains the file path specification
for the file containing the client-side public key.
If both 'public-key' and 'private-key' files are
present, the client will attempt to connect
to the server using these keys.  If this fails,
or not done, then password authentication will
be attempted.";
      }

      leaf private-key {
        type string {
          length "1 .. max";
        }
        default "$HOME/.ssh/id_rsa";
        description
          "Contains the file path specification
for the file containing the client-side private key.
If both 'public-key' and 'private-key' files are
present, the client will attempt to connect
to the server using these keys.  If this fails,
or not done, then password authentication will
be attempted.";
      }
    }  // grouping SshKeyParms

    grouping SslKeyParms {
      leaf ssl-fallback-ok {
        type boolean;
        default "true";
        description
          "If true then an attempt to establish a plain TCP
connection will be made if an SSL connection cannot
be made. This parameter only applies of the
'transport' is 'ssl'";
      }

      leaf ssl-certificate {
        type string {
          length "1 .. max";
        }
        default
          "$HOME/.ssl/yangapi-client.crt";
        description
          "Contains the file path specification
for the file containing the client-side ssl certificate.
If both 'certificate' and 'key' files are
present, the client will attempt to setup a secure
connection with the server using the certificate and
SSL key.

If this fails, and the 'ssl-fallback-ok' leaf is
set to true, the client will attempt to setup
a raw TCP connection with the server.";
      }

      leaf ssl-key {
        type string {
          length "1 .. max";
        }
        default
          "$HOME/.ssl/yangapi-client.key";
        description
          "Contains the file path specification
for the file containing the client-side ssl key.
If both 'certificate' and 'key' files are
present, the client will attempt to setup a secure
connection with the server using the certificate and
SSL key.  If this fails, client will attempt to setup
a raw TCP connection with the server.";
      }

      leaf ssl-trust-store {
        type string {
          length "1 .. max";
        }
        default "$HOME/.ssl/trust-store.pem";
        description
          "Contains the file path specification
for the file containing the client-side ssl trust-store,
or the path specification for the directory to use
for finding trusted certificates. If the default value
is used and the file is not found, then the default
directory location '/etc/ssl/certs' will be used.";
      }
    }  // grouping SslKeyParms

    grouping BinaryDisplayMaxlenParm {
      leaf binary-display-maxlen {
        type uint32;
        default "0";
        description
          "The maximum number of bytes to display when dumping
the contents of a binary value. Normally a message
will be displayed showing the name and length.

If this parameter is set to a value greater than zero
then a standard 8-byte per line hex dump of the
binary type will also be displayed for a maximum number
of bytes set by this parameter.";
      }
    }  // grouping BinaryDisplayMaxlenParm

    grouping WithTermMsgParm {
      leaf with-term-msg {
        type boolean;
        default "true";
        description
          "If set to 'true', then the yumaworks-term-msg module
will be loaded and enabled. Otherwise, this module will
not be loaded. The <term-msg> notification is used by
yp-shell for displaying terminal diagnostic messages.";
      }
    }  // grouping WithTermMsgParm
  }  // module yumaworks-app-common

Summary

  
  
Organization YumaWorks, Inc.
  
Module yumaworks-app-common
Version 2019-05-22
File yumaworks-app-common.yang
  
Prefix ywapp
Namespace http://yumaworks.com/ns/yumaworks-app-common
  
Cooked /cookedmodules/yumaworks-app-common/2019-05-22
YANG /src/yumaworks-app-common@2019-05-22.yang
XSD /xsd/yumaworks-app-common@2019-05-22.xsd
  
Abstract Common CLI parameters used in all yumapro applications. Copyright (c) 2012 - 2019 YumaWorks, Inc. All rights reserved. Redistr...
  
Contact
Support <support at yumaworks.com>

Description

 
Common CLI parameters used in all yumapro applications.

Copyright (c) 2012 - 2019 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

Groupings

Grouping Objects Abstract
AnnotationParm annotation
BinaryDisplayMaxlenParm binary-display-maxlen
DataTemplateParms use-data-templates ignore-missing-vars
ErrMsgLangParm errmsg-lang
ErrMsgParm errmsg
InsecureOkParm insecure-ok
LoadPathParm loadpath
LoggingCommonParms log-backtrace log-backtrace-detail log-backtrace-level log-backtrace-stream log-header log-mirroring log-console log-stderrlog-syslog log-syslog-level
LoggingVendorParms log-vendor log-vendor-level
MatchParms match-names alt-names wildcard-keys
MessageIndentParm message-indent
ModuleTagParm module-tag
OcPatternParm with-ocpattern
SaveSessionVarsParm save-session-vars
SshKeyParms public-key private-key
SslKeyParms ssl-fallback-ok ssl-certificate ssl-key ssl-trust-store
UseSessionVarsParm use-session-vars
WithTermMsgParm with-term-msg
YumaproHomeParm yumapro-home