3 namespace "urn:opendaylight:params:xml:ns:yang:vpp:nsh";
6 revision "2016-06-24" {
7 description "Initial revision of vpp-nsh model";
13 import ietf-interfaces {
16 import ietf-yang-types {
19 import ietf-inet-types {
29 * Defines the supported next protocols that can be used for
30 * NSH next-protocol field.
32 identity next-protocol {
33 description "Base identity from which all nsh next protocols
40 "Support ipv4 to act as next protocol";
46 "Support ipv6 to act as next protocol";
52 "Support ethernet to act as next protocol";
55 typedef nsh-next-protocol {
59 description "Identifies a specific next protocol for nsh";
63 * Defines the supported nsh header action.
65 identity action-type {
66 description "nsh header action type";
71 description "swap action type";
76 description "push action type";
81 description "pop action type";
84 typedef nsh-action-type {
91 * Defines the supported encap type.
94 description "encap type";
99 description "vxlan-gpe encap type";
104 description "vxlan encap type";
107 typedef nsh-encap-type {
114 * Defines the supported MD-types.
117 description "md type";
122 description "nsh md-type1";
127 description "nsh md-type2";
130 typedef nsh-md-type {
136 grouping nsh-md-type1-attributes {
151 grouping nsh-md-type2-attributes {
157 grouping nsh-entry-base-attributes {
160 description "NSH Entry Name";
182 type nsh-next-protocol;
186 grouping nsh-map-base-attributes {
189 description "NSH Map Name";
212 type nsh-action-type;
220 description "Interface Name";
228 container nsh-entries {
232 uses nsh-entry-base-attributes;
235 "nsh-entry configuration";
243 uses nsh-map-base-attributes;
246 "nsh-map configuration";
251 augment /vpp-nsh/nsh-entries/nsh-entry {
252 ext:augment-identifier nsh-md-type-1-augment;
253 when "/md-type = 'vpp-nsh:md-type1' ";
254 uses nsh-md-type1-attributes;
257 augment /vpp-nsh/nsh-entries/nsh-entry {
258 ext:augment-identifier nsh-md-type-2-augment;
259 when "/md-type = 'vpp-nsh:md-type2' ";
260 uses nsh-md-type2-attributes;
263 container vpp-nsh-state {
267 "NSH operational data";
269 container nsh-entries {
273 uses nsh-entry-base-attributes;
276 "nsh-entry operational data";
284 uses nsh-map-base-attributes;
287 "nsh-map operational data";
292 augment /vpp-nsh-state/nsh-entries/nsh-entry {
293 ext:augment-identifier nsh-md-type-1-state-augment;
294 when "/md-type = 'vpp-nsh:md-type1' ";
295 uses nsh-md-type1-attributes;
298 augment /vpp-nsh-state/nsh-entries/nsh-entry {
299 ext:augment-identifier nsh-md-type-2-state-augment;
300 when "/md-type = 'vpp-nsh:md-type2' ";
301 uses nsh-md-type2-attributes;