Configuration management module.
Version: 2021-04-26
module huawei-devm-vnf { yang-version 1; namespace "urn:huawei:yang:huawei-devm-vnf"; prefix devm-vnf; import huawei-extension { prefix ext; } import huawei-pub-type { prefix pub-type; } import ietf-inet-types { prefix inet; } 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 "Configuration management module."; revision "2021-04-26" { description "Add container vms."; reference "Huawei private."; } revision "2020-04-10" { description "Modify description warnings."; reference "Huawei private."; } revision "2019-07-01" { description "Initial revision."; reference "Huawei private."; } ext:task-name "device-mgr"; typedef run-state-type { type enumeration { enum "abnormal" { value 0; description "Abnormal."; } enum "normal" { value 1; description "Normal."; } enum "isolated" { value 2; description "Isolated."; } enum "notinstall" { value 3; description "Not install."; } enum "wrongtype" { value 4; description "Wrong type."; } enum "active" { value 5; description "Active."; } enum "inactive" { value 6; description "Inactive."; } enum "offline" { value 7; description "Offline."; } enum "stop" { value 8; description "Stop."; } } description "Run state."; } typedef resource-type { type enumeration { enum "vm" { value 0; description "Virtual machine."; } } description "Resource source type."; } typedef standby-state-type { type enumeration { enum "not-supported" { value 0; description "No standby state."; } enum "master" { value 1; description "Master board."; } enum "slave" { value 2; description "Slave board."; } } description "Board standby state."; } typedef board-role-type { type enumeration { enum "unknown" { value 0; description "Unknown."; } enum "mmb" { value 1; description "MMB."; } enum "mb" { value 4; description "MB."; } enum "lc" { value 5; description "LC."; } enum "other" { value 200; description "OTHER."; } enum "na" { value 255; description "NA."; } } description "Board role."; } typedef network-plane-type { type enumeration { enum "BASE" { value 0; description "Basic service interface."; } enum "INNERMNG" { value 1; description "Internal management interface."; } enum "OUTERMNG" { value 2; description "External management interface."; } enum "OUTERLINK" { value 3; description "External connection interface."; } enum "INTRASERV" { value 4; description "Fabric plane sub-interface."; } enum "INNERPAE" { value 5; description "Inter-PAE communication interface."; } enum "OUTERLINUX" { value 6; description "External linux interface."; } enum "NLSOUTERMNG" { value 7; description "VNFC external management interface."; } enum "INNERSLE" { value 8; description "Master/Slave arbitration extension interface."; } enum "INNERDIRECTLOGIC" { value 9; description "Forwarding topology logical interface."; } enum "INNERCHAINLOGIC" { value 10; description "Forwarding integration logical interface."; } enum "INNERLOGICSERV" { value 11; description "Internal logic service interface."; } enum "EXTBASE" { value 12; description "Second basic service interface."; } enum "EXTINNERLOGICSERV" { value 13; description "Second internal logic service interface."; } enum "INNERCTRL" { value 14; description "Internal control interface."; } enum "TUNNEL" { value 15; description "Internal data plane socket communication interface."; } } description "Network plane type."; } typedef port-state-type { type enumeration { enum "DOWN" { value 0; description "The virtual interface is Down."; } enum "UP" { value 1; description "The virtual interface is Up."; } enum "ADMINDOWN" { value 2; description "The virtual interface is administratively Down."; } } description "Port state type."; } container devm-vnf { description "Virtualized network function (VNF) infomation."; container vnf-boards { description "List of virtualized network function (VNF) board."; list vnf-board { key "vnfc-name id"; description "Configure virtualized network function (VNF) board."; leaf vnfc-name { type string { length "1..31"; } description "Virtualized network function component (VNFC) name."; } leaf id { type uint32; description "Board ID."; } leaf type-name { ext:operation-exclude "update"; type string { length "1..63"; } mandatory true; description "Type name."; } leaf name { type string { length "1..63"; } config false; description "Board name."; } leaf run-state { type run-state-type; config false; description "Running status."; } leaf resource-type { type resource-type; config false; description "Resource Type."; } leaf resource-name { type string { length "1..63"; } config false; description "Name of a resource source."; } leaf standby-state { type standby-state-type; config false; description "Standby state of a VNF board."; } leaf role { type board-role-type; config false; description "MPU role."; } leaf up-time { type pub-type:time-tick; config false; description "Running period."; } leaf physical-index { type uint32; config false; description "Entity index."; } container cpudefend { description "Configure policies for global management and service plane protection."; leaf policy-id { type leafref { path "/cpudefend:cpudefend/cpudefend:policys/cpudefend:policy/cpudefend:id"; } description "Specifies the id of the attack defense policy to be applied."; } } // container cpudefend container cpudefend-devm { description "Configure policies for global management and service plane protection."; container ignore-hostcar-acl { description "Configure HOST CAR and VLAN-HOST-CAR not to apply to packets matching a specified ACL rule."; choice ipv4-acl-type { description "IPv4 ACL number or name. An ACL number ranges from 3000 to 3999. An ACL name is a string of 1 to 64 characters, which begins with a-z or A-Z. IPv4 ACL dentity is a number or number must exist, otherwise it does not support delivery."; case by-identity { description "IPv4 ACL identity."; leaf ipv4-acl { type leafref { path "/acl:acl/acl:groups/acl:group/acl:identity"; } must "/acl:acl/acl:groups/acl:group[acl:identity=current()]/acl:type='advance'"; description "IPv4 ACL identity."; } } // case by-identity case by-number { description "IPv4 ACL number."; leaf ipv4-acl-number { type leafref { path "/acl:acl/acl:groups/acl:group/acl:number"; } must "/acl:acl/acl:groups/acl:group[acl:number=current()]/acl:type='advance'"; description "IPv4 ACL number."; } } // case by-number } // choice ipv4-acl-type leaf ipv6-acl { type leafref { path "/acl:acl/acl:group6s/acl:group6/acl:identity"; } must "/acl:acl/acl:group6s/acl:group6[acl:identity=current()]/acl:type='advance'"; description "IPv6 ACL number or name. An ACL number ranges from 3000 to 3999. An ACL name is a string of 1 to 64 characters, which begins with a-z or A-Z."; } } // container ignore-hostcar-acl container bras-host-cars { description "List of HOST-CAR is used to perform rate limit for packets that the user side sends to the CPU."; list bras-host-car { ext:generated-by "system"; ext:operation-exclude "create"; key "type"; description "Configure HOST-CAR parameters."; leaf type { type host-car-type; description "HOST-CAR type, such as HOST-CAR, HTTP-HOST-CAR, VLAN-HOST-CAR."; } container rate-limit { must "./pir>=./cir"; description "Configure the bandwidth limit for HOST-CAR."; leaf cir { ext:dynamic-default { ext:default-value "32" { when "../../type = 'host-car'"; description "The default value is 32 when type is HOST-CAR."; } ext:default-value "128" { when "../../type = 'http-host-car'"; description "The default value is 128 when type is HTTP-HOST-CAR."; } ext:default-value "5120" { when "../../type = 'vlan-host-car'"; description "The default value is 5120 when type is VLAN-HOST-CAR."; } } type uint32 { range "0..4294967295"; } units "kbit/s"; must "(../../type='vlan-host-car' and ../cir>=8 and ../cir<=4294967295) or (../../type!='vlan-host-car')"; description "Committed information rate. The default value in the CU scene is expanded by 5 times."; } leaf cbs { ext:dynamic-default { ext:default-value "32000" { when "../../type = 'host-car'"; description "The default value is 32000 when type is HOST-CAR."; } ext:default-value "128000" { when "../../type = 'http-host-car'"; description "The default value is 128000 when type is HTTP-HOST-CAR."; } ext:default-value "2560000" { when "../../type = 'vlan-host-car'"; description "The default value is 2560000 when type is VLAN-HOST-CAR."; } } type uint32 { range "1000..4294967295"; } units "Byte"; must "(../../type='vlan-host-car' and ../cbs>=10000 and ../cbs<=4294967295) or (../../type!='vlan-host-car')"; description "Committed burst size. The default value in the CU scene is expanded by 5 times."; } leaf pir { ext:dynamic-default { ext:default-value "32" { when "../../type = 'host-car'"; description "The default value is 32 when type is HOST-CAR."; } ext:default-value "128" { when "../../type = 'http-host-car'"; description "The default value is 128 when type is HTTP-HOST-CAR."; } ext:default-value "5120" { when "../../type = 'vlan-host-car'"; description "The default value is 5120 when type is VLAN-HOST-CAR."; } } type uint32 { range "0..4294967295"; } units "kbit/s"; description "Peak information rate. The default value in the CU scene is expanded by 5 times."; } leaf pbs { ext:dynamic-default { ext:default-value "32000" { when "../../type = 'host-car'"; description "The default value is 32000 when type is HOST-CAR."; } ext:default-value "128000" { when "../../type = 'http-host-car'"; description "The default value is 128000 when type is HTTP-HOST-CAR."; } ext:default-value "2560000" { when "../../type = 'vlan-host-car'"; description "The default value is 2560000 when type is VLAN-HOST-CAR."; } } type uint32 { range "0..4294967295"; } units "Byte"; description "Peak burst size. The default value in the CU scene is expanded by 5 times."; } leaf auto-adjust-enable { ext:dynamic-default { ext:default-value "true" { when "../../type = 'host-car'"; description "The default value is true when type is HOST-CAR."; } ext:default-value "true" { when "../../type = 'http-host-car'"; description "The default value is true when type is HTTP-HOST-CAR."; } ext:default-value "false" { when "../../type = 'vlan-host-car'"; description "The default value is false when type is VLAN-HOST-CAR."; } } type boolean; description "Enable/disable the device to automatically adjust HOST-CAR bandwidth."; } } // container rate-limit container logging { description "Configure a device to generate a log when the number of bytes discarded by HOST-CAR within a specified period reaches the specified threshold."; leaf interval { type uint32 { range "1..4294967295"; } units "min"; default "5"; description "The interval at which a device counts the number of bytes discarded by HOST-CAR."; } leaf discard-threshold { type uint32 { range "1..4294967295"; } units "Byte"; default "30000"; description "The number of bytes discarded by HOST-CAR."; } } // container logging container attack-detect { description "Configure the attack detection parameters of the HOST-CAR."; leaf drop-rate-threshold { type uint32 { range "1..400"; } units "pps"; default "1"; description "The attack detection threshold for the rate at which packets are dropped by HOST-CAR."; } } // container attack-detect } // list bras-host-car } // container bras-host-cars container spu-cars { description "List of configure CAR for packets on a service board."; list spu-car { key "car-type"; description "Configure CAR for packets on a service board."; leaf car-type { type spu-car-type; description "CAR type."; } leaf cir { ext:dynamic-default; type uint32 { range "0..10000"; } units "pps"; description "CIR."; } leaf cbs { ext:dynamic-default; type uint32 { range "0..30000"; } units "packet"; description "CBS."; } } // list spu-car } // container spu-cars container arp-vlan-car { description "Configure the rate limit of ARP VLAN CAR for ARP packets on an interface."; leaf alarm-drop-rate { type boolean; default "true"; description "Enable/disable the alarm function for ARP VLAN CAR. By default, the alarm function is enabled for ARP VLAN CAR."; } container level-2-car { description "Configure the level-2 CAR for ARP VLAN CAR."; leaf rate-limit-percent { type uint32 { range "0..100"; } units "%"; default "80"; description "The percentage of the bandwidth of level-2 CAR for ARP VLAN CAR in the bandwidth of CP-CAR for ARP protocol packets. The default value is 80. The value 0 indicates no restriction on the bandwidth."; } } // container level-2-car } // container arp-vlan-car container nd-vlan-car { description "Configure the rate limit of ND VLAN CAR for ND packets on an interface."; container nd-attack-alarms { description "List of the alarm function for ND VLAN CAR."; list nd-attack-alarm { ext:generated-by "system"; ext:operation-exclude "create"; key "type"; description "Configure the alarm function for ND VLAN CAR."; leaf type { type nd-protocol-type; description "ND protocol type."; } leaf alarm-enable { type boolean; default "true"; description "Enable/disable the alarm function for ND VLAN CAR. By default, the alarm function is enabled for ND VLAN CAR."; } } // list nd-attack-alarm } // container nd-attack-alarms container level-2-cars { description "List of the level-2 CAR for ND VLAN CAR."; list level-2-car { ext:generated-by "system"; ext:operation-exclude "create"; key "type"; description "Configure the level-2 CAR for ND VLAN CAR."; leaf type { type nd-protocol-type; description "ND protocol type."; } leaf rate-limit-percent { type uint32 { range "0..100"; } units "%"; default "80"; description "The percentage of the bandwidth of level-2 CAR for ND VLAN CAR in the bandwidth of CP-CAR for ND protocol packets. The value 0 indicates no restriction on the bandwidth."; } } // list level-2-car } // container level-2-cars } // container nd-vlan-car } // container cpudefend-devm container loadbalance { description "Configure load balance."; container hash-arithmetic { description "Configure FE1 hash arithmetic on a specified board."; leaf arithmetic { type cx-hash-arithmetic; default "random"; description "Set hash algorithm."; } leaf second-hash-flag { type boolean; default "false"; description "Enable/disable second hash."; } } // container hash-arithmetic container hash-fields { description "List of FE1 hash fields configuration on a specified board."; list hash-field { ext:generated-by "system" { description "The all instances are generated automatically."; } ext:operation-exclude "create" { description "The all instances cannot be created."; } key "trunk-ecmp"; description "Configure hash mode, that is, the box attribute, indicating which load balancing mode is applicable to the box."; leaf trunk-ecmp { type cx-trunk-ecmp; description "Hash mode."; } leaf material { ext:dynamic-default { ext:default-value "l4" { when "../trunk-ecmp='ip'"; description "The default value is l4 when trunk-ecmp is IP or MAC or VLL."; } ext:default-value "undo-disable" { when "../trunk-ecmp='tunnel-info' or ../trunk-ecmp='gtp'"; description "The default value is enable when trunk-ecmp is tunnel-info or GTP."; } } ext:support-filter "true"; type cx-hash-material; must "(../trunk-ecmp='ip' and (../material='l2' or ../material='l3' or ../material='l4') ) or ( (../trunk-ecmp='tunnel-info' or ../trunk-ecmp='gtp') and (../material='undo-disable' or ../material='disable') )"; description "Set hash material."; } } // list hash-field } // container hash-fields container hash-seed { presence "FE1 hash seed configuration on a specified board."; description "Enable/disable FE1 hash seed on a specified board."; leaf random-flag { type boolean; default "false"; description "Enable/disable random flag."; } leaf custom-seed { type pub-type:hex-binary; must "../custom-seed='0x0' or ../random-flag='false'"; default "0x0"; description "User-defined hash seed random number."; } } // container hash-seed } // container loadbalance container cp-cpu-defend { description "Configure CP cpu defend."; container vm-total-car { description "Configure Vm total car."; leaf cir { type uint32 { range "0..1000000"; } units "kbit/s"; default "58491"; description "Committed information rate."; } leaf cbs { type uint32 { range "0..90000000"; } units "Byte"; default "9000000"; description "Committed burst size."; } } // container vm-total-car } // container cp-cpu-defend container pbr { description "Configure To filter default route or black hole route when using redirect."; container routing-filters { description "List of to filter default route or black hole route when using redirect."; list routing-filter { key "type"; max-elements 2; description "Configure action of redirecting to public-network."; leaf type { type ip-type; description "Protocol family."; } leaf routing-type { type routing-filter-type; mandatory true; description "Routing type."; } } // list routing-filter } // container routing-filters } // container pbr container soc { description "Configure policies for global management and service plane protection."; container l2-loop-detect { description "Configure layer 2 loop detection."; container slot-l2loopdet { description "Configure layer 2 loop detection."; leaf enable { type boolean; default "true"; description "Enable/disable layer 2 loop detection."; } leaf packets-drop-threshold { type uint32 { range "1..65535000"; } description "Detect threshold."; } } // container slot-l2loopdet container action { description "Configure the CPU in response to layer 2 loops after the system detects an existing or a potential loop on an interface, after layer 2 loop detection is enabled."; container shutdown { presence "The initial interval between when the interface shuts down and when it goes to the Up state."; description "Enable/disable shut down the interface after detecting an existing layer 2 loop on the interface."; leaf up-times { type uint16 { range "1..10"; } default "5"; description "The maximum number of consecutive times that the system allows the Down interface to go Up in an interval."; } leaf up-interval { type uint16 { range "1..10"; } units "min"; default "5"; description "The initial interval between when the interface shuts down and when it goes to the Up state."; } } // container shutdown container trap { description "Configure a trap after detecting an existing or a potential layer 2 loop."; leaf enable { type boolean; default "true"; description "Enable/disable the system from sending a trap after the system detects a layer 2 loop."; } } // container trap } // container action container loop-level-thresholds { description "List of configure the loop level threshold on a detected main interface or sub-interface."; list loop-level-threshold { ext:generated-by "system"; ext:operation-exclude "create"; must "((./determined>./suspect) and (./suspect>./notification))"; key "interface-type"; description "Configure the loop level threshold on a detected main interface or sub-interface."; leaf interface-type { type interface-type; description "Interface type, main interface or sub-interface."; } leaf determined { ext:dynamic-default { ext:default-value "3000" { when "../interface-type = 'main-interface'"; description "The default value is 3000 when interface-type is main-interface."; } ext:default-value "300" { when "../interface-type = 'sub-interface'"; description "The default value is 300 when interface-type is sub-interface."; } } type uint32 { range "3..6000"; } units "packet"; description "The determined loop threshold."; } leaf suspect { ext:dynamic-default { ext:default-value "2000" { when "../interface-type = 'main-interface'"; description "The default value is 2000 when interface-type is main-interface."; } ext:default-value "200" { when "../interface-type = 'sub-interface'"; description "The default value is 200 when interface-type is sub-interface."; } } type uint32 { range "2..5999"; } units "packet"; description "The suspect loop threshold."; } leaf notification { ext:dynamic-default { ext:default-value "1000" { when "../interface-type = 'main-interface'"; description "The default value is 1000 when interface-type is main-interface."; } ext:default-value "100" { when "../interface-type = 'sub-interface'"; description "The default value is 100 when interface-type is sub-interface."; } } type uint32 { range "1..5998"; } units "packet"; description "The notification loop threshold."; } } // list loop-level-threshold } // container loop-level-thresholds } // container l2-loop-detect } // container soc container unicast-forward { description "Configure unicast forward."; container ipv4-uc { description "Configure slot unicast forwarding."; leaf force-frag { type boolean; default "false"; description "Enable/disable slot IPv4 force fragment."; } leaf icmp-reply-fast { type boolean; default "true"; description "Enable/disable slot ICMP replay fast."; } } // container ipv4-uc container arp-fast-reply { description "Configure slot ARP reply."; leaf enable { type boolean; default "true"; description "Enable/disable slot ARP reply fast."; } } // container arp-fast-reply container gre-ttl-mode { description "Configure slot GRE TTL mode."; leaf ttl-mode { type ttl-mode-type; default "pipe"; description "Set GRE tunnel-encapsulated mode."; } } // container gre-ttl-mode } // container unicast-forward container qos { description "Configure QoS application."; container traffic-policy-matchs { description "List of traffic policy match."; list traffic-policy-match { key "type"; max-elements 3; description "Configure traffic policy match. Some boards do not support this object."; leaf type { type policy-match-type; description "Traffic policy match type."; } } // list traffic-policy-match } // container traffic-policy-matchs container traffic-policy-match-type { description "Configure policy UCL rule match."; container destination-user { presence "create destination-user"; description "Enable/disable traffic policy match type destination user."; } // container destination-user container interface-acl { presence "create interface-acl"; description "Enable/disable traffic policy match type interface acl."; } // container interface-acl } // container traffic-policy-match-type } // container qos container l2tp { description "Configure l2tp to the vnf-board."; container icrq-limit { description "Configure icrq limit."; leaf set-value { type uint32 { range "1..60000"; } description "Limit value."; } } // container icrq-limit } // container l2tp } // list vnf-board } // container vnf-boards container vms { config false; description "List of virtual machines."; list vm { key "name"; description "Operational state of virtual machine."; leaf name { type string { length "1..63"; } description "Virtual machine name."; } leaf logic-id { type uint32 { range "1..65535"; } description "Logical virtual machine ID."; } leaf id { type string { length "1..63"; } description "Virtual machine ID."; } leaf phy-id { type string { length "1..63"; } default "0"; description "Physical virtual machine ID."; } leaf type-name { type string { length "1..63"; } description "Virtual machine type name."; } leaf run-state { type run-state-type; description "Virtual machine running state."; } leaf memory-size { type uint32 { range "0..4294967295"; } units "MB"; description "Memory size."; } leaf storage-size { type uint32 { range "0..4294967295"; } units "GB"; description "Storage size."; } leaf cpu-number { type uint32 { range "1..31"; } default "1"; description "Virtual machine CPU number."; } leaf memory-usage { type uint32 { range "0..100"; } units "%"; description "Memory usage."; } leaf cpu-usage { type uint32 { range "0..100"; } units "%"; default "1"; description "CPU usage."; } leaf storage-usage { type uint32 { range "0..100"; } units "%"; description "Storage usage."; } leaf up-time { type uint32 { range "0..4294967295"; } units "s"; description "Virtual machine up time."; } container veth-ports { config false; description "List of virtual ethernet ports."; list veth-port { key "name"; description "Operational state of virtual ethernet port."; leaf name { type string { length "1..63"; } description "Virtual port name."; } leaf id { type uint32 { range "0..4294967295"; } description "Virtual port ID."; } leaf is-bind-pae { type boolean; description "Whether the PAE is bound."; } leaf is-external { type boolean; description "Whether the port is an external port."; } leaf network-plane { type network-plane-type; description "Network plane type."; } leaf netmac { type pub-type:mac-address; default "0000-0000-0000"; description "MAC address."; } leaf netmask { type inet:ipv4-address-no-zone; default "0.0.0.0"; description "Network mask."; } leaf netip { type inet:ipv4-address-no-zone; description "IP address."; } leaf run-state { type port-state-type; description "Port running state."; } } // list veth-port } // container veth-ports } // list vm } // container vms } // container devm-vnf } // module huawei-devm-vnf
© 2023 YumaWorks, Inc. All rights reserved.