aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/yang/openconfig/openconfig-aft-pf.yang
blob: 839f9e5e47a0973a1ace7a8af8bafdea986abb32 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
submodule openconfig-aft-pf {
  belongs-to "openconfig-aft" {
    prefix "oc-aft";
  }

  import openconfig-extensions { prefix "oc-ext"; }
  import openconfig-inet-types { prefix "oc-inet"; }
  import openconfig-yang-types { prefix "oc-yang"; }
  import openconfig-mpls-types { prefix "oc-mplst"; }
  import openconfig-packet-match-types {
    prefix "oc-pkt-match-types";
  }

  // Include common cross-AFT groupings from the common submodule.
  include openconfig-aft-common;

  organization
    "OpenConfig working group";

  contact
    "OpenConfig working group
    www.openconfig.net";

  description
    "Submodule containing definitions of groupings for the abstract
    forwarding table(s) for policy forwarding entries. These are
    defined to be forwarding tables that allow matches on
    fields other than the destination address that is used in
    other forwarding tables.";

  oc-ext:openconfig-version "0.3.1";

  revision 2017-08-24 {
    description
      "Formatting fixes";
    reference "0.3.1";
  }

  revision 2017-05-10 {
    description
      "Refactor to provide concretised per-AF schemas per AFT.";
    reference "0.3.0";
  }

  grouping aft-pf-structural {
    description
      "Structural grouping defining the schema for the policy
      forwarding abstract forwarding table.";

    list policy-forwarding-entry {
      key "index";

      description
        "List of the policy forwarding entries within the abstract
        forwarding table. Each entry is uniquely identified by an
        index on the system, due to the arbitrary match conditions
        that may be implemented within the policy forwarding AFT.
        The index may change upon changes of the entry if, and only
        if, the device exporting the AFT replaces the entire entry
        by removing the previous entry and replacing it with a
        subsequent updated version.";

      leaf index {
        type leafref {
          path "../config/index";
        }
        description
          "Reference to the arbitary index for the policy forwarding
          AFT entry.";
      }

      container config {
        description
          "Configuration parameters for the Policy forwarding
          AFT entry.";
        uses aft-pf-entry-config;
      }

      container state {
        config false;
        description
          "Operational state parameters for the Policy Forwarding
          AFT entry.";
        uses aft-pf-entry-config;
        uses aft-pf-entry-state;
      }
    }
  }

  grouping aft-pf-entry-config {
    description
      "Configuration parameters for the Policy Forwarding
      AFT entry.";

    leaf index {
      type uint64;
      description
        "An arbitrary 64-bit index identifying the policy forwarding
        AFT entry.";
    }

    leaf ip-prefix {
      type oc-inet:ip-prefix;
      description
        "The IP prefix that the forwarding entry matches.";
    }

    leaf mac-address {
      type oc-yang:mac-address;
      description
         "The MAC address that the forwarding entry matches. Used for
         Layer 2 forwarding entries, e.g., within a VSI instance.";
    }

    leaf mpls-label {
      type oc-mplst:mpls-label;
      description
        "The MPLS label that the forwarding entry matches. Used for
        MPLS forwarding entries, whereby the local device acts as an
        LSR.";
    }

    leaf mpls-tc {
      type oc-mplst:mpls-tc;
      description
        "The value of the MPLS Traffic Class bits (formerly known as
        the MPLS experimental bits) that are to be matched by the AFT
        entry.";
      reference
        "RFC5462: Multiprotocol Label Switching (MPLS) Label Stack
        Entry: 'EXP' Field Renamed to 'Traffic Class' Field"; }

    leaf ip-dscp {
      type oc-inet:dscp;
      description
        "The value of the differentiated services code point (DSCP) to
        be matched for the forwarding entry. The value is specified in
        cases where specific class-based forwarding based on IP is
        implemented by the device.";
    }

    leaf ip-protocol {
      type oc-pkt-match-types:ip-protocol-type;
      description
        "The value of the IP protocol field of an IPv4 packet, or the
        next-header field of an IPv6 packet which is to be matched by
        the AFT entry. This field is utilised where forwarding is
        performed based on L4 information.";
    }

    leaf l4-src-port {
      type oc-inet:port-number;
      description
        "The value of the source port field of the transport header
        that is to be matched by the AFT entry.";
    }

    leaf l4-dst-port {
      type oc-inet:port-number;
      description
        "The value of the destination port field of the transport
        header that is to be matched by the AFT entry.";
    }
  }

  grouping aft-pf-entry-state {
    description
      "Operational state parameters for the Policy Forwarding
      AFT entry.";
    uses aft-common-entry-state;
  }
}