VTY.
Version: 2020-03-02
module huawei-vty { yang-version 1; namespace "urn:huawei:yang:huawei-vty"; prefix vty; import huawei-pub-type { prefix pub-type; } import huawei-acl { prefix acl; } import huawei-extension { prefix ext; } import ietf-inet-types { prefix inet; } import huawei-tty { prefix tty; } 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 "VTY."; revision "2020-03-02" { description "Initial revision."; reference "Huawei private."; } ext:task-name "tty"; typedef vty-authmode-type { type enumeration { enum "none" { value 1; description "VTY authentication mode none."; } enum "password" { value 2; description "VTY authentication mode password."; } enum "aaa" { value 3; description "VTY authentication mode aaa."; } enum "init" { value 4; description "Undo authentication mode."; } } description "VTY and TTY authentication mode type."; } typedef vty-proto-inbnd-type { type enumeration { enum "all" { value 0; description "Protocol inbound all."; } enum "ssh" { value 1; description "Protocol inbound ssh."; } enum "telnet" { value 2; description "Protocol inbound telnet."; } } description "VTY and TTY ProtoInbnd."; } typedef vty-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."; } typedef vty-author-state-type { type enumeration { enum "idle" { value 0; description "Idle."; } enum "authoring" { value 1; description "Authoring."; } enum "success" { value 2; description "Success."; } enum "failed" { value 3; description "Failed."; } } description "Authorization state type."; } typedef vty-authen-state-type { type enumeration { enum "idle" { value 0; description "Idle."; } enum "authenticating" { value 1; description "Authenticating."; } enum "success" { value 2; description "Success."; } enum "failed" { value 3; description "Failed."; } } description "Authentication state type."; } container vty { description "VTY."; container lines { description "List of VTY specific configuration list."; list line { ext:generated-by "system"; key "index"; max-elements 21; description "Configure VTY specific configuration policy."; leaf index { type uint8 { range "34..54"; } description "Terminal line index."; } leaf idle-timeout-min { ext:support-filter "true"; type uint16 { range "0..35791"; } units "min"; default "10"; description "Idle timeout in minutes."; } leaf idle-timeout-sec { ext:support-filter "true"; type uint16 { range "0..59"; } units "s"; default "0"; description "Idle timeout in seconds."; } leaf auth-mode { ext:support-filter "true"; type vty-authmode-type; must "(../auth-mode='aaa' and ../proto-inbound='ssh') or not(../proto-inbound='ssh')"; default "init"; description "Authentication Mode."; } leaf auth-password { type pub-type:password { length "8..128"; } must "../auth-mode='password'"; description "Authentication Password."; } leaf privilege-level { ext:support-filter "true"; type uint8 { range "0..15"; } default "0"; description "User privilege level."; } leaf history-cmd-size { ext:support-filter "true"; 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 { ext:support-filter "true"; type uint16 { range "0..512"; } default "24"; description "VTY screen length value."; } leaf shell-enable { ext:support-filter "true"; type vty-bool-type; default "true"; description "Shell (Enable/Disable)."; } leaf acl4-inbound { ext:support-filter "true"; 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 inbound name or number for IPv4 protocol."; } leaf acl4-outbound { ext:support-filter "true"; 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-inbound { ext:support-filter "true"; 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 inbound name or number for IPv6 protocol."; } leaf acl6-outbound { ext:support-filter "true"; 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-inbound-num { ext:support-filter "true"; 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 inbound number for IPv4 protocol."; } leaf acl4-outbound-num { ext:support-filter "true"; 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-inbound-num { ext:support-filter "true"; 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 inbound number for IPv6 protocol."; } leaf acl6-outbound-num { ext:support-filter "true"; 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."; } leaf proto-inbound { ext:support-filter "true"; type vty-proto-inbnd-type; must "(../auth-mode='aaa' and ../proto-inbound='ssh') or not(../proto-inbound='ssh')"; default "all"; description "VTY protocol inbound name."; } } // list line } // container lines container line-global { description "Configure VTY global configuration."; leaf max-users { type uint32 { range "0..21"; } config false; description "Maximum users can connect to VTY."; } leaf password-lock { type boolean; default "true"; description "Enable/disable VTY IP block."; } leaf security-policy { type boolean; default "true"; description "Enable/disable VTY security policy. Disabling this may reduce the degree of VTY security. It is strongly recommended to keep this enabled."; } leaf available-threshold-alarm { type uint32 { range "0..21"; } default '4'; description "Indicates the alarm threshold for the number of available VTY channels. If the value is lower than the threshold, an alarm is reported."; } } // container line-global container useronlineinfos { config false; description "List of user online info statistics."; list useronlineinfo { key "line-index"; config false; description "Operational data of user online info statistics."; leaf line-index { type uint32 { range "0..164"; } config false; description "Absolute index of the userinterface."; } leaf ip-addr { type inet:ip-address-no-zone; config false; description "The client ip address from where it is connected."; } leaf line-type { type tty:tty-caml-line-type; config false; description "Type and relative index of UIs."; } leaf idle-time { type string { length "0..24"; } config false; description "Indicates the time gap from last input."; } leaf authen-state { type vty-authen-state-type; config false; description "Authentication state."; } leaf user-name { type string { length "0..254"; } description "User name."; } leaf author-state { type vty-author-state-type; config false; description "Author state."; } } // list useronlineinfo } // container useronlineinfos } // container vty } // module huawei-vty
© 2023 YumaWorks, Inc. All rights reserved.