huawei-ifit-statistics

IFIT statistics.

  • Version: 2021-09-13

    huawei-ifit-statistics@2021-09-13


    
      module huawei-ifit-statistics {
    
        yang-version 1;
    
        namespace
          "urn:huawei:yang:huawei-ifit-statistics";
    
        prefix ifit-statistics;
    
        import huawei-ifit {
          prefix ifit;
        }
        import huawei-pub-type {
          prefix pub-type;
        }
        import ietf-inet-types {
          prefix inet;
        }
        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 "IFIT statistics.";
    
        revision "2021-09-13" {
          description
            "Add new leafs of to-cp and discard statistics.";
          reference
            "Huawei private.";
    
        }
    
        revision "2021-07-14" {
          description
            "Add new container:ifit-native-ip-statistics.";
          reference
            "Huawei private.";
    
        }
    
        revision "2021-04-19" {
          description "Added Type map-flag.";
          reference
            "Huawei private.";
    
        }
    
        revision "2021-03-25" {
          description
            "Modify leaf length, the leaf name is tunnel-if-index.";
          reference
            "Huawei private.";
    
        }
    
        revision "2021-02-25" {
          description
            "Add new leafs of gtp measurement.";
          reference
            "Huawei private.";
    
        }
    
        revision "2020-08-28" {
          description
            "Add new container:flow-vpws-statistics.";
          reference
            "Huawei private.";
    
        }
    
        revision "2020-08-10" {
          description "Add new leaf:evpl-id.";
          reference
            "Huawei private.";
    
        }
    
        revision "2020-07-25" {
          description
            "Modify description: add new leafs of perpacket delay.";
          reference
            "Huawei private.";
    
        }
    
        revision "2020-03-05" {
          description "Modify description.";
          reference
            "Huawei private.";
    
        }
    
        revision "2019-12-28" {
          description "Add new leaf: if-index.";
          reference
            "Huawei private.";
    
        }
    
        revision "2019-10-12" {
          description
            "Add new containers: flow-peer-ip-statistics and flow-locator-statistics.";
          reference
            "Huawei private.";
    
        }
    
        revision "2019-05-17" {
          description "Init revision.";
          reference
            "Huawei private.";
    
        }
    
        ext:task-name "ifit";
    
        typedef address-family {
          type enumeration {
            enum "ipv4" {
              value 0;
              description "IPv4 address family.";
            }
            enum "ipv6" {
              value 1;
              description "IPv6 address family.";
            }
          }
          description
            "The type of IP address family.";
        }
    
        typedef vpn-type {
          type enumeration {
            enum "vpn" {
              value 0;
              description "L3VPN or L3EVPN.";
            }
            enum "evpn-vpws" {
              value 1;
              description "EVPN VPWS.";
            }
            enum "vpnv4" {
              value 2;
              description "L3VPNv4 or L3EVPNv4.";
            }
            enum "vpnv6" {
              value 3;
              description "L3VPNv6 or L3EVPNv6.";
            }
          }
          description "Type of VPN.";
        }
    
        typedef flow-direction {
          type enumeration {
            enum "ingress" {
              value 1;
              description
                "Ingress of an IFIT flow.";
            }
            enum "transit-input" {
              value 2;
              description
                "TransitInput of an IFIT flow.";
            }
            enum "transit-output" {
              value 3;
              description
                "TransitOutput of an IFIT flow.";
            }
            enum "egress" {
              value 4;
              description
                "Egress of an IFIT flow.";
            }
            enum "egress-to-cpu" {
              value 5;
              description
                "Egress to cpu of an IFIT flow.";
            }
            enum "egress-normal-drop" {
              value 6;
              description
                "Egress normal drop of an IFIT flow.";
            }
          }
          description
            "Direction of an IFIT flow.";
        }
    
        typedef ifit-gtp-mode {
          type enumeration {
            enum "disabled" {
              value 0;
              description
                "The IFIT GTP measurement is disabled.";
            }
            enum "enable" {
              value 1;
              description
                "The IFIT GTP measurement is enabled.";
            }
            enum "sn-enable" {
              value 2;
              description
                "The IFIT GTPU-SN measurement is enabled.";
            }
          }
          description
            "Mode of the IFIT GTP measurement.";
        }
    
        typedef map-flag {
          type enumeration {
            enum "disabled" {
              value 0;
              description
                "The IFIT port mapping is disabled.";
            }
            enum "ingress-enable" {
              value 1;
              description
                "The IFIT ingress port mapping is enabled.";
            }
            enum "egress-enable" {
              value 2;
              description
                "The IFIT egress port mapping is enabled.";
            }
            enum "ingress-egress-enable" {
              value 3;
              description
                "The IFIT ingress and egress port mapping is enabled.";
            }
          }
          description
            "Mapping Flag of an IFIT flow.";
        }
    
        typedef app-name {
          type string {
            length "0..256";
          }
          description "App-name is like string.";
        }
    
        typedef role-type {
          type enumeration {
            enum "in-point" {
              value 1;
              description
                "In point of an IFIT flow.";
            }
            enum "mid-input" {
              value 2;
              description
                "Middle point of an IFIT flow.";
            }
            enum "out-point" {
              value 3;
              description
                "Out point of an IFIT flow.";
            }
          }
          description
            "The role type of an IFIT statistic data.";
        }
    
        grouping statistics-data {
          description
            "The result data of IFIT statistics.";
          leaf period-id {
            type uint64;
            description
              "Index of the statistics collection period of IFIT flows.";
          }
    
          leaf packet-count {
            type uint64;
            description
              "Number of packets transmitted within this period.";
          }
    
          leaf byte-count {
            type uint64;
            description
              "Number of bytes transmitted within this period.";
          }
    
          leaf timestamp-second {
            type uint32;
            description
              "Integer part of the number of seconds starting at 00:00:00 UTC on January 1, 1970.";
          }
    
          leaf timestamp-nanosecond {
            type uint32;
            description
              "Decimal part of the number of seconds starting at 00:00:00 UTC on January 1, 1970.";
          }
        }  // grouping statistics-data
    
        grouping ip-flow-header {
          description
            "Common header for ip flow.";
          leaf source-ip {
            type inet:ip-address-no-zone;
            description "Source IP address.";
          }
    
          leaf source-ip-mask-length {
            type uint8;
            description
              "The length of source IP address mask.";
          }
    
          leaf destination-ip {
            type inet:ip-address-no-zone;
            description
              "Destination IP address.";
          }
    
          leaf destination-ip-mask-length {
            type uint8;
            description
              "The length of destination IP address mask.";
          }
    
          leaf source-port {
            type uint16;
            description "Source port number.";
          }
    
          leaf destination-port {
            type uint16;
            description
              "Destination port number.";
          }
    
          leaf protocol {
            type uint8;
            description "Protocol number.";
          }
    
          leaf if-name {
            type pub-type:if-name;
            description "Interface name.";
          }
    
          leaf direction {
            type flow-direction;
            description
              "Direction of an IFIT flow.";
          }
    
          leaf flow-id {
            type uint64;
            description
              "Flow id of an ifit flow.";
          }
    
          leaf interval {
            type uint32;
            units "s";
            description
              "Interval of an IFIT flow.";
          }
        }  // grouping ip-flow-header
    
        grouping flow-statistics-data {
          description
            "Common header for statistics fields.";
          leaf period-id {
            type uint64;
            description
              "Index of the statistics collection period of IFIT flow.";
          }
    
          leaf packet-count {
            type uint64;
            description
              "Number of packets transmitted within this period.";
          }
    
          leaf byte-count {
            type uint64;
            description
              "Number of bytes transmitted within this period.";
          }
    
          leaf time-seconds {
            type uint32;
            units "s";
            description
              "The number of seconds starting at 00:00:00 UTC on January 1, 1970.";
          }
    
          leaf time-nanoseconds {
            type uint32;
            units "ns";
            description
              "The number of nano-seconds beyond the time-seconds.";
          }
        }  // grouping flow-statistics-data
    
        grouping app-data {
          description
            "Common header for application identification.";
          leaf app-id {
            type uint32;
            description "The id of application.";
          }
    
          leaf app-name {
            type app-name;
            description
              "The name of application.";
          }
        }  // grouping app-data
    
        grouping discarded-packet-data {
          description
            "Common header for discarded packet statistics.";
          leaf discarded-packet-count {
            type uint64;
            description
              "The discarded packets within this period.";
          }
    
          leaf discarded-byte-count {
            type uint64;
            description
              "The discarded bytes within this period.";
          }
    
          leaf discard-reason {
            type uint32;
            description
              "The last discard reason within this period.";
          }
        }  // grouping discarded-packet-data
    
        grouping delay-data {
          description
            "Common header for delay data.";
          leaf measure-mode {
            type uint8;
            description
              "Direction of an IFIT flow.";
          }
    
          leaf max-delay {
            type uint64;
            description
              "The max delay of IFIT flow.";
          }
    
          leaf min-delay {
            type uint64;
            description
              "The min delay of IFIT flow.";
          }
    
          leaf total-delay {
            type uint64;
            description
              "The total delay of IFIT flow.";
          }
        }  // grouping delay-data
    
        augment /ifit:ifit {
          description "IFIT augment.";
          container flow-statistics {
            config false;
            description
              "List of IFIT flow statistics.";
            list flow-statistic {
              key "flow-id direction";
              unique "address-family source-ip destination-ip source-mask destination-mask source-port destination-port protocol vpn-name if-index";
              description
                "Statistics of IFIT flow.";
              leaf flow-id {
                type uint64;
                description
                  "The index of an IFIT flow.";
              }
    
              leaf direction {
                type flow-direction;
                description
                  "Direction of an IFIT flow.";
              }
    
              leaf address-family {
                type address-family;
                description
                  "The IP address family.";
              }
    
              leaf source-ip {
                type inet:ip-address-no-zone;
                description "Source IP address.";
              }
    
              leaf destination-ip {
                type inet:ip-address-no-zone;
                description
                  "Destination IP address.";
              }
    
              leaf source-mask {
                type uint8;
                description
                  "Mask of a source IP address.";
              }
    
              leaf destination-mask {
                type uint8;
                description
                  "Mask of a destination IP address.";
              }
    
              leaf source-port {
                type uint16;
                description
                  "Source port number.";
              }
    
              leaf destination-port {
                type uint16;
                description
                  "Destination port number.";
              }
    
              leaf protocol {
                type uint8;
                description "Protocol number.";
              }
    
              leaf vpn-name {
                type pub-type:vrf-name;
                description "Name of VPN.";
              }
    
              leaf if-index {
                type uint32;
                description "Interface ID.";
              }
    
              leaf error-info {
                type uint8;
                description
                  "Information of error.";
              }
    
              leaf interval {
                type uint16;
                units "s";
                description
                  "Interval of an IFIT flow.";
              }
    
              leaf period-id {
                type uint64;
                description
                  "Index of the statistics collection period of IFIT flows.";
              }
    
              leaf packet-count {
                type uint64;
                description
                  "Number of packets transmitted within this period.";
              }
    
              leaf byte-count {
                type uint64;
                description
                  "Number of bytes transmitted within this period.";
              }
    
              leaf timestamp-second {
                type uint32;
                description
                  "Integer part of the number of seconds starting at 00:00:00 UTC on January 1, 1970.";
              }
    
              leaf timestamp-nanosecond {
                type uint32;
                description
                  "Decimal part of the number of seconds starting at 00:00:00 UTC on January 1, 1970.";
              }
    
              leaf ttl {
                type uint8 {
                  range "0..255";
                }
                description
                  "The forwarding hops of an IFIT flow.";
              }
    
              leaf tunnel-if-index {
                type string {
                  length "1..290";
                }
                description
                  "The tunnel interface index of ECMP tunnel group.";
              }
    
              leaf dscp {
                type uint8;
                description "DSCP value.";
              }
    
              leaf cfg-id {
                type uint16;
                description "The CFG ID of LAG.";
              }
    
              leaf measure-mode {
                type uint8;
                description
                  "The IFIT measure mode.";
              }
    
              leaf gtp-mode {
                type ifit-gtp-mode;
                description
                  "The IFIT gtp measure mode.";
              }
    
              leaf gtp-te-id {
                type uint32;
                description "GTP te-id value.";
              }
    
              leaf disorder-count {
                type uint64;
                description
                  "Number of disorder packets within all periods.";
              }
    
              leaf sn-packet-loss-count {
                type uint64;
                description
                  "Number of loss packets calculated by sn within all periods.";
              }
            }  // list flow-statistic
          }  // container flow-statistics
    
          container flow-peer-ip-statistics {
            config false;
            description
              "List of IFIT flow peer IP statistics.";
            list flow-peer-ip-statistic {
              key "flow-id direction";
              description
                "Statistics of IFIT flow peer IP.";
              leaf flow-id {
                type uint64;
                description
                  "The index of an IFIT flow.";
              }
    
              leaf direction {
                type flow-direction;
                description
                  "Direction of an IFIT flow.";
              }
    
              leaf peer-ip {
                type inet:ip-address-no-zone;
                description
                  "Peer IP address bound to a VPN instance.";
              }
    
              leaf vpn-type {
                type vpn-type;
                description "Type of VPN.";
              }
    
              leaf vpn-name {
                type pub-type:vrf-name;
                description "Name of VPN.";
              }
    
              leaf evpl-id {
                type uint32 {
                  range "1..16777215";
                }
                description
                  "The identification of the EVPL instance.";
              }
    
              leaf evpn-name {
                type string {
                  length "1..31";
                }
                description "Name of EVPN.";
              }
    
              leaf error-info {
                type uint8;
                description
                  "Information of error.";
              }
    
              leaf interval {
                type uint16;
                units "s";
                description
                  "Interval of an IFIT flow.";
              }
    
              leaf if-index {
                type uint32;
                description "Interface ID.";
              }
    
              uses statistics-data;
    
              leaf ttl {
                type uint8 {
                  range "0..255";
                }
                description
                  "The forwarding hops of an IFIT flow.";
              }
    
              leaf measure-mode {
                type uint8;
                description
                  "The IFIT measure mode.";
              }
    
              leaf address-family {
                type address-family;
                description
                  "The IP address family.";
              }
            }  // list flow-peer-ip-statistic
          }  // container flow-peer-ip-statistics
    
          container flow-locator-statistics {
            config false;
            description
              "List of IFIT flow locator statistics.";
            list flow-locator-statistic {
              key "flow-id direction";
              description
                "Statistics of IFIT flow locator.";
              leaf flow-id {
                type uint64;
                description
                  "The index of an IFIT flow.";
              }
    
              leaf direction {
                type flow-direction;
                description
                  "Direction of an IFIT flow.";
              }
    
              leaf locator-prefix {
                type inet:ip-address-no-zone;
                description
                  "The locator prefix.";
              }
    
              leaf prefix-length {
                type uint8;
                description "Length of prefix.";
              }
    
              leaf vpn-type {
                type vpn-type;
                description "Type of VPN.";
              }
    
              leaf vpn-name {
                type pub-type:vrf-name;
                description "Name of VPN.";
              }
    
              leaf evpl-id {
                type uint32 {
                  range "1..16777215";
                }
                description
                  "The identification of the EVPL instance.";
              }
    
              leaf evpn-name {
                type string {
                  length "1..31";
                }
                description "Name of EVPN.";
              }
    
              leaf error-info {
                type uint8;
                description
                  "Information of error.";
              }
    
              leaf interval {
                type uint16;
                units "s";
                description
                  "Interval of an IFIT flow.";
              }
    
              leaf if-index {
                type uint32;
                description "Interface ID.";
              }
    
              uses statistics-data;
    
              leaf ttl {
                type uint8 {
                  range "0..255";
                }
                description
                  "The forwarding hops of an IFIT flow.";
              }
    
              leaf measure-mode {
                type uint8;
                description
                  "The IFIT measure mode.";
              }
    
              leaf address-family {
                type address-family;
                description
                  "The IP address family.";
              }
            }  // list flow-locator-statistic
          }  // container flow-locator-statistics
    
          container flow-hop-statistics {
            config false;
            description
              "List of IFIT flow hop statistics.";
            list flow-hop-statistic {
              key "flow-id direction";
              description
                "Statistics of IFIT flow hop.";
              leaf flow-id {
                type uint64;
                description
                  "The index of an IFIT flow.";
              }
    
              leaf direction {
                type flow-direction;
                description
                  "Direction of an IFIT flow.";
              }
    
              leaf if-index {
                type uint32;
                description "Interface ID.";
              }
    
              leaf error-info {
                type uint8;
                description
                  "Information of error.";
              }
    
              leaf period-id {
                type uint64;
                description
                  "Index of the statistics collection period of IFIT flows.";
              }
    
              leaf packet-count {
                type uint64;
                description
                  "Number of packets transmitted within this period.";
              }
    
              leaf byte-count {
                type uint64;
                description
                  "Number of bytes transmitted within this period.";
              }
    
              leaf timestamp-second {
                type uint32;
                description
                  "Integer part of the number of seconds starting at 00:00:00 UTC on January 1, 1970.";
              }
    
              leaf timestamp-nanosecond {
                type uint32;
                description
                  "Decimal part of the number of seconds starting at 00:00:00 UTC on January 1, 1970.";
              }
    
              leaf ttl {
                type uint8 {
                  range "0..255";
                }
                description
                  "The forwarding hops of an IFIT flow.";
              }
    
              leaf tunnel-if-index {
                type string {
                  length "1..290";
                }
                description
                  "The tunnel interface index of ECMP tunnel group.";
              }
    
              leaf cfg-id {
                type uint16;
                description "The CFG ID of LAG.";
              }
    
              leaf measure-mode {
                type uint8;
                description
                  "The IFIT measure mode.";
              }
    
              leaf maximum-delay {
                type uint64;
                units "us";
                description "Maximum delay.";
              }
    
              leaf minimum-delay {
                type uint64;
                units "us";
                description "Minimum delay.";
              }
    
              leaf total-delay {
                type uint64;
                units "us";
                description "Total delay.";
              }
    
              leaf total-count {
                type uint64;
                description
                  "The total count of packets.";
              }
    
              leaf disorder-count {
                type uint64;
                description
                  "Number of disorder packets within all periods.";
              }
    
              leaf sn-packet-loss-count {
                type uint64;
                description
                  "Number of loss packets calculated by sn within all periods.";
              }
    
              leaf sub-if-index {
                type uint32;
                description
                  "The index of sub-interface.";
              }
    
              leaf map-flag {
                type map-flag;
                description
                  "The IFIT map enable flag.";
              }
            }  // list flow-hop-statistic
          }  // container flow-hop-statistics
    
          container flow-vpws-statistics {
            config false;
            description
              "List of IFIT vpws flow statistics.";
            list flow-vpws-statistic {
              key "flow-id direction";
              unique "if-index";
              description
                "Statistics of IFIT vpws flow.";
              leaf flow-id {
                type uint64;
                description
                  "The index of an IFIT flow.";
              }
    
              leaf direction {
                type flow-direction;
                description
                  "Direction of an IFIT flow.";
              }
    
              leaf if-index {
                type uint32;
                description "Interface ID.";
              }
    
              leaf error-info {
                type uint8;
                description
                  "Information of error.";
              }
    
              leaf interval {
                type uint16;
                units "s";
                description
                  "Interval of an IFIT flow.";
              }
    
              uses statistics-data;
    
              leaf tunnel-if-index {
                type string {
                  length "1..290";
                }
                description
                  "The tunnel interface index of ECMP tunnel group.";
              }
    
              leaf vpws-instance-id {
                type uint32;
                description
                  "The instance id of virtual private wire service.";
              }
    
              leaf cfg-id {
                type uint16;
                description "The CFG ID of LAG.";
              }
    
              leaf measure-mode {
                type uint8;
                description
                  "The IFIT measure mode.";
              }
            }  // list flow-vpws-statistic
          }  // container flow-vpws-statistics
    
          container flow-native-ip-statistics {
            config false;
            description
              "List of statistics of IFIT flow.";
            list flow-native-ip-statistic {
              key "source-ip source-ip-mask-length destination-ip destination-ip-mask-length source-port destination-port protocol if-name direction";
              description
                "Statistics of IFIT native IP flow.";
              uses ip-flow-header;
    
              uses flow-statistics-data;
    
              uses app-data;
    
              uses discarded-packet-data;
    
              leaf start-time {
                type uint32;
                units "s";
                description
                  "The time when the flow is created. The number of seconds starting at 00:00:00 UTC on January 1, 1970.";
              }
    
              leaf role {
                type role-type;
                description
                  "The role of an IFIT native IP flow statistic data.";
              }
    
              leaf client-mac {
                type pub-type:mac-address;
                description
                  "The client mac of an IFIT native IP flow.";
              }
            }  // list flow-native-ip-statistic
          }  // container flow-native-ip-statistics
        }
      }  // module huawei-ifit-statistics
    

© 2023 YumaWorks, Inc. All rights reserved.