huawei-pub-type

This YANG module define public datatypes.

  • Version: 2021-08-11

    huawei-pub-type@2021-08-11


    
      module huawei-pub-type {
    
        yang-version 1;
    
        namespace
          "urn:huawei:yang:huawei-pub-type";
    
        prefix pub-type;
    
        import huawei-extension {
          prefix ext;
        }
    
        organization
          "Huawei Technologies Co., Ltd.";
    
        contact
          "Huawei Industrial Base
    Bantian, Longgang
    Shenzhen 518129
    People's Republic of China
    Website: http://www.huawei.com
    Email: support@huawei.com";
    
        description
          "This YANG module define public datatypes.";
    
        revision "2021-08-11" {
          description "Modify revision data.";
          reference
            "Huawei private.";
    
        }
    
        revision "2020-04-01" {
          description "Modify hex-binary type.";
          reference
            "Huawei private.";
    
        }
    
        revision "2020-02-05" {
          description "Add password type.";
          reference
            "Huawei private.";
    
        }
    
        revision "2019-09-26" {
          description
            "Modify description and status.";
          reference
            "Huawei private.";
    
        }
    
        revision "2019-07-18" {
          description
            "Modify regular expression to mac-address.";
          reference
            "Huawei private.";
    
        }
    
        revision "2019-07-08" {
          description
            "Add a regular expression to mac-address.";
          reference
            "Huawei private.";
    
        }
    
        revision "2019-04-27" {
          description "Initial revision.";
          reference
            "Huawei private.";
    
        }
    
    
        typedef time-hhmm {
          type string {
            length "3..5";
            pattern
              '(([0-1][0-9])|(2[0-3])|[0-9]):([0-5][0-9]|[0-9])';
          }
          description
            "Time in standard notation, is like string with format 'hh:mm', and hh is hour, mm is minute, range is 00:00~23:59.";
        }
    
        typedef mac-address {
          type string {
            ext:case-sensitivity "lower-only";
            length "0..255";
            pattern
              '[0-9a-f]{4}(-[0-9a-f]{4}){2}';
          }
          description
            "A MAC address in standard notation.";
        }
    
        typedef ipv6-address-prefix {
          type string {
            length "0..255";
          }
          description
            "IPv6 address prefix in standard notation.";
        }
    
        typedef block {
          type string {
            length "0..255";
          }
          description
            "Block in standard notation.";
        }
    
        typedef slot-path {
          type string {
            length "1..127";
            pattern '\d+/\d+';
          }
          description "Slot path is like '1/1'.";
        }
    
        typedef if-name {
          type string {
            length "1..63";
          }
          description
            "Interface name is like ethernet1/1/1/1.";
        }
    
        typedef position {
          type string {
            length "1..32";
          }
          description
            "Board position in standard notation, serial-port position is like[1/1/1/1:2:3].";
        }
    
        typedef password {
          type string {
            length "1..128";
          }
          description
            "The password is a string ranging from 1 to 16 characters for a unencrypted password and 20 to 128 characters for a encrypted password.";
        }
    
        typedef password-extend {
          type string {
            length "1..432";
          }
          description
            "The password is a string ranging from 1 to 255 characters for a unencrypted password and 20 to 432 characters for a encrypted password.";
        }
    
        typedef one-input-password-extend {
          type string {
            length "1..432";
          }
          description
            "The password is a string ranging from 1 to 255 characters for a plain text password and 20 to 432 characters for a cipher text password.";
        }
    
        typedef vrf-name {
          type string {
            length "1..31";
          }
          description
            "VRF name in standard notation.";
        }
    
        typedef time-tick {
          type uint32;
          description
            "Time tick in standard notation, represents the time in SECOND between two epochs.";
        }
    
        typedef identifier-string {
          type string {
            pattern '([^\s?|>]*)';
          }
          description
            "Identifier string is used for identifier with strict limitation.";
        }
    
        typedef description-string {
          type string {
            pattern '([^?]*)';
          }
          description
            "Description string is used for description with little limitation.";
        }
    
        typedef row-status {
          type enumeration {
            enum "active" {
              value 0;
              description
                "Rule status is active at the current time.";
            }
            enum "not-in-service" {
              value 1;
              description
                "Rule status is not active at the current time.";
            }
            enum "not-ready" {
              value 2;
              description
                "The system is unavailable at the moment.";
            }
          }
          description
            "Row-status indicates current status.";
        }
    
        typedef bits8 {
          type uint8;
          status deprecated;
          description
            "Bits8 is like uint8. It is strongly recommended to use the standard built-in types of 'bits' instead of bits8/bits16/bits32/bits64.";
        }
    
        typedef bits16 {
          type uint16;
          status deprecated;
          description
            "Bits16 is like uint16. It is strongly recommended to use the standard built-in types of 'bits' instead of bits8/bits16/bits32/bits64.";
        }
    
        typedef bits32 {
          type uint32;
          status deprecated;
          description
            "Bits32 is like uint32. It is strongly recommended to use the standard built-in types of 'bits' instead of bits8/bits16/bits32/bits64.";
        }
    
        typedef bits64 {
          type uint64;
          status deprecated;
          description
            "Bits64 is like uint64. It is strongly recommended to use the standard built-in types of 'bits' instead of bits8/bits16/bits32/bits64.";
        }
    
        typedef percent {
          type uint8 {
            range "0..100";
          }
          units "%";
          description "Percent is like uint8.";
        }
    
        typedef band-width {
          type uint64;
          units "bit/s";
          description "The speed of interfaces.";
        }
    
        typedef app-type {
          type enumeration {
            enum "lct" {
              value 0;
              description "App-type is LCT.";
            }
            enum "ems" {
              value 1;
              description "App-type is EMS.";
            }
            enum "cmd" {
              value 2;
              description "App-type is CMD.";
            }
            enum "ftp" {
              value 3;
              description "App-type is FTP.";
            }
            enum "unknown" {
              value 4;
              description "App-type is UNKNOWN.";
            }
          }
          description "The application types.";
        }
    
        typedef devm-timeslot-list-type {
          type string {
            length "1..61";
          }
          description "Type of timeslot-list.";
        }
    
        typedef host-name {
          type string {
            length "1..255";
          }
          description
            "Host-name is like string.";
        }
    
        typedef acl4-identity {
          type string {
            length "1..64";
            pattern
              '([1-9]\d{3})|(10[0-9]{3})|(23[0-9]{3})|(99999)|([0-9a-zA-Z]([^\s]*))';
          }
          description
            "Acl4-identity is begin with a-z or A-Z or 0-9.";
        }
    
        typedef hex-binary {
          type string {
            ext:case-sensitivity "upper2lower";
            length "1..10";
            pattern
              '0[xX](0|([1-9a-fA-F][0-9a-fA-F]*))';
          }
          description
            "This is a hexadecimal variable.";
        }
    
        typedef date {
          type string {
            pattern '\d{4}-\d{2}-\d{2}';
          }
          description
            "XSD date string type, such as '2010-10-08'.";
          reference
            "http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/datatypes.html#date";
    
        }
    
        typedef time {
          type string {
            pattern '\d{1,2}:\d{1,2}:\d{1,2}';
            pattern
              '(([0-1][0-9])|(2[0-3])|[0-9]):([0-5][0-9]|[0-9]):([0-5][0-9]|[0-9])';
          }
          description
            "XSD time string type such as '20:15:30'. Range is 00:00:00~23:59:59.";
          reference
            "http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/datatypes.html#date";
    
        }
    
        typedef id-range {
          type string {
            pattern '([0-9]|,|\+|\-|\(|\))+';
          }
          description
            "ID list, such as '1,3,5-7',or '+1,-3,+(20-30)'.";
        }
    
        typedef vlan-range {
          type id-range {
            pattern
              '((409[0-4]|40[0-8][0-9]|[1-3][0-9]{3}|[1-9][0-9]{1,2}|[1-9])?(-(409[0-4]|40[0-8][0-9]|[1-3][0-9]{3}|[1-9][0-9]{1,2}|[1-9]))?(,((409[0-4]|40[0-8][0-9]|[1-3][0-9]{3}|[1-9][0-9]{1,2}|[1-9])(-(409[0-4]|40[0-8][0-9]|[1-3][0-9]{3}|[1-9][0-9]{1,2}|[1-9]))?))*)|((([\+\-](409[0-4]|40[0-8][0-9]|[1-3][0-9]{3}|[1-9][0-9]{1,2}|[1-9]))|([\+\-]\((409[0-4]|40[0-8][0-9]|[1-3][0-9]{3}|[1-9][0-9]{1,2}|[1-9])-(409[0-4]|40[0-8][0-9]|[1-3][0-9]{3}|[1-9][0-9]{1,2}|[1-9])\)))?(,(([\+\-](409[0-4]|40[0-8][0-9]|[1-3][0-9]{3}|[1-9][0-9]{1,2}|[1-9]))|([\+\-]\((409[0-4]|40[0-8][0-9]|[1-3][0-9]{3}|[1-9][0-9]{1,2}|[1-9])-(409[0-4]|40[0-8][0-9]|[1-3][0-9]{3}|[1-9][0-9]{1,2}|[1-9])\))))*)';
          }
          description "VLAN ID list.";
        }
    
        typedef keychain-name {
          type string {
            length "0..47";
          }
          description
            "Now keyChainName is like string.";
        }
      }  // module huawei-pub-type
    

© 2023 YumaWorks, Inc. All rights reserved.