SNMP configuration of virtual access.
Version: 2020-04-20
module huawei-vaccess-snmp { yang-version 1; namespace "urn:huawei:yang:huawei-vaccess-snmp"; prefix nvsnmp; import huawei-pub-type { prefix pub-type; } import huawei-vaccess { prefix vaccess; } import ietf-inet-types { prefix inet; } import huawei-extension { prefix ext; } import huawei-snmp { prefix snmp; } 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 "SNMP configuration of virtual access."; revision "2020-04-20" { description "Modify description syntax."; reference "Huawei private."; } revision "2020-03-04" { description "Modify description syntax."; reference "Huawei private."; } revision "2019-11-20" { description "Initial revision."; reference "Huawei private."; } ext:task-name "snmp"; typedef snmp-notify { type enumeration { enum "trap" { value 1; description "The notify type of trap."; } } description "SNMP notify type enum."; } augment /vaccess:vaccess { description "The configuration of vaccess."; container snmp { description "Configure SNMP in virtual access."; container system { description "Configure SNMP parameters."; leaf agent-enable { type boolean; default "false"; description "Enable/disable SNMP agent enable switch."; } leaf ext-err-code-enable { type boolean; default "false"; description "Enable/disable extend error code enable switch."; } } // container system container engine { description "Configure SNMP engine parameters."; leaf version { type snmp:snmp-version; default "v3"; description "Version supported by SNMP engine."; } } // container engine container mib-views { description "List of VACM View to configure MIB subtree."; list mib-view { key "view-name sub-tree"; description "Configure name of MIB View entry."; leaf view-name { type string { length "1..32"; } description "Name of subtree's MIB View entry."; } leaf sub-tree { type string { length "1..255"; } description "MIB subtree."; } leaf type { ext:support-filter "true"; type snmp:snmp-filter; mandatory true; description "Filter (include | exclude)."; } } // list mib-view } // container mib-views container communitys { description "List of SNMP communtiy for SNMPv1 and SNMPv2."; list community { key "index"; unique "name"; max-elements 25; description "Configure community entry."; leaf index { type string { length "1..32"; } description "Unique index to identify the community."; } leaf name { ext:support-filter "true"; type pub-type:password-extend { length "8..32 | 48 | 68..168"; } mandatory true; description "Unique name to identify the community."; } leaf access-right { ext:support-filter "true"; type snmp:snmp-access; mandatory true; description "Access right (read | write)."; } leaf view-name { ext:support-filter "true"; type leafref { path "/vaccess:vaccess/nvsnmp:snmp/nvsnmp:mib-views/nvsnmp:mib-view/nvsnmp:view-name"; } description "MIB View name."; } } // list community } // container communitys container target-hosts { description "List of target host for traps."; list target-host { key "nms-name"; unique "address"; max-elements 20; description "Configure target host entry."; leaf nms-name { type string { length "1..32"; } description "Unique name to identify target host entry."; } leaf address { type inet:ipv4-address-no-zone; mandatory true; description "Network address."; } leaf notify-type { ext:support-filter "true"; type snmp-notify; mandatory true; description "Notify type about alarm message."; } choice params { mandatory true; description "This choice is augmented with case nodes containing configuration parameters specific to the security model."; case v1 { description "Security model SNMPv1."; leaf security-name-v1 { type pub-type:password-extend { length "1..32 | 48 | 68..168"; } mandatory true; description "SNMPv1 security name."; } } // case v1 case v2c { description "Security model v2c."; leaf security-name-v2c { type pub-type:password-extend { length "1..32 | 48 | 68..168"; } mandatory true; description "SNMPv2c security name."; } } // case v2c case usm { description "Security model SNMPv3."; leaf usm-name { type string { length "1..32"; } mandatory true; description "USM name."; } leaf security-level { type snmp:snmp-security-level; mandatory true; description "Security level indicating whether to use authentication and encryption."; } } // case usm } // choice params leaf private-netmanager { type boolean; default "false"; description "Enable/disable private VB's for target host."; } leaf ext-vb { type boolean; default "false"; description "Enable/disable extended VB's for target host."; } } // list target-host } // container target-hosts container usm-users { description "List of USM users for SNMPv3."; list usm-user { key "user-name"; max-elements 20; description "Configure USM user entry."; leaf user-name { type string { length "1..32"; } description "Unique name to identify the USM user."; } leaf group-name { ext:support-filter "true"; type string { length "1..32"; } description "Name of the group where user belongs to."; } leaf auth-protocol { ext:support-filter "true"; type snmp:snmp-authenmode; default "noAuth"; description "Authentication protocol."; } leaf auth-key { when "../auth-protocol != 'noAuth'"; type pub-type:password-extend { length "1..432"; } mandatory true; description "The authentication password."; } leaf priv-protocol { ext:support-filter "true"; type snmp:snmp-privacy; must "../priv-protocol='noPriv' or not(../auth-protocol='noAuth')"; default "noPriv"; description "Encryption protocol."; } leaf priv-key { when "../auth-protocol!='noAuth' and ../priv-protocol!='noPriv'"; type pub-type:password-extend { length "1..432"; } mandatory true; description "The encryption password."; } } // list usm-user } // container usm-users container v3-groups { description "List of SNMPv3 groups."; list v3-group { key "group-name security-level"; max-elements 20; description "Configure SNMPv3 group entry."; leaf group-name { type string { length "1..32"; } description "Unique name to identify the SNMPv3 group."; } leaf security-level { type snmp:snmp-security-level; description "Security level indicating whether to use authentication and encryption."; } leaf read-view-name { ext:support-filter "true"; type leafref { path "/vaccess:vaccess/nvsnmp:snmp/nvsnmp:mib-views/nvsnmp:mib-view/nvsnmp:view-name"; } description "MIB View name for read access permission."; } leaf write-view-name { ext:support-filter "true"; type leafref { path "/vaccess:vaccess/nvsnmp:snmp/nvsnmp:mib-views/nvsnmp:mib-view/nvsnmp:view-name"; } description "MIB View name for write access permission."; } leaf notify-view-name { ext:support-filter "true"; type leafref { path "/vaccess:vaccess/nvsnmp:snmp/nvsnmp:mib-views/nvsnmp:mib-view/nvsnmp:view-name"; } description "MIB View name for notification access permission."; } } // list v3-group } // container v3-groups } // container snmp } } // module huawei-vaccess-snmp
© 2023 YumaWorks, Inc. All rights reserved.