huawei-telnets

Telnet server component.

  • Version: 2020-03-04

    huawei-telnets@2020-03-04


    
      module huawei-telnets {
    
        yang-version 1;
    
        namespace
          "urn:huawei:yang:huawei-telnets";
    
        prefix telnets;
    
        import huawei-pub-type {
          prefix pub-type;
        }
        import ietf-inet-types {
          prefix inet;
        }
        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 "Telnet server component.";
    
        revision "2020-03-04" {
          description "Modify bugs.";
          reference
            "Huawei private.";
    
        }
    
        revision "2019-05-05" {
          description "Initial revision.";
          reference
            "Huawei private.";
    
        }
    
        ext:task-name "telnet-server";
    
        typedef telnets-bool {
          type enumeration {
            enum "enable" {
              value 1;
              description
                "Telnet server/service enable.";
            }
            enum "disable" {
              value 0;
              description
                "Telnet server/service disable.";
            }
          }
          description
            "TELNET server bool switch.";
        }
    
        container telnets {
          description "Telnet server component.";
          container telnet {
            description
              "Configure telnet server configuration statistics.";
            leaf server-enable {
              type telnets-bool;
              default "disable";
              description
                "User can start the telnet service.";
            }
    
            leaf port-num {
              type uint32 {
                range "23 | 1025..65535";
              }
              default "23";
              description
                "User can set the listen port for telnet server.";
            }
    
            leaf ipv6-server-enble {
              type telnets-bool;
              default "disable";
              description
                "User can start the telnet IPv6 service.";
            }
    
            leaf ipv6-port-num {
              type uint32 {
                range "23 | 1025..65535";
              }
              default "23";
              description
                "User can set the IPv6 listen port for Telnet IPv6 server.";
            }
    
            leaf src-interf-name {
              type string {
                length "1..32";
              }
              status deprecated;
              description
                "Specify the source interface name.";
            }
    
            leaf acl4-name {
              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
                "Server ACL name or number for IPv4 connections.";
            }
    
            leaf acl4-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
                "Server ACL number for IPv4 connections.";
            }
    
            leaf acl6-name {
              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
                "Server ACL name or number for IPv6 connections.";
            }
    
            leaf acl6-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
                "Server ACL number for IPv6 connections.";
            }
    
            leaf src-ipv6-addr {
              type inet:ipv6-address-no-zone;
              status deprecated;
              description
                "TELNET IPv6 server source IP address.";
            }
    
            leaf src-vpn-name {
              when "../src-ipv6-addr";
              type string {
                length "1..32";
              }
              status deprecated;
              description
                "TELNET IPv6 server source VPN name.";
            }
    
            leaf packet-dscp {
              type uint32 {
                range "0..63";
              }
              default "48";
              description "Config DSCP value.";
            }
    
            leaf limit-session-num {
              type uint32 {
                range "1..64";
              }
              default "64";
              description
                "Maximum number of Telnets connections to the server using a single IP address.";
            }
          }  // container telnet
    
          container login-fail-alarm {
            description
              "Configure alarm when manager login failed frequently.";
            leaf upper-limit {
              type uint32 {
                range "0..100";
              }
              must
                "../upper-limit >= ../lower-limit";
              default "30";
              description
                "Login alarm report times.";
            }
    
            leaf lower-limit {
              type uint32 {
                range "0..45";
              }
              must
                "../upper-limit >= ../lower-limit";
              default "20";
              description
                "Login alarm resume times.";
            }
    
            leaf period {
              type uint32 {
                range "1..120";
              }
              units "min";
              default "5";
              description "Login alarm period.";
            }
          }  // container login-fail-alarm
    
          container ipv4-server-sources {
            description
              "List of Specify the source interface.";
            list ipv4-server-source {
              key "src-interface";
              max-elements 5;
              description
                "Configure Specify the source interface.";
              leaf src-interface {
                type pub-type:if-name;
                description
                  "Specify the source interface name. The specified source interface must exist and an IP address must be configured on the interface.";
              }
            }  // list ipv4-server-source
          }  // container ipv4-server-sources
    
          container ipv4-isolate-server-sources {
            description
              "List of the isolate source interface and source address.";
            list ipv4-isolate-server-source {
              key "src-interface src-ipv4-addr";
              max-elements 5;
              description
                "Configure the isolate source interface and source address.";
              leaf src-interface {
                type pub-type:if-name;
                must
                  "count(/telnets/ipv4-server-sources/ipv4-server-source[src-interface = current()]) = 0";
                description
                  "Specify the source interface name.";
              }
    
              leaf src-ipv4-addr {
                type inet:ipv4-address-no-zone;
                description
                  "Specify the source IPv4 address.";
              }
            }  // list ipv4-isolate-server-source
          }  // container ipv4-isolate-server-sources
    
          container ipv6-server-sources {
            description
              "List of telnet IPv6 server source address.";
            list ipv6-server-source {
              key "src-ipv6-addr";
              max-elements 5;
              description
                "Configure telnet IPv6 server source address.";
              leaf src-ipv6-addr {
                type inet:ipv6-address-no-zone;
                description
                  "Telnet IPv6 server source IP address.";
              }
    
              leaf src-ipv6-vpn-name {
                type string {
                  length "1..31";
                }
                description
                  "Specify the source VPN instance. The specified VPN instance must exist and IPv6-family must be enabled in the VPN instance.";
              }
            }  // list ipv6-server-source
          }  // container ipv6-server-sources
    
          container ipv6-isolate-server-sources {
            description
              "List of the isolate source interface and source IPv6 address.";
            list ipv6-isolate-server-source {
              key "src-interface src-ipv6-addr";
              max-elements 5;
              description
                "Configure the isolate source interface and source IPv6 address.";
              leaf src-interface {
                type pub-type:if-name;
                description
                  "Specify the source interface name.";
              }
    
              leaf src-ipv6-addr {
                type inet:ipv6-address-no-zone;
                must
                  "count(/telnets/ipv6-server-sources/ipv6-server-source[src-ipv6-addr = current()]) = 0";
                description
                  "Specify the source IPv6 address.";
              }
            }  // list ipv6-isolate-server-source
          }  // container ipv6-isolate-server-sources
    
          container all-server-source {
            description
              "Configure Specify all interfaces.";
            leaf all-ipv4-interface {
              type boolean;
              default "false";
              description
                "Enable/disable Specify all IPv4 interfaces.";
            }
    
            leaf all-ipv6-interface {
              type boolean;
              default "false";
              description
                "Enable/disable Specify all IPv6 interfaces.";
            }
          }  // container all-server-source
    
          container session-car {
            must 'cir-interval<=pir-interval';
            must 'cbs-interval<=pbs-interval';
            description
              "Configure telnet server session CAR.";
            leaf enable {
              type boolean;
              default "true";
              description
                "Enable/disable session CAR.";
            }
    
            leaf cir-interval {
              type uint32 {
                range "1..1000000";
              }
              units "kbit/s";
              default "4";
              description
                "Specify the session CAR CIR interval.";
            }
    
            leaf cbs-interval {
              type uint32 {
                range "1..1000000";
              }
              units "bit/s";
              default "640";
              description
                "Specify the session CAR CBS interval.";
            }
    
            leaf pir-interval {
              type uint32 {
                range "1..1000000";
              }
              units "kbit/s";
              default "64";
              description
                "Specify the session CAR PIR interval.";
            }
    
            leaf pbs-interval {
              type uint32 {
                range "1..1000000";
              }
              units "bit/s";
              default "10000";
              description
                "Specify the session CAR PBS interval.";
            }
          }  // container session-car
        }  // container telnets
      }  // module huawei-telnets
    

© 2023 YumaWorks, Inc. All rights reserved.