huawei-ifit-common

This module contains a collection of YANG definitions iFIT feature.

  • Version: 2020-04-08

    huawei-ifit-common@2020-04-08


    
      module huawei-ifit-common {
    
        yang-version 1;
    
        namespace
          "urn:huawei:yang:huawei-ifit-common";
    
        prefix ifit-common;
    
        import huawei-ifit {
          prefix ifit;
        }
        import huawei-extension {
          prefix ext;
        }
        import ietf-inet-types {
          prefix inet;
        }
        import huawei-ifm {
          prefix ifm;
        }
        import huawei-network-instance {
          prefix ni;
        }
        import huawei-l3vpn {
          prefix l3vpn;
        }
        import huawei-evpl {
          prefix evpl;
        }
    
        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
          "This module contains a collection of YANG definitions iFIT feature.";
    
        revision "2020-04-08" {
          description "Initial revision.";
          reference
            "Huawei private.";
    
        }
    
        ext:task-name "ifit";
    
        typedef flow-type {
          type enumeration {
            enum "unidirection" {
              value 2;
              description
                "An unidirection iFIT flow.";
            }
            enum "bidirection" {
              value 1;
              description
                "A bidirection iFIT flow.";
            }
          }
          description "Flow type.";
        }
    
        typedef measure-mode {
          type enumeration {
            enum "e2e" {
              value 1;
              description "E2E measure mode.";
            }
            enum "trace" {
              value 2;
              description "Trace measure mode.";
            }
          }
          description "Measure mode.";
        }
    
        typedef addr-type {
          type enumeration {
            enum "ipv4" {
              value 0;
              description "IPv4 address.";
            }
            enum "ipv6" {
              value 1;
              description "IPv6 address.";
            }
          }
          description "Address type.";
        }
    
        typedef flow-direction {
          type enumeration {
            enum "ingress" {
              value 1;
              description
                "Ingress of an iFIT flow.";
            }
            enum "transit-input" {
              value 2;
              description
                "Transit input of an iFIT flow.";
            }
            enum "transit-output" {
              value 3;
              description
                "Transit output of an iFIT flow.";
            }
            enum "egress" {
              value 4;
              description
                "Egress of an iFIT flow.";
            }
            enum "egress-to-cpu" {
              value 7;
              description
                "Egress to cpu of an IFIT flow.";
            }
            enum "egress-normal-drop" {
              value 8;
              description
                "Egress normal drop of an IFIT flow.";
            }
          }
          description "Flow direction.";
        }
    
        typedef addr-family-type {
          type enumeration {
            enum "ipv4-unicast" {
              value 1;
              description "IPv4 unicast.";
            }
            enum "ipv6-unicast" {
              value 2;
              description "IPv6 unicast.";
            }
          }
          description "Address family.";
        }
    
        typedef learning-mode {
          type enumeration {
            enum "sip-mask-dip-exact" {
              value 1;
              description
                "Mask included for source IP matching, and exact matching for destination IP address.";
            }
            enum "sip-mask-dip-mask" {
              value 2;
              description
                "Mask included for source and destination IP matching.";
            }
            enum "sip-exact-dip-exact" {
              value 3;
              description
                "Exact matching for source and destination IP addresses.";
            }
            enum "sip-exact-dip-mask" {
              value 4;
              description
                "Exact matching for source IP address, and mask included for destination IP matching.";
            }
          }
          description "Learning mode.";
        }
    
        typedef mapping-type {
          type enumeration {
            enum "ingress" {
              value 1;
              description "Ingress.";
            }
            enum "egress" {
              value 2;
              description "Egress.";
            }
          }
          description "Mapping type.";
        }
    
        rpc reset-dynamic-flow-all {
          ext:node-ref "/ifit:ifit/ifit-common:ifit-common/ifit-common:dynamic-flow-hops";
          description
            "Clear all dynamic iFIT flow.";
          input {
            leaf all-flow {
              type boolean;
              mandatory true;
              description
                "Clear all dynamic iFIT flow.";
            }
          }
        }  // rpc reset-dynamic-flow-all
    
        rpc reset-dynamic-flowid {
          ext:node-ref "/ifit:ifit/ifit-common:ifit-common/ifit-common:dynamic-flow-hops/ifit-common:dynamic-flow-hop";
          description
            "Clear specified dynamic iFIT ID.";
          input {
            leaf flow-id {
              type uint64;
              mandatory true;
              description
                "Clear specified dynamic iFIT ID.";
            }
          }
        }  // rpc reset-dynamic-flowid
    
        rpc set-dynamic-flow {
          ext:node-ref "/ifit:ifit/ifit-common:ifit-common/ifit-common:dynamic-flows/ifit-common:dynamic-flow";
          description "Set iFIT Flow parameter.";
          input {
            leaf source-ip {
              type inet:ip-address-no-zone;
              description
                "Source IP address of an iFIT flow.";
            }
    
            leaf destination-ip {
              type inet:ip-address-no-zone;
              description
                "Destination IP address of an iFIT flow.";
            }
    
            leaf source-mask {
              when "../source-ip";
              type uint8;
              description
                "Source IP address mask of an iFIT flow.";
            }
    
            leaf destination-mask {
              when "../destination-ip";
              type uint8;
              description
                "Destination IP address mask of an iFIT flow.";
            }
    
            leaf address-type {
              type addr-type;
              mandatory true;
              description
                "Address type of iFIT flow.";
            }
    
            leaf if-name {
              type leafref {
                path "/ifm:ifm/ifm:interfaces/ifm:interface/ifm:name";
              }
              mandatory true;
              description
                "Interface name to which an iFIT flow binds.";
            }
    
            leaf ni-name {
              type leafref {
                path "/ni:network-instance/ni:instances/ni:instance/ni:name";
              }
              description
                "Name of the VPN to which an iFIT flow belongs.";
            }
    
            leaf dscp {
              type uint16 {
                range "0..63";
              }
              description
                "DSCP of an iFIT flow.";
            }
    
            leaf interval {
              type uint16 {
                range "10|30|60|300";
              }
              units "s";
              default "30";
              description
                "Interval of an iFIT flow.";
            }
    
            leaf measure-mode {
              type measure-mode;
              default "e2e";
              description
                "Measure mode of an iFIT flow.";
            }
    
            leaf loss-measure-enable {
              type boolean;
              default "true";
              description
                "Enable/disable loss measure function of an iFIT flow.";
            }
    
            leaf delay-measure-enable {
              type boolean;
              default "true";
              description
                "Enable/disable delay measure function of an iFIT flow.";
            }
    
            leaf disorder-measure-enable {
              type boolean;
              default "false";
              description
                "Enable/disable disorder measure function of an iFIT flow.";
            }
    
            leaf protocol {
              type uint8 {
                ext:value-meaning {
                  ext:item "6" {
                    ext:meaning "tcp";
                  }
                  ext:item "17" {
                    ext:meaning "udp";
                  }
                  ext:item "132" {
                    ext:meaning "sctp";
                  }
                }
                range "0..254";
              }
              description
                "Protocol of an iFIT flow.";
            }
    
            leaf source-port {
              type uint16 {
                range "1..65535";
              }
              description
                "Source port of an iFIT flow.";
            }
    
            leaf destination-port {
              type uint16 {
                range "1..65535";
              }
              description
                "Destination port of an iFIT flow.";
            }
    
            leaf delay-per-packet-enable {
              type boolean;
              default "false";
              description
                "Enable/disable delay per-packet function of an iFIT flow.";
            }
          }
        }  // rpc set-dynamic-flow
    
        rpc reset-dynamic-flow {
          ext:node-ref "/ifit:ifit/ifit-common:ifit-common/ifit-common:dynamic-flows/ifit-common:dynamic-flow";
          description
            "Clear specified dynamic flow.";
          input {
            leaf address-type {
              type addr-type;
              mandatory true;
              description
                "Address type of iFIT flow.";
            }
    
            leaf source-ip {
              type inet:ip-address-no-zone;
              description
                "Source IP address of an iFIT flow.";
            }
    
            leaf destination-ip {
              type inet:ip-address-no-zone;
              description
                "Destination IP address of an iFIT flow.";
            }
    
            leaf source-mask {
              when "../source-ip";
              type uint8 {
                range "1..128";
              }
              description
                "Source IP address mask of an iFIT flow.";
            }
    
            leaf destination-mask {
              when "../destination-ip";
              type uint8 {
                range "1..128";
              }
              description
                "Destination IP address mask of an iFIT flow.";
            }
    
            leaf protocol {
              type uint8 {
                ext:value-meaning {
                  ext:item "6" {
                    ext:meaning "tcp";
                  }
                  ext:item "17" {
                    ext:meaning "udp";
                  }
                  ext:item "132" {
                    ext:meaning "sctp";
                  }
                }
                range "0..254";
              }
              description
                "Protocol of an iFIT flow.";
            }
    
            leaf source-port {
              type uint16 {
                range "1..65535";
              }
              description
                "Source port of an iFIT flow.";
            }
    
            leaf destination-port {
              type uint16 {
                range "1..65535";
              }
              description
                "Destination port of an iFIT flow.";
            }
    
            leaf ni-name {
              type leafref {
                path "/ni:network-instance/ni:instances/ni:instance/ni:name";
              }
              description
                "Name of the VPN to which an iFIT flow belongs.";
            }
    
            leaf if-name {
              type leafref {
                path "/ifm:ifm/ifm:interfaces/ifm:interface/ifm:name";
              }
              mandatory true;
              description
                "Interface name to which an iFIT flow binds.";
            }
    
            leaf dscp {
              type uint16 {
                range "0..63";
              }
              description
                "DSCP of an iFIT flow.";
            }
          }
        }  // rpc reset-dynamic-flow
      }  // module huawei-ifit-common
    

© 2023 YumaWorks, Inc. All rights reserved.