3 namespace "urn:opendaylight:params:xml:ns:yang:v3po";
6 revision "2015-01-05" {
7 description "Initial revision of v3po model";
13 import ietf-interfaces {
16 import ietf-yang-types {
19 import ietf-inet-types {
29 typedef bridge-domain-ref {
31 path "/vpp/bridge-domains/bridge-domain/name";
34 "This type is used by to reference a bridge domain table";
37 typedef bridged-virtual-interface-ref {
39 path "/if:interfaces/if:interface/l2/bridged-virtual-interface";
42 "This type is used by to reference a bridged virtual interface";
52 typedef tag-rewrite-operation {
59 enum translate-1-to-1;
60 enum translate-1-to-2;
61 enum translate-2-to-1;
62 enum translate-2-to-2;
72 identity vxlan-tunnel {
73 base if:interface-type;
77 base if:interface-type;
81 base if:interface-type;
84 identity sub-interface {
85 base if:interface-type;
89 // FIXME: should be in a vxlan-specific model
90 description "VNI used in a VXLAN tunnel";
96 typedef vhost-user-role {
103 grouping bridge-domain-attributes {
108 "Enable/disable L2 flooding.";
114 "Enable/disable L2 forwarding.";
120 "Enable/disable L2 learning.";
122 leaf unknown-unicast-flood {
126 leaf arp-termination {
132 grouping sub-interface-base-attributes {
140 leaf number-of-tags {
152 leaf match-any-outer-id {
155 leaf match-any-inner-id {
166 grouping tap-interface-base-attributes {
172 grouping tap-interface-config-attributes {
174 type yang:phys-address;
176 description "Mac address to be set for the tap interface. Random will be used if not configured";
179 leaf device-instance {
182 description "Custom device instance. Autogenerated will be used if not configured";
186 grouping vhost-user-interface-base-attributes {
193 type vhost-user-role;
198 grouping vhost-user-interface-state-attributes {
203 leaf virtio-net-hdr-size {
207 leaf num-memory-regions {
217 grouping vlan-tag-rewrite-attributes {
218 leaf rewrite-operation {
219 type tag-rewrite-operation;
234 augment /if:interfaces/if:interface {
235 ext:augment-identifier "vpp-interface-augmentation";
237 // FIXME using ietf-interfaces model for vpp interfaces makes it hard to implement because:
238 // 1. The link between interface type and this augmentation is unclear
239 // 2. Only this augmentation with combination of ifc type is trigger to do something for vpp, what if user only configures base interface stuff ? + We need to get leaves defined by ietf-interfaces when we are processing this augment
241 container sub-interface {
242 when "../if:type = 'v3po:sub-interface'";
243 leaf super-interface {
244 type if:interface-ref;
246 uses sub-interface-base-attributes;
250 when "../if:type = 'v3po:tap'";
251 uses tap-interface-base-attributes;
252 uses tap-interface-config-attributes;
256 when "../if:type = 'ianaift:ethernetCsmacd'";
264 "The size, in octets, of the largest packet that the
265 hardware interface will send and receive.";
274 container vhost-user {
275 when "../if:type = 'v3po:vhost-user'";
276 uses vhost-user-interface-base-attributes;
277 description "vhost-user settings";
280 // FIXME: this should be in an vxlan-specific extension
281 when "../if:type = 'v3po:vxlan-tunnel'";
285 type inet:ip-address;
289 type inet:ip-address;
301 "Parameters for configuring Layer2 features on interfaces.";
302 must "(not (../if:ipv4[if:enabled = 'true']/if:address/if:ip) and " +
303 "not (../if:ipv6[if:enabled = 'true']/if:address/if:ip))";
305 choice interconnection {
306 case xconnect-based {
307 leaf xconnect-outgoing-interface {
308 /* Don't allow selection of this interface */
309 must "../../if:name != current()";
310 type if:interface-ref;
317 type bridge-domain-ref;
319 "Interfaces in a bridge-domain forward packets to other
320 interfaces in the same bridge-domain based on
321 destination mac address.";
323 leaf split-horizon-group {
324 when "../bridge-domain";
330 "Interface's split-horizon group. Interfaces in the same
331 bridge-domain and split-horizon group can not forward
332 packets between each other. ";
334 leaf bridged-virtual-interface {
335 when "../bridge-domain";
339 "Interface forward packets in the bridge-domain
340 associated with the BVI.";
344 container vlan-tag-rewrite {
345 uses vlan-tag-rewrite-attributes;
354 container bridge-domains {
357 // TODO: where does this come from?
364 uses bridge-domain-attributes;
370 type yang:phys-address;
379 leaf outgoing-interface {
380 type if:interface-ref;
387 augment /if:interfaces-state/if:interface {
388 ext:augment-identifier "vpp-interface-state-augmentation";
394 container sub-interface {
395 when "../if:type = 'v3po:sub-interface'";
396 leaf super-interface {
397 type if:interface-state-ref;
399 uses sub-interface-base-attributes;
403 when "../if:type = 'v3po:tap'";
404 uses tap-interface-base-attributes {
412 when "../if:type = 'ianaift:ethernetCsmacd'";
416 leaf manufacturer-description {
426 container vhost-user {
427 when "../if:type = 'v3po:vhost-user'";
428 uses vhost-user-interface-base-attributes {
436 uses vhost-user-interface-state-attributes;
439 when "../if:type = 'v3po:vxlan-tunnel'";
442 type inet:ip-address;
445 type inet:ip-address;
456 choice interconnection {
457 case xconnect-based {
458 leaf xconnect-outgoing-interface {
459 type if:interface-ref;
464 type bridge-domain-ref;
466 leaf split-horizon-group {
469 leaf bridged-virtual-interface {
474 container vlan-tag-rewrite {
475 uses vlan-tag-rewrite-attributes;
480 augment /if:interfaces-state/if:interface/if:statistics {
481 ext:augment-identifier "vpp-interface-statistics-augmentation";
482 leaf in-errors-no-buf {
485 leaf in-errors-miss {
488 leaf out-discards-fifo-full {
493 container vpp-state {
497 "VPP operational data";
499 container bridge-domains {
500 // FIXME: Should this live in bridge-domain.yang in a modular fashion ?
508 uses bridge-domain-attributes;
514 type if:interface-state-ref;
517 leaf split-horizon-group {
521 leaf bridged-virtual-interface {
530 type yang:phys-address;
535 leaf outgoing-interface {
536 when "../v3po:action = 'forward'";
537 type if:interface-state-ref;
546 leaf bridged-virtual-interface {
547 when "../v3po:action = 'forward'";
552 "bridge-domain operational data";
560 leaf build-directory {