summaryrefslogtreecommitdiffstats
path: root/v3po/api
diff options
context:
space:
mode:
authorJan Srnicek <jsrnicek@cisco.com>2017-06-09 08:49:00 +0200
committerMarek Gradzki <mgradzki@cisco.com>2017-06-12 11:03:27 +0000
commit16ff1423e52d6ebd174cac867ea91c10750b9389 (patch)
treede50b209f1b2a2411d3bf3e316aaee98a5db3981 /v3po/api
parent2473ca2213719eafb812681b620ccd09957ff3a8 (diff)
HONEYCOMB-298 - Elimination of config path leafrefs in operational tree
Change-Id: I9fc035df3c90be8a5f17e4a31ff0005d88abbf28 Signed-off-by: Jan Srnicek <jsrnicek@cisco.com>
Diffstat (limited to 'v3po/api')
-rw-r--r--v3po/api/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/v3po/rev170607/InterfaceNameOrIndexBuilder.java (renamed from v3po/api/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/v3po/rev170315/InterfaceNameOrIndexBuilder.java)2
-rw-r--r--v3po/api/src/main/yang/subinterface-span.yang6
-rw-r--r--v3po/api/src/main/yang/v3po.yang113
-rw-r--r--v3po/api/src/main/yang/vpp-vlan.yang27
4 files changed, 109 insertions, 39 deletions
diff --git a/v3po/api/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/v3po/rev170315/InterfaceNameOrIndexBuilder.java b/v3po/api/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/v3po/rev170607/InterfaceNameOrIndexBuilder.java
index bc346f6b5..046736742 100644
--- a/v3po/api/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/v3po/rev170315/InterfaceNameOrIndexBuilder.java
+++ b/v3po/api/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/v3po/rev170607/InterfaceNameOrIndexBuilder.java
@@ -1,4 +1,4 @@
-package org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev170315;
+package org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev170607;
/**
diff --git a/v3po/api/src/main/yang/subinterface-span.yang b/v3po/api/src/main/yang/subinterface-span.yang
index 74d33f57c..9308c5d4a 100644
--- a/v3po/api/src/main/yang/subinterface-span.yang
+++ b/v3po/api/src/main/yang/subinterface-span.yang
@@ -11,6 +11,10 @@ module subinterface-span {
- Src: interface |Dst: subinterface - covered by this model";
}
+ revision "2017-06-07" {
+ description "Eliminated config leafrefs in operational tree";
+ }
+
import v3po {
prefix "v3po";
}
@@ -34,7 +38,7 @@ module subinterface-span {
augment /if:interfaces-state/if:interface/vpp-vlan:sub-interfaces/vpp-vlan:sub-interface {
ext:augment-identifier "vpp-subinterface-span-state-augmentation";
container span-state {
- uses v3po:span-attributes;
+ uses v3po:span-state-attributes;
}
}
} \ No newline at end of file
diff --git a/v3po/api/src/main/yang/v3po.yang b/v3po/api/src/main/yang/v3po.yang
index 7fc1999fa..7ef5d8876 100644
--- a/v3po/api/src/main/yang/v3po.yang
+++ b/v3po/api/src/main/yang/v3po.yang
@@ -22,6 +22,11 @@ module v3po {
- added support for port mirroring";
}
+ revision "2017-06-07" {
+ description "Eliminated config leafrefs in operational tree";
+ }
+
+
revision "2015-01-05" {
description "Initial revision of v3po model";
}
@@ -465,7 +470,7 @@ module v3po {
}
}
- grouping l2-base-attributes {
+ grouping l2-config-attributes {
description
"Parameters for configuring Layer2 features on interfaces.";
@@ -474,43 +479,67 @@ module v3po {
leaf xconnect-outgoing-interface {
/* Don't allow selection of this interface */
must "../../if:name != current()";
- type if:interface-ref; // todo use interface-state-ref for operational data?
+ type if:interface-ref;
description
"L2 xconnect mode";
}
}
case bridge-based {
- leaf bridge-domain {
- type bridge-domain-ref;
- mandatory true;
- description
- "Interfaces in a bridge-domain forward packets to other
- interfaces in the same bridge-domain based on
- destination mac address.";
- }
- leaf split-horizon-group {
- when "../bridge-domain";
- type uint8 {
- range "0..255";
- }
- default 0; //no split horizon group
- description
- "Interface's split-horizon group. Interfaces in the same
- bridge-domain and split-horizon group can not forward
- packets between each other. ";
- }
- leaf bridged-virtual-interface {
- when "../bridge-domain";
- type boolean;
- default false;
- description
- "Interface forward packets in the bridge-domain
- associated with the BVI.";
- }
+ uses bridge-based-attributes;
}
}
}
+ grouping l2-state-attributes {
+ description
+ "Parameters for configuring Layer2 features on interfaces.";
+
+ choice interconnection {
+ case xconnect-based {
+ leaf xconnect-outgoing-interface {
+ /* Don't allow selection of this interface */
+ must "../../if:name != current()";
+ type if:interface-state-ref;
+ description
+ "L2 xconnect mode";
+ }
+ }
+ case bridge-based {
+ uses bridge-based-attributes;
+ }
+ }
+ }
+
+ grouping bridge-based-attributes {
+ leaf bridge-domain {
+ type bridge-domain-ref;
+ mandatory true;
+ description
+ "Interfaces in a bridge-domain forward packets to other
+ interfaces in the same bridge-domain based on
+ destination mac address.";
+ }
+ leaf split-horizon-group {
+ when "../bridge-domain";
+ type uint8 {
+ range "0..255";
+ }
+ default 0; //no split horizon group
+ description
+ "Interface's split-horizon group. Interfaces in the same
+ bridge-domain and split-horizon group can not forward
+ packets between each other. ";
+ }
+ leaf bridged-virtual-interface {
+ when "../bridge-domain";
+ type boolean;
+ default false;
+ description
+ "Interface forward packets in the bridge-domain
+ associated with the BVI.";
+ }
+ }
+
grouping span-attributes {
description "Parameters of the SPAN feature";
@@ -518,7 +547,7 @@ module v3po {
list mirrored-interface {
key "iface-ref";
leaf iface-ref {
- type if:interface-ref; // todo use interface-state-ref for operational data?
+ type if:interface-ref;
}
leaf state {
@@ -529,6 +558,24 @@ module v3po {
}
}
+ grouping span-state-attributes {
+ description "Parameters of the SPAN feature";
+
+ container mirrored-interfaces {
+ list mirrored-interface {
+ key "iface-ref";
+ leaf iface-ref {
+ type if:interface-state-ref;
+ }
+
+ leaf state {
+ type span-state;
+ mandatory true;
+ }
+ }
+ }
+ }
+
augment /if:interfaces/if:interface {
ext:augment-identifier "vpp-interface-augmentation";
@@ -579,7 +626,7 @@ module v3po {
"(not (../if:ipv4[if:enabled = 'true']/if:address/if:ip) and " +
"not (../if:ipv6[if:enabled = 'true']/if:address/if:ip))";
- uses l2-base-attributes;
+ uses l2-config-attributes;
}
container vxlan-gpe {
@@ -658,11 +705,11 @@ module v3po {
"(not (../if:ipv4[if:enabled = 'true']/if:address/if:ip) and " +
"not (../if:ipv6[if:enabled = 'true']/if:address/if:ip))";
- uses l2-base-attributes;
+ uses l2-state-attributes;
}
container span {
- uses span-attributes;
+ uses span-state-attributes;
}
}
diff --git a/v3po/api/src/main/yang/vpp-vlan.yang b/v3po/api/src/main/yang/vpp-vlan.yang
index 7f8139c4a..5999a2850 100644
--- a/v3po/api/src/main/yang/vpp-vlan.yang
+++ b/v3po/api/src/main/yang/vpp-vlan.yang
@@ -26,6 +26,10 @@ module vpp-vlan {
Reuses some concepts from draft-wilton-netmod-intf-vlan-yang-02 model.";
}
+ revision "2017-06-07" {
+ description "Eliminated config leafrefs in operational tree";
+ }
+
import ietf-interfaces {
prefix "if";
}
@@ -168,12 +172,25 @@ module vpp-vlan {
"The match used to classify frames to this interface";
uses match-attributes;
}
+ }
- container l2 {
- uses v3po:l2-base-attributes;
- container rewrite {
+ grouping rewrite-attributes {
+ container rewrite {
uses tag-rewrite;
- }
+ }
+ }
+
+ grouping sub-interface-l2-config-attributes {
+ container l2 {
+ uses v3po:l2-config-attributes;
+ uses rewrite-attributes;
+ }
+ }
+
+ grouping sub-interface-l2-state-attributes {
+ container l2 {
+ uses v3po:l2-state-attributes;
+ uses rewrite-attributes;
}
}
@@ -414,6 +431,7 @@ module vpp-vlan {
uses sub-interface-ip4-attributes;
uses sub-interface-ip6-attributes;
uses sub-interface-routing-attributes;
+ uses sub-interface-l2-config-attributes;
}
}
}
@@ -435,6 +453,7 @@ module vpp-vlan {
uses sub-interface-ip4-attributes;
uses sub-interface-ip6-attributes;
uses sub-interface-routing-attributes;
+ uses sub-interface-l2-state-attributes;
}
}
}