netconfcentral logo

yumaworks-types

HTML

yumaworks-types@2015-10-04



  module yumaworks-types {

    yang-version 1;

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

    prefix ywt;

    organization "YumaWorks, Inc.";

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

    description
      "Common CLI parameter types used in multiple YumaPro
        applications.

     Copyright (c) 2012 - 2015 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 "2015-10-04" {
      description
        "Add encoding-type typedef.";
    }

    revision "2014-09-06" {
      description
        "Add server-target typedef.
          Add access-control-mode typedef.";
    }

    revision "2013-02-11" {
      description
        "Move some typedefs from yangcli-pro.yang to this module.";
    }

    revision "2012-12-05" {
      description "Initial version.";
    }


    typedef show-mode {
      type enumeration {
        enum "brief" {
          value 0;
        }
        enum "normal" {
          value 1;
        }
        enum "full" {
          value 2;
        }
      }
      description
        "The mode that a command or prompt should be displayed.
         Selects the verbosity level of the output.";
    }

    typedef NameMatchMode {
      type enumeration {
        enum "exact" {
          value 0;
          description
            "The name must exactly match the node name
             for all characters in both name strings.";
        }
        enum "exact-nocase" {
          value 1;
          description
            "The name must match the node name
             for all characters in both name strings.
             Strings are not case-sensitive.";
        }
        enum "one" {
          value 2;
          description
            "The name must exactly match the first N
             characters of just one node name, which
             must be the only partial name match found.";
        }
        enum "one-nocase" {
          value 3;
          description
            "The name must exactly match the first N
             characters of just one node name, which
             must be the only partial name match found.
             Strings are not case-sensitive.";
        }
        enum "first" {
          value 4;
          description
            "The name must exactly match the first N
             characters of any node name. The first one
             found will be used.";
        }
        enum "first-nocase" {
          value 5;
          description
            "The name must exactly match the first N
             characters of any node name. The first one
             found will be used. Strings are not 
             case-sensitive.";
        }
      }
      description
        "Defines the search mode that should be used
         when resolving YANG node names in leafs and
         leaf-lists using the UrlPath data type.";
    }

    typedef AltNameMode {
      type boolean;
      description
        "Defines the alternate name search mode that 
         should be used when resolving YANG node names
         in leafs or leaflists using the UrlPath data type.

         If 'true' then nodes with an 'alt-name' defined
         will be considered a match if the YANG name or the
         alternative name matches the search string.

         If 'false' then only the YANG node name will
         be used in node name searches.";
    }

    typedef UrlPath {
      type string {
        length "1..max";
      }
      description
        "Special URL encoded path expression.

          Normal Encoding Rules:

            - Normal content is encoded as an absolute path.
            - Keys are encoded as a path step within the URL,
              instead of a predicate expression like XPath.
            - The first character must be a forward slash '/'.
            - Each identifier or key encoded in the URL string
              is separated by a single forward slash '/' character.
            - Escaped character sequences are allowed, such
              as '%20' for the space ' ' character.
            - If any descendant nodes of a list are included,
              then all key leafs for that list must be encoded
              in the URL (or escaped with the dash '-' character
              to skip that key).
            - Only key leafs can be encoded within the URL string,
              similar to a YANG instance-identifier or 
              schema-instance-identifier string.  Other leafs
              are not allowed.

            Example URL and XPath strings:

                XPath:  /foo/bar[id='fred'][id2='barney]/baz

              UrlPath:  /foo/bar/fred/barney/baz

            Example showing the 'id2' key leaf escaped:

                XPath:  /foo/bar[id='fred']/baz

              UrlPath:  /foo/bar/fred/-/baz            

         Special Encoding Rules
 
            Since these escaped characters are usually decoded
            by the time an HTTP gateway program will get them,
            the forward slash '/' character needs to be treated
            differently.  To use this character within key leaf
            content, it must be escaped with another forward
            slash character. 

            Example showing escaped forward slash in content:

              XPath: /interfaces/interface[name='1/0/22']/mtu

            URLPath: /interfaces/interface/1//0//22/mtu

         Name Matching

            A parameter using the 'NameMatchMode' data type
            can be used to control how name node searches
            are done for nodes using this data type.

         Alternate Naming

            A parameter using the 'AltNameMode' data type
            can be used to control whether alternative
            node names can be used when name searches
            are done for nodes using this data type.
            
         Exceptions:

            XML namespaces are not ignored, but if multiple
            sibling nodes have the same local-name, then
            the first node found will be used.

         ";
    }

    typedef server-target {
      type enumeration {
        enum "running" {
          value 0;
          description
            "Write to the running config and support
            the :writable-running capability.";
        }
        enum "candidate" {
          value 1;
          description
            "Write to the candidate config and support
             the :candidate and :confirmed-commit 
             capabilities.";
        }
      }
      description
        "The database to use as the target of edit-config
         and copy-config operations.";
    }

    typedef access-control-mode {
      type enumeration {
        enum "enforcing" {
          value 0;
          description
            "All configured access control rules will be enforced.";
        }
        enum "permissive" {
          value 1;
          description
            "All configured access control rules will be
             enforced for write and execute requests.
             All read requests will be allowed, unless
             the requested object contains the
             'nacm:very-secure' extension.  In that case,
             all configured access control rules will be enforced.";
        }
        enum "disabled" {
          value 2;
          description
            "All read, write, and execute requests will be
              allowed, unless the object contains the
              'nacm:secure' or 'nacm:very-secure' extension.
              If the 'nacm:secure' extension is in effect,
              then all configured access control rules
              will be enforced for write and execute requests.
              If the 'nacm:very-secure' extension is in effect,
              then all configured access control rules
              will be enforced for all requests.
              Use this mode with caution.";
        }
        enum "off" {
          value 3;
          description
            "All access control enforcement is disabled.
              Use this mode with extreme caution.";
        }
      }
    }

    typedef encoding-type {
      type enumeration {
        enum "xml" {
          value 0;
          description "XML encoding";
        }
        enum "json" {
          value 1;
          description "JSON encoding";
        }
      }
      description
        "The message encoding format to use";
    }
  }  // module yumaworks-types

Summary

  
  
Organization YumaWorks, Inc.
  
Module yumaworks-types
Version 2015-10-04
File yumaworks-types.yang
  
Prefix ywt
Namespace http://yumaworks.com/ns/yumaworks-types
  
Cooked /cookedmodules/yumaworks-types/2015-10-04
YANG /src/yumaworks-types@2015-10-04.yang
XSD /xsd/yumaworks-types@2015-10-04.xsd
  
Abstract Common CLI parameter types used in multiple YumaPro applications. Copyright (c) 2012 - 2015 YumaWorks, Inc. All rights reserved...
  
Contact
Support <support at yumaworks.com>

Description

 
Common CLI parameter types used in multiple YumaPro
applications.

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

Typedefs

Typedef Base type Abstract
access-control-mode enumeration
AltNameMode boolean Defines the alternate name search mode that should be used when resolving YANG node names in leafs or leaflists using the UrlPath data type. If 'true' then nodes with an 'alt-name' defined will be considered a match if the YANG name or the alternative na...
encoding-type enumeration The message encoding format to use
NameMatchMode enumeration Defines the search mode that should be used when resolving YANG node names in leafs and leaf-lists using the UrlPath data type.
server-target enumeration The database to use as the target of edit-config and copy-config operations.
show-mode enumeration The mode that a command or prompt should be displayed. Selects the verbosity level of the output.
UrlPath string Special URL encoded path expression. Normal Encoding Rules: - Normal content is encoded as an absolute path. - Keys are encoded as a path step within the URL, instead of a predicate expression like XPath. - The first character must be a forwar...