ciena-mef-classifier

This YANG module defines Ciena's management data definition for the management of a classifier.

  • Version: 2017-05-16

    ciena-mef-classifier@2017-05-16


    
      module ciena-mef-classifier {
    
        yang-version 1;
    
        namespace
          "urn:ciena:params:xml:ns:yang:ciena-pn::ciena-mef-classifier";
    
        prefix classifier;
    
        import ietf-inet-types {
          prefix inet;
        }
        import ietf-yang-types {
          prefix yt;
        }
    
        organization "Ciena Corporation";
    
        contact
          "Web URL: http://www.ciena.com/
    E-mail:  yang@ciena.com
    Postal:  7035 Ridge Road
    	 Hanover, Maryland 21076
    	 U.S.A.
    Phone:   +1 800-921-1144
    Fax:     +1 410-694-5750";
    
        description
          "This YANG module defines Ciena's management data definition for the
    management of a classifier.";
    
        revision "2017-05-16" {
          description
            "Various updates to classifers since first revision
    Added description for containers, leafs, lists, enums
    and choices.";
          reference
            "RFC 6020: YANG - A Data Modeling Language for
            the Network Configuration Protocol (NETCONF).
            No specific reference; standard not available.";
    
        }
    
        revision "2014-12-19" {
          description
            "First revision of MEF based classifier";
          reference
            "RFC 6020: YANG - A Data Modeling Language for
            the Network Configuration Protocol (NETCONF).
            No specific reference; standard not available.";
    
        }
    
    
        typedef classifier-ref {
          type leafref {
            path "/classifier:classifiers/classifier:classifier/classifier:name";
          }
          description
            "This type is used by data models that need to reference
    configured classifier list.";
        }
    
        feature filter-parameters-type {
          description
            "Allows for configuration of filter parameters inline.";
        }
    
        identity filter-param-type {
          description
            "This is the base identity of the filter-param-type.";
        }
    
        identity vtag-stack {
          base filter-param-type;
          description "Classify on vtag stack.";
        }
    
        identity mpls-label {
          base filter-param-type;
          description "Classify on mpls label.";
        }
    
        identity dscp {
          base filter-param-type;
          description "Classify on dscp.";
        }
    
        identity source-ip {
          base filter-param-type;
          description "Classify on source ip.";
        }
    
        identity destination-ip {
          base filter-param-type;
          description
            "Classify on destination ip.";
        }
    
        identity l4-destination-port {
          base filter-param-type;
          description
            "Classify on L4 destination port.";
        }
    
        identity l4-source-port {
          base filter-param-type;
          description
            "Classify on L4 source port.";
        }
    
        identity ip-protocol {
          base filter-param-type;
          description "Classify on ip protocol.";
        }
    
        identity base-etype {
          base filter-param-type;
          description
            "Classify on base ether type.";
        }
    
        identity any {
          base filter-param-type;
          description "Classify on any traffic.";
        }
    
        feature vtag-stack-feature {
          description
            "Allows for configuration of vtag stack type inline.";
        }
    
        identity vtag-stack-type {
          description
            "This is the base identity for vtag stack.";
        }
    
        identity untagged {
          base vtag-stack-type;
          description "Classify on untagged.";
        }
    
        identity l2cp {
          base vtag-stack-type;
          description "Classify on L2CP.";
        }
    
        identity tagged {
          base vtag-stack-type;
          description "Classify on tagged.";
        }
    
        identity ip-fragment {
          base filter-param-type;
          description "Classify on ip fragment.";
        }
    
        identity l4-application {
          base filter-param-type;
          description
            "Classify on L4 application.";
        }
    
        identity tcp-flags {
          base filter-param-type;
          description "Classify on tcp flags.";
        }
    
        identity l4-dst-protocol {
          base filter-param-type;
          description
            "Classify on l4 destination protocol.";
        }
    
        identity source-mac {
          base filter-param-type;
          description "Classify on source mac.";
        }
    
        identity destination-mac {
          base filter-param-type;
          description
            "Classify on destination mac.";
        }
    
        grouping classifier-group {
          description
            "This defines the classifier group on the device.";
          list classifier {
            key "name";
            ordered-by user;
            description
              "This defines the list of classifiers.";
            leaf name {
              type string;
              description
                "A unique name for the classifier.";
            }
    
            leaf filter-operation {
              type enumeration {
                enum "match-all" {
                  value 0;
                  description
                    "Classify if all configured filter entry matches.";
                }
                enum "match-any" {
                  value 1;
                  description
                    "Classify if any configured filter entry matches.";
                }
              }
              description
                "Indicates the filter operation of the classifier.";
            }
    
            list filter-entry {
              key "filter-parameter";
              ordered-by user;
              description
                "Indicates the list of filter entries for this classifier.";
              leaf filter-parameter {
                type identityref {
                  base filter-param-type;
                }
                description
                  "Indicates which filter parameter is used by this filter entry";
              }
    
              leaf logical-not {
                type boolean;
                default "false";
                description
                  "Opposite of what is specified in the
    filter-parameters. If the filter-parameter
    specifies a tpid as tpid-8100, then anything
    other than tpid-8100 is considered an acceptable
    packet.";
              }
    
              choice filter-parameters {
                description
                  "Indicates the choice of filter parameters used in a single classifier.";
                choice vtag-stack-type {
                  description
                    "This represents the choice of vtag stack type in a single classifier.";
                  leaf untagged-exclude-priority-tagged {
                    type boolean;
                    description
                      "Classification on untagged frames excluding priority tagged frames.";
                  }
                  leaf l2cp-exclude-priority-tagged {
                    type boolean;
                    description
                      "Classification on L2CP frames excluding priority tagged frames.";
                  }
                  list vtags {
                    key "tag";
                    description
                      "This represents the list of vtags.";
                    leaf tag {
                      type uint8;
                      description
                        "'1' represents outer most tag, '2' next outer most, etc.";
                    }
    
                    leaf tpid {
                      type enumeration {
                        enum "tpid-8100" {
                          value 0;
                          description
                            "Indicates value of VLAN tag TPID to be 0x8100.";
                        }
                        enum "tpid-88a8" {
                          value 1;
                          description
                            "Indicates value of VLAN tag TPID to be 0x88a8.";
                        }
                        enum "tpid-9100" {
                          value 2;
                          description
                            "Indicates value of VLAN tag TPID to be 0x9100.";
                        }
                      }
                      description
                        "This leaf represents the value of VLAN tag TPID.";
                    }
    
                    leaf pcp {
                      type uint8 {
                        range "0..7";
                      }
                      description
                        "This leaf represents the value of PCP in a single classifier.";
                    }
    
                    leaf pcp-mask {
                      type uint8 {
                        range "1..7";
                      }
                      description
                        "Allow PCP values to be optionally coupled with a mask in a single classifier.";
                    }
    
                    leaf dei {
                      type enumeration {
                        enum "discard-eligible" {
                          value 0;
                          description
                            "Indicates DEI bit is true i.e. set to 1.";
                        }
                        enum
                          "not-discard-eligible" {
                          value 1;
                          description
                            "Indicates DEI bit is false i.e. set to 0.";
                        }
                      }
                      description
                        "Discard Eligibility Indication.";
                    }
    
                    leaf vlan-id {
                      type uint16 {
                        range "1..4094";
                      }
                      description
                        "Represents a IEEE 802.1Q VLAN-ID.";
                    }
    
                    leaf vlan-id-max {
                      type uint16 {
                        range "1..4094";
                      }
                      description
                        "The maximum value of VLAN ID for ranged VLAN-ID values. Mutually exclusive to vlan-id-mask.";
                    }
    
                    leaf vlan-id-mask {
                      type uint16 {
                        range "1..4095";
                      }
                      description
                        "Allow VLAN ID values to be optionally coupled with a mask. Mutually exclusive to vlan-id-max.";
                    }
                  }  // list vtags
                }  // choice vtag-stack-type
                list mpls-labels {
                  key "label";
                  description
                    "This represents the list of mpls labels.";
                  leaf label {
                    type uint32;
                    description
                      "An administratively assigned value, which may be used
    to identify the mpls label.";
                  }
    
                  choice labels {
                    description
                      "This represents the choice of labels to be configured.";
                    case any {
                      description
                        "Accept any label.";
                      leaf label-any {
                        type empty;
                        description
                          "Represents any label.";
                      }
                    }  // case any
                    leaf mpls-label {
                      type uint32;
                      description
                        "Indicates the value of mpls label.";
                    }
                  }  // choice labels
    
                  choice tc {
                    description
                      "This represents the choice of TCs to be configured.";
                    case any {
                      description
                        "Accept any tc value.";
                      leaf tc-any {
                        type empty;
                        description
                          "Represents any tc value.";
                      }
                    }  // case any
                    leaf tc-value {
                      type uint8;
                      description
                        "Indicates the value of tc.";
                    }
                  }  // choice tc
                }  // list mpls-labels
    
                case dscp {
                  leaf dscp-min {
                    type inet:dscp;
                    description
                      "The minimum value of DSCP.";
                  }
    
                  leaf dscp-max {
                    type inet:dscp;
                    description
                      "The maximum value of DSCP for ranged DSCP values in a single classifier. Mutually exclusive to dscp-mask.";
                  }
    
                  leaf dscp-mask {
                    type inet:dscp;
                    description
                      "Allow DSCP values to be optionally coupled with a mask in a single classifier. Mutually exclusive to dscp-max.";
                  }
                }  // case dscp
    
                case source-ip {
                  description
                    "Classification on IP source-address (v4/v6) and masking.";
                  leaf source-address {
                    type inet:ip-prefix;
                    description
                      "Source IP address (v4/v6) with mask.";
                  }
                }  // case source-ip
    
                case destination-ip {
                  description
                    "Classification on IP destination-address (v4/v6) and masking.";
                  leaf destination-address {
                    type inet:ip-prefix;
                    description
                      "Destination IP address (v4/v6) with mask.";
                  }
                }  // case destination-ip
    
                case l4-source-port {
                  leaf source-min {
                    type inet:port-number;
                    description
                      "L4 source port minimum value.";
                  }
    
                  leaf source-max {
                    type inet:port-number;
                    description
                      "L4 source port maximum value.";
                  }
                }  // case l4-source-port
    
                case l4-destination-port {
                  leaf destination-min {
                    type inet:port-number;
                    description
                      "L4 destination port minimum value.";
                  }
    
                  leaf destination-max {
                    type inet:port-number;
                    description
                      "L4 destination port maximum value.";
                  }
                }  // case l4-destination-port
    
                case ip-protocol {
                  leaf min-prot {
                    type uint16;
                    description
                      "IP protocol minimum value.";
                  }
    
                  leaf max-prot {
                    type uint16;
                    description
                      "IP protocol maximum value.";
                  }
                }  // case ip-protocol
                leaf base-ethertype {
                  type uint16;
                  description
                    "Indicates the base ether type value.";
                }
                leaf any {
                  type empty;
                  description
                    "Accept any classification. Wide-Open classifier";
                }
                leaf ip-fragment {
                  type boolean;
                  description
                    "IP-fragment bit true/false";
                }
                leaf l4-application {
                  type enumeration {
                    enum "twamp" {
                      value 0;
                      description "twamp.";
                    }
                  }
                  description
                    "This leaf represents the L4 application. Mutually exclusive with L4 destination port";
                }
                leaf l4-dst-protocol {
                  type enumeration {
                    enum "bootp-client" {
                      value 0;
                      description
                        "bootp-client.";
                    }
                    enum "bootp-server" {
                      value 1;
                      description
                        "bootp-server.";
                    }
                    enum "bgp" {
                      value 2;
                      description "bgp.";
                    }
                    enum "dhcpv6-client" {
                      value 3;
                      description
                        "dhcpv6 client.";
                    }
                    enum "dhcpv6-server" {
                      value 4;
                      description
                        "dhcpv6 server.";
                    }
                    enum "dhcp-client" {
                      value 5;
                      description "dhcp client.";
                    }
                    enum "dhcp-server" {
                      value 6;
                      description "dhcp server.";
                    }
                    enum "dns" {
                      value 7;
                      description "dns.";
                    }
                    enum "ftp" {
                      value 8;
                      description "ftp.";
                    }
                    enum "http" {
                      value 9;
                      description "http.";
                    }
                    enum "ldp" {
                      value 10;
                      description "ldp.";
                    }
                    enum "ntp" {
                      value 11;
                      description "ntp.";
                    }
                    enum "olsr" {
                      value 12;
                      description "olsr.";
                    }
                    enum "rip" {
                      value 13;
                      description "rip.";
                    }
                    enum "rpc" {
                      value 14;
                      description "rpc.";
                    }
                    enum "snmp" {
                      value 15;
                      description "snmp.";
                    }
                    enum "snmptrap" {
                      value 16;
                      description "snmp trap.";
                    }
                    enum "ssh" {
                      value 17;
                      description "ssh.";
                    }
                    enum "syslog" {
                      value 18;
                      description "syslog.";
                    }
                    enum "tacacs" {
                      value 19;
                      description "tacacs.";
                    }
                    enum "telnet" {
                      value 20;
                      description "telnet.";
                    }
                    enum "tftp" {
                      value 21;
                      description "tftp.";
                    }
                    enum "twampctl" {
                      value 22;
                      description "twampctl.";
                    }
                  }
                  description "L4 protocol.";
                }
    
                case tcp-flags {
                  description "TCP flags.";
                  leaf syn {
                    type boolean;
                    description
                      "Sets the TCP Flag SYN true/false.";
                  }
    
                  leaf ack {
                    type boolean;
                    description
                      "Sets the TCP Flag ACK true/false.";
                  }
    
                  leaf rst {
                    type boolean;
                    description
                      "Sets the TCP Flag RST true/false.";
                  }
    
                  leaf urg {
                    type boolean;
                    description
                      "Sets the TCP Flag URG true/false.";
                  }
    
                  leaf psh {
                    type boolean;
                    description
                      "Sets the TCP Flag PSH true/false.";
                  }
    
                  leaf fin {
                    type boolean;
                    description
                      "Sets the TCP Flag FIN true/false.";
                  }
                }  // case tcp-flags
    
                case source-mac {
                  leaf source-mac {
                    type yt:mac-address;
                    description
                      "Sets the source MAC address.";
                  }
    
                  leaf source-mac-mask {
                    type yt:mac-address;
                    description
                      "Sets the source MAC address MASK.";
                  }
                }  // case source-mac
    
                case destination-mac {
                  leaf destination-mac {
                    type yt:mac-address;
                    description
                      "Sets the destination MAC address.";
                  }
    
                  leaf destination-mac-mask {
                    type yt:mac-address;
                    description
                      "Sets the destination MAC address mask.";
                  }
                }  // case destination-mac
              }  // choice filter-parameters
            }  // list filter-entry
          }  // list classifier
        }  // grouping classifier-group
    
        container classifiers {
          description
            "Configuration data for classifiers.";
          uses classifier-group;
        }  // container classifiers
      }  // module ciena-mef-classifier
    

© 2023 YumaWorks, Inc. All rights reserved.