netconfcentral logo

yuma-types.yang



   module yuma-types {

      yang-version 1;

      namespace
         "http://netconfcentral.org/ns/yuma-types";

      prefix "yt";

      organization "Netconf Central";

      contact
         "Andy Bierman <andy at netconfcentral.org>";

      description "Yuma Common Data Types";

      revision "2010-01-25" {
         description
            "Adjust name lengths in ranges and patterns.";
      }

      revision "2008-11-21" {
         description "Renamed ncxtypes to yuma-types.";
      }

      revision "2008-07-20" {
         description "Converted from ncxtypes.ncx.";
      }


      typedef int {
         type int32;
         description
            "Changed int base type to int32 for YANG";
      }

      typedef uint {
         type uint32;
         description
            "Changed uint base type to uint32 for YANG";
      }

      typedef long {
         type int64;
         description
            "Changed long base type to int64 for YANG";
      }

      typedef ulong {
         type uint64;
         description
            "Changed ulong base type to uint64 for YANG";
      }

      typedef ustring {
         type binary;
         description
            "Changed ustring base type to binary for YANG";
      }

      typedef NcxName {
         type string {
            length "1..64";
            pattern '[a-z,A-Z,_][a-z,A-Z,0-9,\-,_,\.]{0,63}';
         }
         description "General Purpose NCX Name string.";
      }

      typedef NcxQName {
         type string {
            length "1..129";
            pattern
               '(([a-z,A-Z,_][a-z,A-Z,0-9,\-,_,\.]{0,63}):)?([a-z,A-Z][a-z,A-Z,0-9,\-,_,\.]{0,63})';
         }
         description
            "Qualified Name:
             module-name:NcxName OR owner-name:NcxName.";
      }

      typedef NcxIdentifier {
         type union {
            type NcxName;
            type NcxQName;
         }
         description "Union of all the Identifier types.";
      }

      typedef NcxSessionId {
         type uint32 {
            range "1..max";
         }
         description "NCX Session ID number";
      }

      typedef NcxLineLength {
         type uint32 {
            range "32..65535";
         }
         description "Requested Maximum Line Length";
      }

      typedef NcxUserName {
         type NcxName;
         description "NCX User Name string.";
      }

      typedef NcxGroupName {
         type NcxName;
         description "NCX Group Name string.";
      }

      typedef NcAccessControlType {
         type enumeration {
            enum "open" {
               value 0;
               description "no access control checking enforced";
            }
            enum "loose" {
               value 1;
               description
                  "any RPC method in the netconf namespace can
                  be invoked;  read-only data allowed for all";
            }
            enum "strict" {
               value 2;
               description
                  "RPC entry must be present to invoke
                  an RPC method; ncxacl Data entry must be present
                  to access any data. (Except for user == 'root'.)";
            }
         }
         default "strict";
         description "NCX System access control mode.";
      }

      typedef NcxRpcType {
         type enumeration {
            enum "other" {
               value 0;
            }
            enum "config" {
               value 1;
            }
            enum "exec" {
               value 2;
            }
            enum "monitor" {
               value 3;
            }
            enum "debug" {
               value 4;
            }
         }
         description "NCX RPC Type Classifications";
      }

      typedef NcDebugType {
         type enumeration {
            enum "off" {
               value 0;
            }
            enum "error" {
               value 1;
            }
            enum "warn" {
               value 2;
            }
            enum "info" {
               value 3;
            }
            enum "debug" {
               value 4;
            }
            enum "debug2" {
               value 5;
            }
            enum "debug3" {
               value 6;
            }
            enum "debug4" {
               value 7;
            }
         }
         default "info";
         description
            "NCX Session debug logging control enumeration.
            Each successive value includes all the previous
            messages from lower value enumeration values,
            plus the messages for the specified value.
            
            off == no logging is done
            error == log error messages
            warn == log warning messages
            info == log info messages 
            debug == log debug level 1 messages
            debug2 == log debug level 2 messages
            debug3 == log debug level 3 messages
            debug4 == log debug level 4 messages";
      }

      typedef NcPortNumber {
         type uint32 {
            range "1 .. 65535";
         }
         description "Transport layer port number.";
      }

      typedef NcIndex {
         type uint32 {
            range "1..max";
         }
         description "Non-negative index value";
      }

      typedef NcPathList {
         type string {
            length "1 .. max";
         }
         description
            "PATHSPEC formatted string indicating the machine-dependent
            search path for the NCX programs to use.  Parameters
            with this data type can be used to override the
            default search order, and insert special work
            directories in the search path.
            
            Each component in the string is an absolute or
            relative directory path specification.
            The colon char ':' is used to separate the path strings.
            Whitespace is not allowed in the string at all.
            
            For example, the following string contains 3 paths
            that would be used in the order given:
            
            /home/users/testbed1/yang:/home/users/yang:/usr/share/yang";
      }

      typedef NcModuleSpec {
         type string {
            length "1 .. 4095";
         }
         description
            "A string which specifies a module name, or a filespec
            which represents a module, with an optional revision date.
            
                  If this string represents a filespec, 
                  containing any path separation characters, and/or
                  ending with the '.yang' or '.yin' extension,
                  then only that file location will be checked.
            
                  If this string represents a module name, then
                  the module search path will be checked for
                  a file with the module name and the '.yang'
                  or '.yin.' extension.
            
                  If this string contains a module name
                  followed by an 'at sign' character (@), 
                  followed by a revision string (e.g., foo@2010-01-01),
                  then that specific version of the module will be used.
            
                  If this string begins with a '~' character,
                  then a username is expected to follow or
                  a directory separator character.  If it begins
                  with a '$' character, then an environment variable
                  name is expected to follow.
            
                  ~/some/path ==> <my-home-dir>/some/path
            
                  ~fred/some/path ==> <fred-home-dir>/some/path
            
                  $workdir/some/path ==> <workdir-env-var>/some/path
               ";
      }

      typedef NcPathSpec {
         type string {
            length "1 .. 4095";
         }
         description
            "A string which specifies a directory name.";
      }

      typedef IndentType {
         type uint32 {
            range "0..9";
         }
         default "3";
         description
            "Requested indent amount.
            Only a limited range of line indent values are allowed.";
      }

      typedef Timeout {
         type uint32;
         units "seconds";
         default "30";
         description
            "Number of seconds to wait for a response
            from the NETCONF peer before declaring a timeout.
            Zero means no timeout at all.";
      }

      typedef Date {
         type string;
         description
            "Represents a specific date in YYYY-MM-DD format.";
      }

      typedef FeatureSpec {
         type NcxQName;
         description
            "Represents a feature specifier, which consists
            of a module-name, colon character ':' and then
            a feature name (e.g., 'foo:bar')";
      }
   }  // module yuma-types