blob: 707bb8bd73e659c2b81ef8793602eaa29eab7b95 [file] [log] [blame]
Thomas Vachuska8ca75a22017-08-24 16:12:59 -07001submodule openconfig-aft-pf {
2 belongs-to "openconfig-aft" {
3 prefix "oc-aft";
4 }
5
6 import openconfig-extensions { prefix "oc-ext"; }
7 import openconfig-inet-types { prefix "oc-inet"; }
8 import openconfig-yang-types { prefix "oc-yang"; }
9 import openconfig-mpls-types { prefix "oc-mplst"; }
10 import openconfig-packet-match-types {
11 prefix "oc-pkt-match-types";
12 }
13
14 // Include common cross-AFT groupings from the common submodule.
15 include openconfig-aft-common;
16
17 organization
18 "OpenConfig working group";
19
20 contact
21 "OpenConfig working group
22 www.openconfig.net";
23
24 description
25 "Submodule containing definitions of groupings for the abstract
26 forwarding table(s) for policy forwarding entries. These are
27 defined to be forwarding tables that allow matches on
28 fields other than the destination address that is used in
29 other forwarding tables.";
30
31 oc-ext:openconfig-version "0.3.0";
32
33 revision 2017-05-10 {
34 description
35 "Refactor to provide concretised per-AF schemas per AFT.";
36 reference "0.3.0";
37 }
38
39 grouping aft-pf-structural {
40 description
41 "Structural grouping defining the schema for the policy
42 forwarding abstract forwarding table.";
43
44 list policy-forwarding-entry {
45 key "index";
46
47 description
48 "List of the policy forwarding entries within the abstract
49 forwarding table. Each entry is uniquely identified by an
50 index on the system, due to the arbitrary match conditions
51 that may be implemented within the policy forwarding AFT.
52 The index may change upon changes of the entry if, and only
53 if, the device exporting the AFT replaces the entire entry
54 by removing the previous entry and replacing it with a
55 subsequent updated version.";
56
57 leaf index {
58 type leafref {
59 path "../config/index";
60 }
61 description
62 "Reference to the arbitary index for the policy forwarding
63 AFT entry.";
64 }
65
66 container config {
67 description
68 "Configuration parameters for the Policy forwarding
69 AFT entry.";
70 uses aft-pf-entry-config;
71 }
72
73 container state {
74 config false;
75 description
76 "Operational state parameters for the Policy Forwarding
77 AFT entry.";
78 uses aft-pf-entry-config;
79 uses aft-pf-entry-state;
80 }
81
82 uses aft-common-nhop-structural;
83 }
84 }
85
86 grouping aft-pf-entry-config {
87 description
88 "Configuration parameters for the Policy Forwarding
89 AFT entry.";
90
91 leaf index {
92 type uint64;
93 description
94 "An arbitrary 64-bit index identifying the policy forwarding
95 AFT entry.";
96 }
97
98 leaf ip-prefix {
99 type oc-inet:ip-prefix;
100 description
101 "The IP prefix that the forwarding entry matches.";
102 }
103
104 leaf mac-address {
105 type oc-yang:mac-address;
106 description
107 "The MAC address that the forwarding entry matches. Used for
108 Layer 2 forwarding entries, e.g., within a VSI instance.";
109 }
110
111 leaf mpls-label {
112 type oc-mplst:mpls-label;
113 description
114 "The MPLS label that the forwarding entry matches. Used for
115 MPLS forwarding entries, whereby the local device acts as an
116 LSR.";
117 }
118
119 leaf mpls-tc {
120 type oc-mplst:mpls-tc;
121 description
122 "The value of the MPLS Traffic Class bits (formerly known as
123 the MPLS experimental bits) that are to be matched by the AFT
124 entry.";
125 reference
126 "RFC5462: Multiprotocol Label Switching (MPLS) Label Stack
127 Entry: 'EXP' Field Renamed to 'Traffic Class' Field"; }
128
129 leaf ip-dscp {
130 type oc-inet:dscp;
131 description
132 "The value of the differentiated services code point (DSCP) to
133 be matched for the forwarding entry. The value is specified in
134 cases where specific class-based forwarding based on IP is
135 implemented by the device.";
136 }
137
138 leaf ip-protocol {
139 type oc-pkt-match-types:ip-protocol-type;
140 description
141 "The value of the IP protocol field of an IPv4 packet, or the
142 next-header field of an IPv6 packet which is to be matched by
143 the AFT entry. This field is utilised where forwarding is
144 performed based on L4 information.";
145 }
146
147 leaf l4-src-port {
148 type oc-inet:port-number;
149 description
150 "The value of the source port field of the transport header
151 that is to be matched by the AFT entry.";
152 }
153
154 leaf l4-dst-port {
155 type oc-inet:port-number;
156 description
157 "The value of the destination port field of the transport
158 header that is to be matched by the AFT entry.";
159 }
160 }
161
162 grouping aft-pf-entry-state {
163 description
164 "Operational state parameters for the Policy Forwarding
165 AFT entry.";
166 uses aft-common-entry-state;
167 }
168}