huawei-nvo3-statistics

Management for data center network virtualization over Layer 3.

  • Version: 2021-08-12

    huawei-nvo3-statistics@2021-08-12


    
      module huawei-nvo3-statistics {
    
        yang-version 1;
    
        namespace
          "urn:huawei:yang:huawei-nvo3-statistics";
    
        prefix nvo3-statistics;
    
        import ietf-inet-types {
          prefix inet;
        }
        import huawei-nvo3 {
          prefix nvo3;
        }
        import huawei-ifm {
          prefix ifm;
        }
        import huawei-extension {
          prefix ext;
        }
    
        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
          "Management for data center network virtualization over Layer 3.";
    
        revision "2021-08-12" {
          description
            "Add container nvo3-tunnel-statistics, and add default config in leaves of grouping vxlan-traffic-collection.";
          reference
            "Huawei private.";
    
        }
    
        revision "2020-03-30" {
          description "Initial revision.";
          reference
            "Huawei private.";
    
        }
    
        ext:task-name "nvo3";
    
        typedef vxlan-mode {
          type enumeration {
            enum "l2" {
              value 0;
              description "Layer 2.";
            }
            enum "l3" {
              value 1;
              description "Layer 3.";
            }
            enum "both" {
              value 2;
              description "Both layer 2 and 3.";
            }
          }
          description "VXLAN mode.";
        }
    
        typedef statistics-direction {
          type enumeration {
            enum "inbound" {
              value 0;
              description "Inbound direction.";
            }
            enum "outbound" {
              value 1;
              description "Outbound direction.";
            }
            enum "bidirection" {
              value 2;
              description "Bidirection.";
            }
          }
          description
            "VXLAN tunnel traffic statistics type.";
        }
    
        grouping vxlan-traffic-collection {
          description
            "VXLAN tunnel traffic statistics collection.";
          leaf send-bits-rate {
            type uint64;
            units "bit/s";
            config false;
            description
              "Number of send bits per second.";
          }
    
          leaf send-pkts-rate {
            type uint64;
            units "pps";
            config false;
            description
              "Number of send packets per second.";
          }
    
          leaf send-unicast-pkts {
            type uint64;
            units "packet";
            config false;
            description
              "Number of send unicast packets.";
          }
    
          leaf send-multicast-pkts {
            type uint64;
            units "packet";
            config false;
            description
              "Number of send multicast packets.";
          }
    
          leaf send-broadcast-pkts {
            type uint64;
            units "packet";
            config false;
            description
              "Number of send broadcast packets.";
          }
    
          leaf send-total-bytes {
            type uint64;
            units "Byte";
            config false;
            description
              "Total number of send bytes.";
          }
    
          leaf send-total-pkts {
            type uint64;
            units "packet";
            config false;
            description
              "Total number of send packets.";
          }
    
          leaf receive-bits-rate {
            type uint64;
            units "bit/s";
            config false;
            description
              "Number of receive bits per second.";
          }
    
          leaf receive-pkts-rate {
            type uint64;
            units "pps";
            config false;
            description
              "Number of receive packets per second.";
          }
    
          leaf receive-unicast-pkts {
            type uint64;
            units "packet";
            config false;
            description
              "Number of receive unicast packets.";
          }
    
          leaf receive-multicast-pkts {
            type uint64;
            units "packet";
            config false;
            description
              "Number of receive multicast packets.";
          }
    
          leaf receive-broadcast-pkts {
            type uint64;
            units "packet";
            config false;
            description
              "Number of receive broadcast packets.";
          }
    
          leaf receive-total-bytes {
            type uint64;
            units "Byte";
            config false;
            description
              "Total number of receive bytes.";
          }
    
          leaf receive-total-pkts {
            type uint64;
            units "packet";
            config false;
            description
              "Total number of receive packets.";
          }
    
          leaf drop-unicast-pkts {
            type uint64;
            units "packet";
            config false;
            description
              "Number of discarded unicast packets.";
          }
    
          leaf drop-multicast-pkts {
            type uint64;
            units "packet";
            config false;
            description
              "Number of discarded multicast packets.";
          }
    
          leaf drop-broadcast-pkts {
            type uint64;
            units "packet";
            config false;
            description
              "Number of discarded broadcast packets.";
          }
        }  // grouping vxlan-traffic-collection
    
        rpc reset-vni-label-statistics {
          ext:node-ref "/nvo3:nvo3/nvo3:vni-labels/nvo3:vni-label/nvo3-statistics:statistics/nvo3-statistics:collections";
          description
            "Clear VXLAN tunnel traffic statistics collection for a VNI.";
          input {
            leaf vni {
              type uint32 {
                range "1..16777215";
              }
              mandatory true;
              description
                "VXLAN network identifier.";
            }
          }
        }  // rpc reset-vni-label-statistics
    
        rpc reset-vtep-statistics {
          ext:node-ref "/ifm:ifm/ifm:interfaces/ifm:interface/nvo3-statistics:nvo3-vtep-statistics/nvo3-statistics:nvo3-vtep-statistic/nvo3-statistics:collections/nvo3-statistics:collection";
          description
            "Clear VXLAN tunnel traffic statistics collection for a VTEP.";
          input {
            leaf vni {
              type uint32 {
                range "1..16777215";
              }
              mandatory true;
              description
                "VXLAN network identifier.";
            }
    
            leaf source {
              type inet:ipv4-address-no-zone;
              mandatory true;
              description
                "The srource address of VTEP.";
            }
    
            leaf peer {
              type inet:ipv4-address-no-zone;
              mandatory true;
              description "The address of VTEP.";
            }
    
            leaf mode {
              type vxlan-mode;
              mandatory true;
              description
                "The type of VXLAN tunnel traffic statistics.";
            }
    
            leaf direction {
              type statistics-direction;
              must
                "(../mode = 'l2') or (../mode = 'l3' and (../direction != 'bidirection'))";
              mandatory true;
              description
                "Traffic statistics direction.";
            }
          }
        }  // rpc reset-vtep-statistics
    
        rpc reset-ipv6-vtep-statistics {
          ext:node-ref "/ifm:ifm/ifm:interfaces/ifm:interface/nvo3-statistics:nvo3-ipv6-vtep-statistics/nvo3-statistics:nvo3-ipv6-vtep-statistic/nvo3-statistics:collections/nvo3-statistics:collection";
          description
            "Clear VXLAN6 tunnel traffic statistics collection for a VTEP.";
          input {
            leaf vni {
              type uint32 {
                range "1..16777215";
              }
              mandatory true;
              description
                "VXLAN6 network identifier.";
            }
    
            leaf source {
              type inet:ipv6-address-no-zone;
              mandatory true;
              description
                "The srource address of VTEP.";
            }
    
            leaf peer {
              type inet:ipv6-address-no-zone;
              mandatory true;
              description
                "The peer address of VTEP.";
            }
    
            leaf mode {
              type vxlan-mode;
              mandatory true;
              description
                "The type of VXLAN6 tunnel traffic statistics.";
            }
    
            leaf direction {
              type statistics-direction;
              must
                "(../mode = 'l2') or (../mode = 'l3' and (../direction != 'bidirection'))";
              mandatory true;
              description
                "Traffic statistics direction.";
            }
          }
        }  // rpc reset-ipv6-vtep-statistics
    
        augment /ifm:ifm/ifm:interfaces/ifm:interface {
          description
            "The NVO3 statistics for interface.";
          container nvo3-vtep-statistics {
            when "../ifm:type='Nve'";
            description
              "List of VXLAN tunnel statistics.";
            list nvo3-vtep-statistic {
              key "vni peer mode direction";
              description
                "Configure VTEP statistics collection.";
              leaf vni {
                type uint32 {
                  range "0..16777215";
                }
                must
                  "(../vni = 0 and ../mode = 'l3' and ../direction = 'outbound' and not(../../nvo3-statistics:nvo3-vtep-statistic[nvo3-statistics:vni != 0][nvo3-statistics:peer = current()/../peer][nvo3-statistics:mode = current()/../mode][nvo3-statistics:direction = current()/../direction])) or (../vni != 0)";
                description
                  "VXLAN network identifier.";
              }
    
              leaf peer {
                type inet:ipv4-address-no-zone;
                description
                  "The peer address of VTEP.";
              }
    
              leaf mode {
                type vxlan-mode;
                must
                  "(../mode = 'l2' and not((../../nvo3-statistics:nvo3-vtep-statistic[nvo3-statistics:vni = current()/../vni][nvo3-statistics:peer = current()/../peer][nvo3-statistics:direction = 'inbound'] or ../../nvo3-statistics:nvo3-vtep-statistic[nvo3-statistics:vni = current()/../vni][nvo3-statistics:peer = current()/../peer][nvo3-statistics:direction = 'outbound']) and ../../nvo3-statistics:nvo3-vtep-statistic[nvo3-statistics:vni = current()/../vni][nvo3-statistics:peer = current()/../peer][nvo3-statistics:direction = 'bidirection'])) or (../mode != 'l2')";
                description
                  "The type of VXLAN tunnel traffic statistics.";
              }
    
              leaf direction {
                type statistics-direction;
                must
                  "(../mode = 'l2') or (../mode = 'l3' and (../direction != 'bidirection'))";
                description
                  "Traffic statistics direction.";
              }
    
              container collections {
                config false;
                description
                  "List of Traffic statistics collection.";
                list collection {
                  key "source-addr";
                  description
                    "Statistics of VXLAN tunnel traffic collection.";
                  leaf source-addr {
                    type inet:ipv4-address-no-zone;
                    description
                      "The address of VTEP.";
                  }
    
                  uses vxlan-traffic-collection;
                }  // list collection
              }  // container collections
            }  // list nvo3-vtep-statistic
          }  // container nvo3-vtep-statistics
    
          container nvo3-ipv6-vtep-statistics {
            when "../ifm:type='Nve'";
            description
              "List of VXLAN6 tunnel statistics.";
            list nvo3-ipv6-vtep-statistic {
              key "vni peer mode direction";
              description
                "Configure VTEP statistics collection.";
              leaf vni {
                type uint32 {
                  range "0..16777215";
                }
                must
                  "(../vni = 0 and ../mode = 'l3' and ../direction = 'outbound' and not(../../nvo3-statistics:nvo3-ipv6-vtep-statistic[nvo3-statistics:vni != 0][nvo3-statistics:peer = current()/../peer][nvo3-statistics:mode = current()/../mode][nvo3-statistics:direction = current()/../direction])) or (../vni != 0)";
                description
                  "VXLAN network identifier.";
              }
    
              leaf peer {
                type inet:ipv6-address-no-zone;
                description
                  "The IPv6 peer address of VTEP.";
              }
    
              leaf mode {
                type vxlan-mode;
                must
                  "(../mode = 'l2' and not((../../nvo3-statistics:nvo3-ipv6-vtep-statistic[nvo3-statistics:vni = current()/../vni][nvo3-statistics:peer = current()/../peer][nvo3-statistics:direction = 'inbound'] or ../../nvo3-statistics:nvo3-ipv6-vtep-statistic[nvo3-statistics:vni = current()/../vni][nvo3-statistics:peer = current()/../peer][nvo3-statistics:direction = 'outbound']) and ../../nvo3-statistics:nvo3-ipv6-vtep-statistic[nvo3-statistics:vni = current()/../vni][nvo3-statistics:peer = current()/../peer][nvo3-statistics:direction = 'bidirection'])) or (../mode != 'l2')";
                description
                  "The type of VXLAN6 tunnel traffic statistics.";
              }
    
              leaf direction {
                type statistics-direction;
                must
                  "(../mode = 'l2') or (../mode = 'l3' and (../direction != 'bidirection'))";
                description
                  "Traffic statistics direction.";
              }
    
              container collections {
                config false;
                description
                  "List of traffic statistics collection.";
                list collection {
                  key "source-addr";
                  description
                    "Statistics of VXLAN6 tunnel traffic collection.";
                  leaf source-addr {
                    type inet:ipv6-address-no-zone;
                    description
                      "The IPv6 address of VTEP.";
                  }
    
                  uses vxlan-traffic-collection;
                }  // list collection
              }  // container collections
            }  // list nvo3-ipv6-vtep-statistic
          }  // container nvo3-ipv6-vtep-statistics
    
          container nvo3-tunnel-statistics {
            when "../ifm:type='Nve'";
            description
              "List of VXLAN tunnel statistics.";
            list nvo3-tunnel-statistic {
              key "vni source peer";
              description
                "Configure tuennel statistics collection.";
              leaf vni {
                type uint32 {
                  range "0..16777215";
                }
                description
                  "VXLAN network identifier.";
              }
    
              leaf source {
                type inet:ipv4-address-no-zone;
                description
                  "The source address of VTEP.";
              }
    
              leaf peer {
                type inet:ipv4-address-no-zone;
                description
                  "The peer address of VTEP.";
              }
    
              uses vxlan-traffic-collection;
            }  // list nvo3-tunnel-statistic
          }  // container nvo3-tunnel-statistics
        }
    
        augment /nvo3:nvo3/nvo3:vni-labels/nvo3:vni-label {
          description
            "The NVO3 traffic statistics of vni.";
          container statistics {
            description
              "Configure VNI traffic statistics.";
            leaf enable {
              type boolean;
              default "false";
              description
                "Enable/disable VNI traffic statistics.";
            }
    
            container collections {
              when "../enable='true'";
              config false;
              description
                "Statistics of VNI traffic statistics collection.";
              uses vxlan-traffic-collection;
            }  // container collections
          }  // container statistics
        }
      }  // module huawei-nvo3-statistics
    

© 2023 YumaWorks, Inc. All rights reserved.