3 namespace "urn:opendaylight:params:xml:ns:yang:v3po";
6 revision "2016-12-14" {
8 "This revision adds the following new features:
9 - ingress/egress ACLs support
10 - moved ACL definitions to vpp-acl module";
13 revision "2015-01-05" {
14 description "Initial revision of v3po model";
20 import ietf-interfaces {
23 import ietf-yang-types {
26 import ietf-inet-types {
39 typedef bridge-domain-ref {
41 path "/vpp/bridge-domains/bridge-domain/name";
44 "This type is used by to reference a bridge domain table";
47 typedef bridged-virtual-interface-ref {
49 path "/if:interfaces/if:interface/l2/bridged-virtual-interface";
52 "This type is used by to reference a bridged virtual interface";
55 identity vxlan-tunnel {
56 base if:interface-type;
60 base if:interface-type;
64 base if:interface-type;
68 base if:interface-type;
71 identity l2-fib-action {
72 description "Base identity for l2-fib actions";
75 identity l2-fib-forward {
78 "Forwards packet with configured mac address";
81 identity l2-fib-filter {
84 "Drops packet with configured mac address";
87 typedef l2-fib-action {
91 description "Identifies a specific L2 FIB action";
95 // FIXME: should be in a vxlan-specific model
96 description "VNI used in a VXLAN tunnel";
102 typedef vhost-user-role {
109 identity vxlan-gpe-tunnel {
110 base if:interface-type;
113 typedef vxlan-gpe-vni {
114 description "VNI used in a VXLAN-GPE tunnel";
120 typedef vxlan-gpe-next-protocol {
137 grouping bridge-domain-attributes {
142 "Enable/disable L2 flooding.";
148 "Enable/disable L2 forwarding.";
154 "Enable/disable L2 learning.";
156 leaf unknown-unicast-flood {
160 leaf arp-termination {
165 container arp-termination-table {
166 when "../v3po:arp-termination = 'true'";
168 // TODO(HONEYCOMB-133): add support for read (after VPP-230 is done)
169 list arp-termination-table-entry {
170 key "ip-address phys-address";
172 // FIXME: change to ip-address-no-zone after https://bugs.opendaylight.org/show_bug.cgi?id=6413 is resolved
173 type inet:ip-address;
176 type yang:phys-address;
182 // TODO express constraints for L2 FIB entries in YANG if possible
183 grouping l2-fib-attributes {
184 container l2-fib-table {
189 type yang:phys-address;
192 leaf outgoing-interface {
195 // mandatory for forward action
196 // FIXME VPP's CLI does not require to set iface id for filter action
197 // VPP's binary api in constrast to CLI does some checks on the iface id value,
198 // so currently it has to be set for all actions
200 "One of interfaces assigned to the FIB table's bridge-domain.";
206 "Static entries cannot be overridden by mac learning.";
212 "L2 FIB action. For filter action, entry must be configured as static.";
214 leaf bridged-virtual-interface {
215 when "../action = 'forward'";
217 config false; // FIXME setting bvi is currently not supported by VPP's binary api
223 grouping tap-interface-base-attributes {
226 pattern "[a-zA-Z0-9\-;.+@$#^&*!_()=\[\]]*";
231 grouping tap-interface-config-attributes {
233 type yang:phys-address;
235 description "Mac address to be set for the tap interface. Random will be used if not configured";
238 leaf device-instance {
241 description "Custom device instance. Autogenerated will be used if not configured";
245 grouping ethernet-base-attributes {
253 "The size, in octets, of the largest packet that the
254 hardware interface will send and receive.";
258 grouping ethernet-state-attributes {
259 leaf manufacturer-description {
272 grouping vhost-user-interface-base-attributes {
279 type vhost-user-role;
282 description "vhost-user settings";
285 grouping vhost-user-interface-state-attributes {
290 leaf virtio-net-hdr-size {
294 leaf num-memory-regions {
304 grouping vxlan-base-attributes {
305 // FIXME: this should be in an vxlan-specific extension
308 type inet:ip-address;
312 type inet:ip-address;
323 grouping gre-base-attributes {
326 type inet:ip-address;
330 type inet:ip-address;
337 grouping vxlan-gpe-base-attributes {
340 type inet:ip-address;
344 type inet:ip-address;
351 type vxlan-gpe-next-protocol;
361 grouping l2-base-attributes {
363 "Parameters for configuring Layer2 features on interfaces.";
365 choice interconnection {
366 case xconnect-based {
367 leaf xconnect-outgoing-interface {
368 /* Don't allow selection of this interface */
369 must "../../if:name != current()";
370 type if:interface-ref; // todo use interface-state-ref for operational data?
377 type bridge-domain-ref;
380 "Interfaces in a bridge-domain forward packets to other
381 interfaces in the same bridge-domain based on
382 destination mac address.";
384 leaf split-horizon-group {
385 when "../bridge-domain";
389 default 0; //no split horizon group
391 "Interface's split-horizon group. Interfaces in the same
392 bridge-domain and split-horizon group can not forward
393 packets between each other. ";
395 leaf bridged-virtual-interface {
396 when "../bridge-domain";
400 "Interface forward packets in the bridge-domain
401 associated with the BVI.";
407 grouping proxy-arp-attributes {
409 "Parameters for configuring Proxy ARP on interfaces.";
416 type inet:ipv4-address;
419 type inet:ipv4-address;
423 augment /if:interfaces/if:interface {
424 ext:augment-identifier "vpp-interface-augmentation";
426 // FIXME using ietf-interfaces model for vpp interfaces makes it hard to implement because:
427 // 1. The link between interface type and this augmentation is unclear
428 // 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
429 // 3. The ietf-interfaces model does not define groupings which makes types reuse difficult
432 when "../if:type = 'v3po:tap'";
433 uses tap-interface-base-attributes;
434 uses tap-interface-config-attributes;
438 when "../if:type = 'ianaift:ethernetCsmacd'";
439 uses ethernet-base-attributes;
443 leaf vrf-id { // todo no routing info for oper, is it possible to get it from the vpp?
449 container vhost-user {
450 when "../if:type = 'v3po:vhost-user'";
451 uses vhost-user-interface-base-attributes;
455 when "../if:type = 'v3po:vxlan-tunnel'";
456 uses vxlan-base-attributes;
460 when "../if:type = 'v3po:gre-tunnel'";
461 uses gre-base-attributes;
465 must "(not (../if:ipv4[if:enabled = 'true']/if:address/if:ip) and " +
466 "not (../if:ipv6[if:enabled = 'true']/if:address/if:ip))";
468 uses l2-base-attributes;
471 container vxlan-gpe {
472 when "../if:type = 'v3po:vxlan-gpe-tunnel'";
474 uses vxlan-gpe-base-attributes;
477 container proxy-arp {
478 uses proxy-arp-attributes;
483 uses vpp-acl:acl-base-attributes;
486 uses vpp-acl:acl-base-attributes;
492 uses vpp-acl:ietf-acl-base-attributes;
495 uses vpp-acl:ietf-acl-base-attributes;
504 container bridge-domains {
512 uses bridge-domain-attributes;
513 uses l2-fib-attributes;
516 "bridge-domain configuration";
521 augment /if:interfaces-state/if:interface {
522 ext:augment-identifier "vpp-interface-state-augmentation";
529 when "../if:type = 'v3po:tap'";
530 uses tap-interface-base-attributes;
534 when "../if:type = 'ianaift:ethernetCsmacd'";
535 uses ethernet-base-attributes;
536 uses ethernet-state-attributes;
539 container vhost-user {
540 when "../if:type = 'v3po:vhost-user'";
541 uses vhost-user-interface-base-attributes;
542 uses vhost-user-interface-state-attributes;
546 when "../if:type = 'v3po:vxlan-tunnel'";
547 uses vxlan-base-attributes;
549 container vxlan-gpe {
550 when "../if:type = 'v3po:vxlan-gpe-tunnel'";
552 uses vxlan-gpe-base-attributes;
556 when "../if:type = 'gre-tunnel'";
557 uses gre-base-attributes;
561 must "(not (../if:ipv4[if:enabled = 'true']/if:address/if:ip) and " +
562 "not (../if:ipv6[if:enabled = 'true']/if:address/if:ip))";
564 uses l2-base-attributes;
567 container proxy-arp {
568 uses proxy-arp-attributes;
573 uses vpp-acl:acl-base-attributes;
576 uses vpp-acl:acl-base-attributes;
582 uses vpp-acl:ietf-acl-base-attributes;
585 uses vpp-acl:ietf-acl-base-attributes;
590 augment /if:interfaces-state/if:interface/if:statistics {
591 ext:augment-identifier "vpp-interface-statistics-augmentation";
592 leaf in-errors-no-buf {
595 leaf in-errors-miss {
598 leaf out-discards-fifo-full {
603 container vpp-state {
607 "VPP operational data";
609 container bridge-domains {
610 // FIXME: Should this live in bridge-domain.yang in a modular fashion ?
618 uses bridge-domain-attributes;
619 uses l2-fib-attributes;
622 "bridge-domain operational data";
630 leaf build-directory {
646 typedef interface-status {
657 typedef interface-name-or-index {
664 notification interface-state-change {
666 type interface-name-or-index;
670 type interface-status;
674 type interface-status;
678 notification interface-deleted {
680 type interface-name-or-index;