huawei-tty

TTY Component.

  • Version: 2020-03-02

    huawei-tty@2020-03-02


    
      module huawei-tty {
    
        yang-version 1;
    
        namespace "urn:huawei:yang:huawei-tty";
    
        prefix tty;
    
        import huawei-pub-type {
          prefix pub-type;
        }
        import huawei-extension {
          prefix ext;
        }
        import huawei-acl {
          prefix acl;
        }
    
        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 "TTY Component.";
    
        revision "2020-03-02" {
          description "Initial revision.";
          reference
            "Huawei private.";
    
        }
    
        ext:task-name "tty";
    
        typedef tty-caml-line-type {
          type enumeration {
            enum "CON" {
              value 1;
              description "Line type console.";
            }
            enum "AUX" {
              value 2;
              description "Line type AUX.";
            }
            enum "TTY" {
              value 3;
              description "Line type TTY.";
            }
            enum "VTY" {
              value 4;
              description "Line type VTY.";
            }
            enum "LTT" {
              value 5;
              description "Line type LTT.";
            }
            enum "NCA" {
              value 6;
              description "Line type netconf.";
            }
            enum "RPC" {
              value 8;
              description "Line type grpc.";
            }
          }
          description "TTY CAML line type list.";
        }
    
        typedef tty-caml-connstate {
          type enumeration {
            enum "YES" {
              value 1;
              description
                "Terminal is connected.";
            }
            enum "NO" {
              value 2;
              description
                "Terminal is not connected.";
            }
          }
          description
            "TTY CAML connection state list.";
        }
    
        typedef tty-flwcntrl-type {
          type enumeration {
            enum "none" {
              value 1;
              description
                "Flow control as none.";
            }
            enum "software" {
              value 2;
              description
                "Flow control as software.";
            }
            enum "hardware" {
              value 3;
              description
                "Flow control as hardware.";
            }
          }
          description
            "TTY flow control type list.";
        }
    
        typedef tty-stop-bits-type {
          type enumeration {
            enum "1" {
              value 1;
              description "Stopbit as 1.";
            }
            enum "1.5" {
              value 2;
              description "Stop bit as 1.5.";
            }
            enum "2" {
              value 3;
              description "Stop bit as 2.";
            }
          }
          description "TTY stop bits type list.";
        }
    
        typedef tty-data-bits-type {
          type enumeration {
            enum "5" {
              value 1;
              description "Data bits as 5.";
            }
            enum "6" {
              value 2;
              description "Data bits as 6.";
            }
            enum "7" {
              value 3;
              description "Data bits as 7.";
            }
            enum "8" {
              value 4;
              description "Databits as 8.";
            }
          }
          description "TTY data bits type list.";
        }
    
        typedef tty-parity-type {
          type enumeration {
            enum "none" {
              value 1;
              description "Parity as None.";
            }
            enum "odd" {
              value 2;
              description "Parity as odd.";
            }
            enum "even" {
              value 3;
              description "Parity as even.";
            }
            enum "mark" {
              value 4;
              description "Parity as mark.";
            }
            enum "space" {
              value 5;
              description "Parity as space.";
            }
          }
          description "TTY parity type list.";
        }
    
        typedef tty-authmode-type {
          type enumeration {
            enum "none" {
              value 1;
              description
                "Authentication mode none.";
            }
            enum "password" {
              value 2;
              description
                "Authentication mode password.";
            }
            enum "aaa" {
              value 3;
              description
                "Authentication mode aaa.";
            }
            enum "init" {
              value 4;
              description
                "Undo authentication mode.";
            }
          }
          description
            "TTY authentication mode type list.";
        }
    
        typedef tty-bool-type {
          type enumeration {
            enum "false" {
              value 0;
              description "VTY shell disable.";
            }
            enum "true" {
              value 1;
              description "VTY shell enable.";
            }
          }
          description
            "VTY and TTY boolean type.";
        }
    
        container tty {
          description "TTY Component.";
          container console {
            description
              "Configure Console configuration container.";
            leaf idle-time-out-min {
              type uint16 {
                range "1..1440";
              }
              units "min";
              default "5";
              description
                "To set the idle timeout minute.";
            }
    
            leaf idle-time-out-sec {
              type uint16 {
                range "0..59";
              }
              units "s";
              default "0";
              description
                "To set the idle timeout seconds.";
            }
    
            leaf auth-mode {
              type tty-authmode-type;
              default "init";
              description
                "Sets the authentication mode.";
            }
    
            leaf auth-password {
              when "../auth-mode='password'";
              type pub-type:password {
                length "8..128";
              }
              description
                "Authentication Password.";
            }
    
            leaf privilege-level {
              type uint8 {
                range "0..15";
              }
              default "3";
              description
                "To set the privilege level.";
            }
    
            leaf history-cmd-size {
              type uint16 {
                range "0..256";
              }
              default "10";
              description
                "History command buffer size. Describes the number of commands will be stored in history.";
            }
    
            leaf screen-length {
              type uint16 {
                range "0..512";
              }
              default "24";
              description
                "Sets the screen length.";
            }
    
            leaf shell-enable {
              type tty-bool-type;
              default "true";
              config false;
              description
                "Whether to enable the shell function.";
            }
    
            leaf speed {
              type uint64 {
                range
                  "300 | 600 | 1200 | 2400 | 4800 | 9600 | 19200 | 38400 | 57600 | 115200";
              }
              units "bit/s";
              default "9600";
              description
                "Speed for the TTY device. Supported speeds are 300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600 and 115200.";
            }
    
            leaf flow-control {
              type tty-flwcntrl-type;
              default "none";
              description
                "To set the flow control of the TTY device.";
            }
    
            leaf stop-bits {
              type tty-stop-bits-type;
              default "1";
              description
                "To set the stop bits of the TTY devices.";
            }
    
            leaf data-bits {
              type tty-data-bits-type;
              default "8";
              description
                "Set the databits of the TTY devices.";
            }
    
            leaf parity {
              type tty-parity-type;
              default "none";
              description
                "Parity of the TTY devices.";
            }
    
            leaf shutdown-enble {
              type tty-bool-type;
              default "false";
              description
                "Shutdown the specified user-interface.";
            }
          }  // container console
    
          container aux {
            description
              "Configure AUX configuration container.";
            leaf idle-time-out-min {
              type uint16 {
                range "1..1440";
              }
              units "min";
              default "5";
              description
                "To set the idle timeout minute.";
            }
    
            leaf idle-time-out-sec {
              type uint16 {
                range "0..59";
              }
              units "s";
              default "0";
              description
                "To set the idle timeout seconds.";
            }
    
            leaf auth-mode {
              type tty-authmode-type;
              default "init";
              description
                "Sets the authentication mode.";
            }
    
            leaf auth-password {
              when "../auth-mode='password'";
              type pub-type:password {
                length "8..128";
              }
              description
                "Authentication Password.";
            }
    
            leaf privilege-level {
              type uint8 {
                range "0..15";
              }
              default "0";
              description
                "To set the privilege level.";
            }
    
            leaf history-cmd-size {
              type uint16 {
                range "0..256";
              }
              default "10";
              description
                "History command buffer size. Describes the number of commands will be stored in history.";
            }
    
            leaf screen-length {
              type uint16 {
                range "0..512";
              }
              default "24";
              description
                "Sets the screen length.";
            }
    
            leaf shell-enable {
              type tty-bool-type;
              default "true";
              description
                "Whether to enable the shell function.";
            }
    
            leaf speed {
              type uint64 {
                range
                  "300 | 600 | 1200 | 2400 | 4800 | 9600 | 19200 | 38400 | 57600 | 115200";
              }
              units "bit/s";
              default "9600";
              description
                "Speed for the TTY device. Supported speeds are 300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600 and 115200.";
            }
    
            leaf flow-control {
              type tty-flwcntrl-type;
              default "none";
              description
                "To set the flow control of the TTY device.";
            }
    
            leaf stop-bits {
              type tty-stop-bits-type;
              default "1";
              description
                "To set the stop bits of the TTY devices.";
            }
    
            leaf data-bits {
              type tty-data-bits-type;
              default "8";
              description
                "Set the databits of the TTY devices.";
            }
    
            leaf parity {
              type tty-parity-type;
              default "none";
              description
                "Parity of the TTY devices.";
            }
    
            leaf acl4-outbound {
              type leafref {
                path "/acl:acl/acl:groups/acl:group/acl:identity";
              }
              must
                "/acl:acl/acl:groups/acl:group[acl:identity=current()]/acl:type='basic' or /acl:acl/acl:groups/acl:group[acl:identity=current()]/acl:type='advance'";
              description
                "Acl outbound name or number for IPv4 protocol.";
            }
    
            leaf acl6-outbound {
              type leafref {
                path "/acl:acl/acl:group6s/acl:group6/acl:identity";
              }
              must
                "/acl:acl/acl:group6s/acl:group6[acl:identity=current()]/acl:type='basic' or /acl:acl/acl:group6s/acl:group6[acl:identity=current()]/acl:type='advance'";
              description
                "Acl outbound name or number for IPv6 protocol.";
            }
    
            leaf acl4-outbound-num {
              type leafref {
                path "/acl:acl/acl:groups/acl:group/acl:identity";
              }
              must
                "/acl:acl/acl:groups/acl:group[acl:identity=current()]/acl:type='basic' or /acl:acl/acl:groups/acl:group[acl:identity=current()]/acl:type='advance'";
              status deprecated;
              description
                "Acl outbound number for IPv4 protocol.";
            }
    
            leaf acl6-outbound-num {
              type leafref {
                path "/acl:acl/acl:group6s/acl:group6/acl:identity";
              }
              must
                "/acl:acl/acl:group6s/acl:group6[acl:identity=current()]/acl:type='basic' or /acl:acl/acl:group6s/acl:group6[acl:identity=current()]/acl:type='advance'";
              status deprecated;
              description
                "Acl outbound number for IPv6 protocol.";
            }
          }  // container aux
    
          container user-interfaces {
            config false;
            description
              "List of Terminal user interfaces.";
            list user-interface {
              key "line-index";
              config false;
              max-elements 165;
              description
                "Operational state of Terminal user interface status and configuration information.";
              leaf line-index {
                type uint32 {
                  range "0..164";
                }
                config false;
                description
                  "Absolute index of UIs.";
              }
    
              leaf line-type {
                ext:support-filter "true";
                type tty-caml-line-type;
                config false;
                description
                  "Type and relative index of UIs.";
              }
    
              leaf relative-index {
                ext:support-filter "true";
                type uint32;
                config false;
                description
                  "Relative index for the line type.";
              }
    
              leaf privileage {
                ext:support-filter "true";
                type uint32;
                config false;
                description
                  "The privilege of UIs.";
              }
    
              leaf modem-status {
                ext:support-filter "true";
                type string {
                  length "0..8";
                }
                config false;
                description
                  "Status of the modem connected.";
              }
    
              leaf location {
                ext:support-filter "true";
                type string {
                  length "0..32";
                }
                config false;
                description
                  "The physical location of UIs.";
              }
    
              leaf speed {
                ext:support-filter "true";
                type string {
                  length "0..7";
                }
                config false;
                description
                  "Speed of the interface terminal.";
              }
    
              leaf connect-status {
                ext:support-filter "true";
                type tty-caml-connstate;
                config false;
                description
                  "Current UI is active.";
              }
    
              leaf auth-mode {
                ext:support-filter "true";
                type tty-authmode-type;
                config false;
                description
                  "The authentication mode of UIs.";
              }
    
              leaf actual-privileage {
                ext:support-filter "true";
                type string {
                  length "0..5";
                }
                config false;
                description
                  "The actual privilege of user-interface.";
              }
            }  // list user-interface
          }  // container user-interfaces
        }  // container tty
      }  // module huawei-tty
    

© 2023 YumaWorks, Inc. All rights reserved.