netconfcentral logo

yumaworks-extensions@2020-03-31



  module yumaworks-extensions {

    yang-version 1;

    namespace
      "http://yumaworks.com/ns/yumaworks-extensions";

    prefix ywx;

    organization "YumaWorks, Inc.";

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

    description
      "This module contains definitions for YumaWorks YANG extensions.

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 "2020-03-31" {
      description
        "Update sil-aio-get2 extension. Add argument parameter to it";
    }

    revision "2019-12-06" {
      description
        "Add xpath-operational-ok extension.
Add sil-aio-get2 extension.";
    }

    revision "2019-01-04" {
      description
        "Add sil-test-get-when extension.";
    }

    revision "2018-03-24" {
      description
        "Add errmsg and sub-statement extensions.";
    }

    revision "2018-01-08" {
      description
        "Add no-sil-delete-children-first extension.";
    }

    revision "2017-12-26" {
      description
        "Add no-nvstore extension.";
    }

    revision "2015-05-08" {
      description
        "Add sil-priority extension.";
    }

    revision "2014-08-10" {
      description
        "Add sil-force-replace-replay extension.";
    }

    revision "2014-06-05" {
      description
        "Add sil-force-replay extension.";
    }

    revision "2014-04-08" {
      description "Add datapath extension.";
    }

    revision "2013-11-23" {
      description
        "Add exclusive-rpc extension.";
    }

    revision "2013-05-30" {
      description
        "Fix some missing argument clauses in the documentation.
Comment out notif-root and rpc-hook extensions for now because
they are not used in YANG-API.";
    }

    revision "2013-01-27" {
      description
        "Add help string extension.";
    }

    revision "2012-06-28" {
      description "Initial version";
    }


    extension alt-name {
      argument "name" {
        yin-element false;
      }
      description
        "Used within a data node definition to specify an alternate
name for the node.  The --alt-names parameter must
be enabled for these names to be used.  The argument is the
alternate name to use.  It must be a valid YANG identifier.";
    }

    extension rpc-root {
      description
        "Used within a container definition to indicate it is
really a root container for a conceptual NETCONF
operations, instead of just a container. The container
is expected to be empty.  Any top-level rpc-stmt can
be specified using a QName value with the same module
and local name as the RPC operation definition.
This extension is reserved and only used by the server.";
    }

    extension urlpath {
      description
        "Used within a leaf or leaf-list definition to indicate it is
really a REST URI path string, not a plain string.";
    }

    extension cli-text-block {
      description
        "If this extension is present in an empty container
or list, it will be treated in unit-test parsing as a
container or list of ordered text commands, 1 per line.
Line extension is needed to wrap a command into
many lines.

Example YANG:

 container setup {
    ywx:cli-text-block;
 }

Example test script or conf file usage:

 setup {
   run test1-script
   get-config source=running
   lock target=candidate
 }
";
    }

    extension help {
      argument "helptext" {
        yin-element true;
      }
      description
        "Used within a rpc or data definition statement to
provide a short help text string for CLI
and other applications to use in addition to
the description statement.

The 'helptext' argument is the help text string,
which should be 60 characters or less in length.";
    }

    extension exclusive-rpc {
      description
        "Used within an rpc definition statement to
indicate that the RPC is not allowed to be called
concurrently by different sessions.  The server will
return an in-use error if another session is currently
invoking the RPC operation and this extension is present
in the rpc-stmt.";
    }

    extension datapath {
      description
        "Used within a container or anyxml definition to indicate
that the object path for the data node should be sent
in the value as an attribute.  The SIL-SA parser will use
the datapath attribute to select the object template
to use for parsing, instead of generic anyxml.

   anyxml newval {
     ywx:datapath;
   }
   anyxml curval {
     ywx:datapath;
   }

   If /foo/bar/leaf2 is edited, the <edit> message
   will be generated with the datapath attribute
   from the yumaworks-attrs module.

    <newval ywattrs:datapath='/foo/bar/leaf2'>42</newval>
    <curval ywattrs:datapath='/foo/bar/leaf2'>67</curval>
";
    }

    extension sil-force-replay {
      description
        "Used within a configuration data node definition statement
to indicate that the SIL (or SIL-SA) callback should be
invoked even for nodes that are not changing.  At least
one descendant-or-self node must be changing in order
for any of the SIL callbacks for unchanged sibling nodes
to be invoked.";
    }

    extension sil-force-replace-replay {
      description
        "Used within a configuration data node definition statement
to indicate that the SIL (or SIL-SA) callback should be
invoked even for nodes that are not changing, during a
replace operation.  All SIL callbacks for child nodes
in the replace request (where the parent node contains
this extension) will be invoked during edit processing.

If this extension is used within a list statement, then
SIL callbacks for all instances of the list that are
provided in the replace operation will be invoked.";
    }

    extension sil-priority {
      argument "prio" {
        yin-element false;
      }
      description
        "Used to control the order that SIL or SIL-SA callbacks
are invoked for specific objects.

If this extension is used within a configuration database
object then the SIL priority for the object will be assigned
the value of the 'prio' argument.

Only the order of the 'apply', 'commit' and 'rollback'
callback phases will be affected by this parameter.
The 'validate' phase callbacks are invoked in the
order they appear in the edit request.

The 'prio' argument must be a number between 1 and 255.
If two objects are edited in the same edit request, the
the one with the lowest SIL priority number will be
executed first.

If no sil-priority is set for an object, then the value
of its nearest ancestor with the sil-priority extension
set will be used. If there is none, the the default
value of '255' will be used.

If the SIL priority is the same for two objects in the
same edit request, then the server will pick an order
in an implementation-specific manner.";
    }

    extension no-nvstore {
      description
        "Used within a configuration data node definition statement
to indicate that configuration changes made to the object
will not be stored in non-volatile storage. The configuration
node will be handled in an implementation-specific manner.
There is no argument defined for this extension.
The extension applies to the specified node and all
its descendants.";
    }

    extension no-sil-delete-children-first {
      description
        "Used within a configuration data node definition statement
to indicate that the --sil-delete-children-first parameter
should be ignored for this subtree, if it is set to 'true'.

Faster server performance can be achieved by deleting
an entire subtree at once, and this extension allows
the developer to force this behavior for the selected
SIL libraries that can support such deletion.

This is the opposite of the sil-delete-children-first
extension. Note that this extension applies to the
entire subtree, not just the node that contains this
extension. There are no parameters defined.";
    }

    extension errmsg {
      argument "basestr" {
        yin-element false;
      }
      description
        "Used within a data node statement to define
a custom error-message filed within an 'rpc-error'
or 'error' structure for some or all error conditions.

The string format is restricted to plain text with
the exception of the 2 character sequence '%s'.
This special sequence will be replaced in the
dynamic error message generation if an errmsg-parm
statement is found to match the escape sequence.

If this extension statement has no sub-statements,
then it matches all errors for the object.
If 'errmsg-tag' sub-statements are found, then
this entry will match only those error-tag values.
If 'errmsg-apptag' sub-statements are found, then
this entry will match only those error-app-tag values.

The 'basestr' argument must be formatted string.
If any parameters are specified, then the corresponding
'errmsg-parm' extension statements must be encoded within
this errmsg statement.

Multiple errmsg statements can be present in the same
data node statement. They will be processed in order
and the first matching statement will be used to
generate the error-message value.

Example:

   leaf my-network-id {
     type int32;
     ywx:errmsg 'Not a valid network ID for interface %s' {
       ywx:errmsg-parm '../../if:name';
       ywx:errmsg-apptag 'network-error';
     }
   }
";
    }

    extension errmsg-parm {
      argument "parmstr" {
        yin-element false;
      }
      description
        "Used within an errmsg statement to define
a parameter for expansion within the errmsg basestr.
There should be the correct number of expected parameters
for the corresponding 'basestr' format string.

The 'parmstr' argument must be an XPath path expression.
The context node will be the data node containing the
errmsg statement.
";
    }

    extension errmsg-tag {
      argument "tagstr" {
        yin-element false;
      }
      description
        "Used within an errmsg statement to define an
error-tag value that will filter this errmsg.
Multiple errmsg-tag and/or errmsg-apptag values
form a conceptual OR expression.

The 'tagstr' argument must be the error-tag value
that will be matched.
";
    }

    extension errmsg-apptag {
      argument "apptagstr" {
        yin-element false;
      }
      description
        "Used within an errmsg statement to define an
error-app-tag value that will filter this errmsg.
Multiple errmsg-tag and/or errmsg-apptag values
form a conceptual OR expression.

The 'apptagstr' argument must be the error-app-tag
value that will be matched.
";
    }

    extension errmsg-lang {
      argument "langstr" {
        yin-element false;
      }
      description
        "Used within an errmsg statement to define the
language code value that will filter this errmsg.
Only one errmsg-lang statement may appear within
an errmsg statement. The 'langstr' value will
be compared to the 'errmsg-lang' CLI variable setting.
If the strings are the same, the entry is used.

If this statement is not present, then the errmsg entry
will be used regardless of the 'errmsg-lang' CLI variable
setting.

The 'langstr' argument must be the language code
value that will be matched.
";
    }

    extension sil-test-get-when {
      argument "boolval" {
        yin-element false;
      }
      description
        "Used within a data definition statement to define
the --sil-get-test-when CLI parameter behavior for
a single object. This extension does not affect the
descendant data nodes.

The 'boolval' argument must be the string 'true'
or 'false'; If 'true' the object will be tested
for when-stmts if any need to be evaluated during
retrieval operations. If 'false' then any when-stmts
will be ignored during retrieval operations.

This extension will override the --sil-test-get-when
global CLI parameter. This extension will have no affect
unless the value is different than this CLI parameter.
";
    }

    extension sil-aio-get2 {
      argument "parmstr" {
        yin-element false;
      }
      description
        "Used within a data definition statement to define
the GET2 retrieval mechanism.
This extension affects the descendant data nodes.

This extension can be used in a container or list
to force the server to treat that data subtree as
a terminal node for GET2.

The entire subtree would be expected in one retrieval
in one callback invocation.

The entire subtree can be specified in the JSON
or XML buffer that will be used for return values.
The server will parse and handle the buffer and process
retrieval based on the provide JSON or XML encoded buffer.

The 'parmstr' argument can specify the encoding that will
be used in the callback. Available options are:
  - xml
  - json

If not specified default val value retrieval mechanism
will be assumed.
";
    }

    extension xpath-operational-ok {
      description
        "Used within a data-definition statement for a configuration
data node to alter the must-stmt and when-stmt found within
the data node. This allows an XPath expression in such a node
to reference config=false data nodes.

This property does not apply to any child nodes, just the data
node containing this external statement.

This violates the standard in RFC 7950, sec 6.4.1 so use with
caution since the YANG module will not be valid according to
YANG 1.1 rules.

There is no parameter for this extension.
";
    }
  }  // module yumaworks-extensions