diff options
author | Marek Gradzki <mgradzki@cisco.com> | 2016-05-27 12:11:39 +0200 |
---|---|---|
committer | Marek Gradzki <mgradzki@cisco.com> | 2016-06-06 12:51:48 +0000 |
commit | a54aa10434f8a1d08c01c015006cdf0077c8f54c (patch) | |
tree | 036b234104be1e3a9fda6fa44f6fc3963867d0e7 | |
parent | 98a8729ed67d997caa70c91c8695779c94f9a073 (diff) |
Vlan alternative model
Change-Id: I0dcb535338495b4bb858adf2e2fe1b78cf85c498
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
16 files changed, 583 insertions, 32 deletions
diff --git a/v3po/api/src/main/java/org/opendaylight/yang/gen/v1/urn/ieee/params/xml/ns/yang/dot1q/types/rev150626/dot1q/tag/or/any/Dot1qTagVlanIdBuilder.java b/v3po/api/src/main/java/org/opendaylight/yang/gen/v1/urn/ieee/params/xml/ns/yang/dot1q/types/rev150626/dot1q/tag/or/any/Dot1qTagVlanIdBuilder.java new file mode 100644 index 000000000..0efe2807d --- /dev/null +++ b/v3po/api/src/main/java/org/opendaylight/yang/gen/v1/urn/ieee/params/xml/ns/yang/dot1q/types/rev150626/dot1q/tag/or/any/Dot1qTagVlanIdBuilder.java @@ -0,0 +1,20 @@ +package org.opendaylight.yang.gen.v1.urn.ieee.params.xml.ns.yang.dot1q.types.rev150626.dot1q.tag.or.any; +import org.opendaylight.yang.gen.v1.urn.ieee.params.xml.ns.yang.dot1q.types.rev150626.dot1q.tag.or.any.Dot1qTag.VlanId; + + +/** + * The purpose of generated class in src/main/java for Union types is to create new instances of unions from a string representation. + * In some cases it is very difficult to automate it since there can be unions such as (uint32 - uint16), or (string - uint32). + * + * The reason behind putting it under src/main/java is: + * This class is generated in form of a stub and needs to be finished by the user. This class is generated only once to prevent + * loss of user code. + * + */ +public class Dot1qTagVlanIdBuilder { + + public static VlanId getDefaultInstance(java.lang.String defaultValue) { + throw new java.lang.UnsupportedOperationException("Not yet implemented"); + } + +} diff --git a/v3po/api/src/main/java/org/opendaylight/yang/gen/v1/urn/ieee/params/xml/ns/yang/dot1q/types/rev150626/dot1q/tag/ranges/or/any/Dot1qTagVlanIdBuilder.java b/v3po/api/src/main/java/org/opendaylight/yang/gen/v1/urn/ieee/params/xml/ns/yang/dot1q/types/rev150626/dot1q/tag/ranges/or/any/Dot1qTagVlanIdBuilder.java new file mode 100644 index 000000000..685f609ae --- /dev/null +++ b/v3po/api/src/main/java/org/opendaylight/yang/gen/v1/urn/ieee/params/xml/ns/yang/dot1q/types/rev150626/dot1q/tag/ranges/or/any/Dot1qTagVlanIdBuilder.java @@ -0,0 +1,20 @@ +package org.opendaylight.yang.gen.v1.urn.ieee.params.xml.ns.yang.dot1q.types.rev150626.dot1q.tag.ranges.or.any; +import org.opendaylight.yang.gen.v1.urn.ieee.params.xml.ns.yang.dot1q.types.rev150626.dot1q.tag.ranges.or.any.Dot1qTag.VlanId; + + +/** + * The purpose of generated class in src/main/java for Union types is to create new instances of unions from a string representation. + * In some cases it is very difficult to automate it since there can be unions such as (uint32 - uint16), or (string - uint32). + * + * The reason behind putting it under src/main/java is: + * This class is generated in form of a stub and needs to be finished by the user. This class is generated only once to prevent + * loss of user code. + * + */ +public class Dot1qTagVlanIdBuilder { + + public static VlanId getDefaultInstance(java.lang.String defaultValue) { + throw new java.lang.UnsupportedOperationException("Not yet implemented"); + } + +} diff --git a/v3po/api/src/main/yang/dot1q-types.yang b/v3po/api/src/main/yang/dot1q-types.yang new file mode 100644 index 000000000..594b9d6ce --- /dev/null +++ b/v3po/api/src/main/yang/dot1q-types.yang @@ -0,0 +1,237 @@ +module dot1q-types { + namespace "urn:ieee:params:xml:ns:yang:dot1q-types"; + prefix dot1q; + + organization + "Cisco Systems, Inc. + Customer Service + + Postal: 170 W Tasman Drive + San Jose, CA 95134 + + Tel: +1 1800 553-NETS + + E-mail: cs-yang@cisco.com"; + + contact + "Robert Wilton - rwilton@cisco.com"; + + description + "This module contains a collection of generally useful YANG types + that are specific to 802.1Q VLANs that can be usefully shared + between multiple models. + + Terms and Acronyms + + 802.1Q: IEEE 802.1Q VLANs + + VLAN (vlan): Virtual Local Area Network + "; + + revision 2015-06-26 { + description "Latest revision, changed namespace"; + + reference "Intended to be standardized IEEE 802.1"; + } + + typedef PCP { + type uint8 { + range "0..7"; + } + description + "Priority Code Point. PCP is a 3-bit field that refers to the + class of service applied to an 802.1Q VLAN tagged frame. The + field specifies a priority value between 0 and 7, these values + can be used by quality of service (QoS) to prioritize + different classes of traffic."; + reference "IEEE 802.1Q (2014)"; + } + + /* + * Defines what it means to be an 802.1Q VLAN Id, where values 0 + * and 4095 are reserved. + */ + typedef dot1q-vlan-id { + type uint16 { + range "1..4094"; + } + description "An 802.1Q VLAN Identifier"; + reference "IEEE 802.1Q (2014)"; + } + + /* + * Defines the supported IEEE 802.1Q types that can be used for + * VLAN tag matching. + */ + identity dot1q-tag-vlan-type { + description "Base identity from which all 802.1Q VLAN tag types + are derived from"; + } + + identity c-vlan { + base dot1q-tag-vlan-type; + description + "An 802.1Q Customer-VLAN tag, normally using the 0x8100 + Ethertype"; + } + + identity s-vlan { + base dot1q-tag-vlan-type; + description + "An 802.1Q Service-VLAN tag, using the 0x88a8 Ethertype + originally introduced in 802.1ad, and incorporated into + 802.1Q (2011)"; + } + + typedef dot1q-tag-type { + type identityref { + base "dot1q-tag-vlan-type"; + } + description "Identifies a specific 802.1Q tag type"; + reference "IEEE 802.1Q (2014)"; + } + + /* + * Defines the type used to represent ranges of VLAN Ids. + * + * Ideally we would model that as a list of VLAN Ids in YANG, but + * the model is easier to use if this is just represented as a + * string. + * + * This type is used to match an ordered list of VLAN Ids, or + * contiguous ranges of VLAN Ids. Valid VLAN Ids must be in the + * range 1 to 4094, and included in the list in non overlapping + * ascending order. + * + * E.g. "1, 10-100, 50, 500-1000" + */ + typedef dot1q-vlan-id-ranges { + type string { + pattern "([0-9]{1,4}(-[0-9]{1,4})?(,[0-9]{1,4}" + + "(-[0-9]{1,4})?)*)"; + } + description "A list of VLAN Ids, or non overlapping VLAN ranges, + in ascending order, between 1 and 4094"; + } + + /* + * A grouping which represents an 802.1Q VLAN tag, matching both + * the tag Ethertype and a single VLAN Id. The PCP and DEI fields + * in the 802.1Q tag are ignored for tag matching purposes. + */ + grouping dot1q-tag { + description "Grouping to allow configuration to identify a single + 802.1Q VLAN tag"; + container dot1q-tag { + description "Identifies an 802.1Q VLAN tag with an explicit + tag-type and a single VLAN Id"; + leaf tag-type { + type dot1q-tag-type; + mandatory true; + description "VLAN tag type"; + } + leaf vlan-id { + type dot1q-vlan-id; + mandatory true; + description "VLAN Id"; + } + } + } + + /* + * A grouping which represents an 802.1Q VLAN tag, matching both + * the tag Ethertype and a single VLAN Id or "any" to match on any + * VLAN Id. The PCP and DEI fields in the 802.1Q tag are ignored + * for tag matching purposes. + */ + grouping dot1q-tag-or-any { + description "Grouping to allow configuration to identify a single + 802.1Q VLAN tag or the 'any' value to match any VLAN + Id not matched by a more specific VLAN Id match"; + container dot1q-tag { + description "Identifies an 802.1Q VLAN tag with an explicit + tag-type and a single VLAN Id, or 'any' VLAN Id"; + leaf tag-type { + type dot1q-tag-type; + mandatory true; + description "VLAN tag type"; + } + leaf vlan-id { + type union { + type dot1q-vlan-id; + type enumeration { + enum "any" { + value 4096; + description + "Matches 'any' VLAN tag in the range 1 to 4094 that + is not matched by a more specific VLAN Id match"; + } + } + } + mandatory true; + description "VLAN Id or any"; + } + } + } + + /* + * A grouping which represents an 802.1Q tag that matches a range + * of VLAN Ids. The PCP and DEI fields in the 802.1Q tag are + * ignored for tag matching purposes. + */ + grouping dot1q-tag-ranges { + description "Grouping to allow configuration to identify an + 802.1Q VLAN tag that matches any VLAN Id within a + set of non overlapping VLAN Id ranges"; + container dot1q-tag { + description "Identifies an 802.1Q VLAN tag with an explicit + tag-type and and a range of VLAN Ids"; + leaf tag-type { + type dot1q-tag-type; + mandatory true; + description "VLAN tag type"; + } + leaf vlan-ids { + type dot1q-vlan-id-ranges; + mandatory true; + description "VLAN Ids"; + } + } + } + + /* + * A grouping which represents an 802.1Q VLAN tag, matching both + * the tag Ethertype and a single VLAN Id, ordered list of ranges, + * or "any" to match on any VLAN Id. The PCP and DEI fields in the + * 802.1Q tag are ignored for tag matching purposes. + */ + grouping dot1q-tag-ranges-or-any { + description "Grouping to allow configuration to identify an + 802.1Q VLAN tag that matches any specific VLAN Id + within a set of non overlapping VLAN Id ranges, or + the 'any' value to match any VLAN Id"; + container dot1q-tag { + description "Identifies an 802.1Q VLAN tag with an explicit + tag-type, an ordered list of VLAN Id ranges, or + 'any' VLAN Id"; + leaf tag-type { + type dot1q-tag-type; + mandatory true; + description "VLAN tag type"; + } + leaf vlan-id { + type union { + type dot1q-vlan-id-ranges; + type enumeration { + enum "any" { + description "Matches 'any' VLAN tag in the range 1 to + 4094"; + } + } + } + mandatory true; + description "VLAN Ids or any"; + } + } + } +}
\ 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 c1210a923..86a2764b8 100644 --- a/v3po/api/src/main/yang/v3po.yang +++ b/v3po/api/src/main/yang/v3po.yang @@ -49,6 +49,7 @@ module v3po { } } + // todo remove from v3po typedef tag-rewrite-operation { type enumeration { enum disabled; @@ -149,6 +150,7 @@ module v3po { } } + // todo remove from v3po grouping sub-interface-base-attributes { leaf identifier { type uint32; @@ -322,7 +324,7 @@ module v3po { } } - grouping l2-attributes { + grouping l2-base-attributes { description "Parameters for configuring Layer2 features on interfaces."; @@ -365,9 +367,6 @@ module v3po { } } } - container vlan-tag-rewrite { // todo valid only for sub-interfaces - uses vlan-tag-rewrite-attributes; - } } augment /if:interfaces/if:interface { @@ -418,7 +417,11 @@ module v3po { must "(not (../if:ipv4[if:enabled = 'true']/if:address/if:ip) and " + "not (../if:ipv6[if:enabled = 'true']/if:address/if:ip))"; - uses l2-attributes; + uses l2-base-attributes; + + container vlan-tag-rewrite { + uses vlan-tag-rewrite-attributes; + } } container vxlan-gpe { @@ -511,7 +514,11 @@ module v3po { must "(not (../if:ipv4[if:enabled = 'true']/if:address/if:ip) and " + "not (../if:ipv6[if:enabled = 'true']/if:address/if:ip))"; - uses l2-attributes; + uses l2-base-attributes; + + container vlan-tag-rewrite { + uses vlan-tag-rewrite-attributes; + } } } diff --git a/v3po/api/src/main/yang/vpp-vlan.yang b/v3po/api/src/main/yang/vpp-vlan.yang new file mode 100644 index 000000000..a0ce5f91f --- /dev/null +++ b/v3po/api/src/main/yang/vpp-vlan.yang @@ -0,0 +1,267 @@ +module vpp-vlan { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:vpp:vlan"; + prefix "vpp-vlan"; + + revision "2015-05-27" { + description + "Initial revision of vlan model for VPP. + Reuses some concepts from draft-wilton-netmod-intf-vlan-yang-02 model."; + } + + import ietf-interfaces { + prefix "if"; + } + import ietf-yang-types { + prefix "yang"; + } + import yang-ext { + prefix "ext"; + } + import dot1q-types { + prefix dot1q; + } + import v3po { + prefix v3po; + } + + typedef sub-interface-status { + type enumeration { + enum "up"; + enum "down"; + } + } + + grouping match-attributes { + choice match-type { + mandatory true; + description "Provides a choice of how the frames may be matched"; + + case default { + description "Default match"; + leaf default { + type empty; + description + "Default match. Matches all traffic not matched to any + other peer sub-interface by a more specific + encapsulation."; + } // leaf default + } // case default + + case untagged { + description "Match untagged Ethernet frames only"; + leaf untagged { + type empty; + description + "Untagged match. Matches all untagged traffic."; + } // leaf untagged + } // case untagged + + case vlan-tagged { + container vlan-tagged { + description "Matches VLAN tagged frames"; + list tag { + key "index"; + min-elements 1; + max-elements 2; + description "The tags to match, with the outermost tag to + match assigned index 0"; + leaf index { + type uint8 { + range "0..1"; + } + + must "index = 0 or + count(../../tag[index = 0]/index) > 0" { + error-message "An inner tag can only be matched on + when also matching on an outer tag"; + description "Only allow matching on an inner tag, if + also matching on the outer tags at the + same time"; + } + description + "The index into the tag stack, outermost tag first"; + } + + uses dot1q:dot1q-tag-or-any; + } + + leaf match-exact-tags { + type boolean; + default true; + description + "If set, indicates that all 802.1Q VLAN tags in the + Ethernet frame header must be explicitly matched, i.e. + the EtherType following the matched tags must not be a + 802.1Q tag EtherType. If unset then extra 802.1Q VLAN + tags are allowed."; + } + } // container vlan-tagged + } // case vlan-tagged + } + } + + // TODO VPP does not allow to change subinterface nor delete it (except for tag-rewrite operation) + grouping sub-interface-base-attributes { + container tags { + list tag { + key "index"; + max-elements 2; + + description "The VLAN tags to use by locally sourced traffic"; + + leaf index { + type uint8 { + range "0..1"; + } + + /* + * Only allow a push of an inner tag if an outer tag is also + * being pushed. + */ + must "index != 0 or + count(../../push-tags[index = 0]/index) > 0" { + error-message "An inner tag can only be pushed if an outer + tag is also specified"; + description "Only allow a push of an inner tag if an outer + tag is also being pushed"; + } + description "The index into the tag stack"; + } + + uses dot1q:dot1q-tag; + + } + } + + container match { + description + "The match used to classify frames to this interface"; + uses match-attributes; + } + + container l2 { + uses v3po:l2-base-attributes; + container rewrite { + uses tag-rewrite; + } + } + } + + grouping sub-interface-config-attributes { + leaf enabled { + type boolean; + default "false"; + description + "Contains the configured, desired state of the sub-interface. + To enable sub-interface, the super inerface needs to be enabled"; + } + } + + grouping sub-interface-operational-attributes { + leaf admin-status { + type sub-interface-status; + mandatory true; + } + leaf oper-status { + type sub-interface-status; + mandatory true; + } + leaf if-index { + type int32 { + range "1..2147483647"; + } + mandatory true; + } + leaf phys-address { + type yang:phys-address; + description + "The sub-interface's Media Access Control (MAC) address."; + } + leaf speed { + type yang:gauge64; + units "bits/second"; + } + } + + /* + * Only symetrical rewrite is supported + */ + grouping tag-rewrite { + description "Flexible rewrite"; + leaf pop-tags { + type uint8 { + range 1..2; + } + description "The number of tags to pop (or translate if used in + conjunction with push-tags)"; + } + + list push-tags { + key "index"; + max-elements 2; + description "The number of tags to push (or translate if used + in conjunction with pop-tags)"; + /* + * Server should order by increasing index. + */ + leaf index { + type uint8 { + range 0..1; + } + + /* + * Only allow a push of an inner tag if an outer tag is also + * being pushed. + */ + must "index != 0 or + count(../../push-tags[index = 0]/index) > 0" { + error-message "An inner tag can only be pushed if an outer + tag is also specified"; + description "Only allow a push of an inner tag if an outer + tag is also being pushed"; + } + } + + uses dot1q:dot1q-tag; + } + } + + augment /if:interfaces/if:interface { + ext:augment-identifier "subinterface-augmentation"; + + container sub-interfaces { + description "L2 vlan subinterfaces"; + + + list sub-interface { + key "identifier"; + leaf identifier { + type uint32; + } + + uses sub-interface-base-attributes; + uses sub-interface-config-attributes; + } + } + } + + augment /if:interfaces-state/if:interface { + ext:augment-identifier "subinterface-state-augmentation"; + + container sub-interfaces { + description "L2 vlan subinterfaces"; + + list sub-interface { + key "identifier"; + leaf identifier { + type uint32; + } + + uses sub-interface-base-attributes; + uses sub-interface-operational-attributes; + } + } + } + +} diff --git a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/v3po/translate/v3po/initializers/InterfacesInitializer.java b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/v3po/translate/v3po/initializers/InterfacesInitializer.java index 38ab58af1..db3d540c7 100644 --- a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/v3po/translate/v3po/initializers/InterfacesInitializer.java +++ b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/v3po/translate/v3po/initializers/InterfacesInitializer.java @@ -39,6 +39,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces._interface.VhostUserBuilder; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces._interface.VxlanBuilder; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces._interface.VxlanGpeBuilder; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces._interface.l2.VlanTagRewriteBuilder; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces.state._interface.Ethernet; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces.state._interface.L2; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces.state._interface.SubInterface; @@ -46,13 +47,12 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces.state._interface.VhostUser; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces.state._interface.Vxlan; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces.state._interface.VxlanGpe; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.l2.attributes.Interconnection; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.l2.attributes.VlanTagRewrite; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.l2.attributes.VlanTagRewriteBuilder; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.l2.attributes.interconnection.BridgeBased; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.l2.attributes.interconnection.BridgeBasedBuilder; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.l2.attributes.interconnection.XconnectBased; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.l2.attributes.interconnection.XconnectBasedBuilder; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces.state._interface.l2.VlanTagRewrite; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.l2.base.attributes.Interconnection; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.l2.base.attributes.interconnection.BridgeBased; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.l2.base.attributes.interconnection.BridgeBasedBuilder; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.l2.base.attributes.interconnection.XconnectBased; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.l2.base.attributes.interconnection.XconnectBasedBuilder; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/v3po/translate/v3po/interfaces/L2Customizer.java b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/v3po/translate/v3po/interfaces/L2Customizer.java index e716749bd..ccb54b3c4 100644 --- a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/v3po/translate/v3po/interfaces/L2Customizer.java +++ b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/v3po/translate/v3po/interfaces/L2Customizer.java @@ -31,9 +31,9 @@ import javax.annotation.Nonnull; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.VppInterfaceAugmentation; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces._interface.L2; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.l2.attributes.Interconnection; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.l2.attributes.interconnection.BridgeBased; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.l2.attributes.interconnection.XconnectBased; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.l2.base.attributes.Interconnection; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.l2.base.attributes.interconnection.BridgeBased; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.l2.base.attributes.interconnection.XconnectBased; import org.opendaylight.yangtools.yang.binding.DataObject; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.openvpp.jvpp.dto.SwInterfaceSetL2Bridge; diff --git a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/v3po/translate/v3po/interfaces/VlanTagRewriteCustomizer.java b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/v3po/translate/v3po/interfaces/VlanTagRewriteCustomizer.java index f72148dec..721d15530 100644 --- a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/v3po/translate/v3po/interfaces/VlanTagRewriteCustomizer.java +++ b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/v3po/translate/v3po/interfaces/VlanTagRewriteCustomizer.java @@ -33,8 +33,8 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.VlanTag; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.VlanType; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces._interface.L2; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.l2.attributes.VlanTagRewrite; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.l2.attributes.VlanTagRewriteBuilder; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces._interface.l2.VlanTagRewrite; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces._interface.l2.VlanTagRewriteBuilder; import org.opendaylight.yangtools.yang.binding.DataObject; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.openvpp.jvpp.dto.L2InterfaceVlanTagRewrite; diff --git a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/v3po/translate/v3po/interfacesstate/L2Customizer.java b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/v3po/translate/v3po/interfacesstate/L2Customizer.java index 3390ed3d1..3fae8c713 100644 --- a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/v3po/translate/v3po/interfacesstate/L2Customizer.java +++ b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/v3po/translate/v3po/interfacesstate/L2Customizer.java @@ -33,7 +33,7 @@ import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces. import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.VppInterfaceStateAugmentationBuilder; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces.state._interface.L2; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces.state._interface.L2Builder; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.l2.attributes.interconnection.BridgeBasedBuilder; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.l2.base.attributes.interconnection.BridgeBasedBuilder; import org.opendaylight.yangtools.concepts.Builder; import org.opendaylight.yangtools.yang.binding.DataObject; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; diff --git a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/v3po/translate/v3po/interfacesstate/VlanTagRewriteCustomizer.java b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/v3po/translate/v3po/interfacesstate/VlanTagRewriteCustomizer.java index 20429253f..ac180719c 100644 --- a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/v3po/translate/v3po/interfacesstate/VlanTagRewriteCustomizer.java +++ b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/v3po/translate/v3po/interfacesstate/VlanTagRewriteCustomizer.java @@ -32,8 +32,8 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.VlanTag; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.VlanType; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces.state._interface.L2Builder; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.l2.attributes.VlanTagRewrite; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.l2.attributes.VlanTagRewriteBuilder; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces.state._interface.l2.VlanTagRewrite; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces.state._interface.l2.VlanTagRewriteBuilder; import org.opendaylight.yangtools.concepts.Builder; import org.opendaylight.yangtools.yang.binding.DataObject; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; diff --git a/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/InterfacesHoneycombWriterModule.java b/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/InterfacesHoneycombWriterModule.java index 4a1e7f0dd..65eccd575 100644 --- a/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/InterfacesHoneycombWriterModule.java +++ b/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/InterfacesHoneycombWriterModule.java @@ -39,7 +39,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces._interface.VhostUser; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces._interface.Vxlan; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces._interface.VxlanGpe; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.l2.attributes.VlanTagRewrite; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces._interface.l2.VlanTagRewrite; import org.opendaylight.yangtools.yang.binding.Augmentation; import org.opendaylight.yangtools.yang.binding.ChildOf; @@ -126,7 +126,7 @@ public class InterfacesHoneycombWriterModule extends org.opendaylight.yang.gen.v // If we use containers inside groupings, we need to cast and lose static type checking. // Can we get rid of the cast? final List<ChildWriter<? extends ChildOf<L2>>> l2ChildWriters = - Collections.singletonList((ChildWriter)vlanTagWriter); + Collections.singletonList((ChildWriter)vlanTagWriter); // TODO now the cast is not needed, move todo to one of infra classes final ChildWriter<L2> l2Writer = new CompositeChildWriter<>(L2.class, diff --git a/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/InterfacesStateHoneycombReaderModule.java b/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/InterfacesStateHoneycombReaderModule.java index 7c97abf02..2be42c9b2 100644 --- a/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/InterfacesStateHoneycombReaderModule.java +++ b/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/InterfacesStateHoneycombReaderModule.java @@ -40,7 +40,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces.state._interface.VhostUser; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces.state._interface.Vxlan; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces.state._interface.VxlanGpe; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.l2.attributes.VlanTagRewrite; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces.state._interface.l2.VlanTagRewrite; import org.opendaylight.yangtools.yang.binding.ChildOf; public class InterfacesStateHoneycombReaderModule extends @@ -95,7 +95,7 @@ public class InterfacesStateHoneycombReaderModule extends final List<ChildReader<? extends ChildOf<L2>>> l2ChildReaders = - Collections.singletonList((ChildReader)vlanTagReader); // TODO can we get rid of the cast? + Collections.singletonList(vlanTagReader); final ChildReader<? extends ChildOf<VppInterfaceStateAugmentation>> l2Reader = new CompositeChildReader<>(L2.class, l2ChildReaders, diff --git a/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/v3po/translate/v3po/interfaces/VlanTagRewriteCustomizerTest.java b/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/v3po/translate/v3po/interfaces/VlanTagRewriteCustomizerTest.java index 7d0fd40fa..6b9f52cc9 100644 --- a/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/v3po/translate/v3po/interfaces/VlanTagRewriteCustomizerTest.java +++ b/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/v3po/translate/v3po/interfaces/VlanTagRewriteCustomizerTest.java @@ -47,8 +47,8 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.VlanType; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.VppInterfaceAugmentation; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces._interface.L2; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.l2.attributes.VlanTagRewrite; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.l2.attributes.VlanTagRewriteBuilder; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces._interface.l2.VlanTagRewrite; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces._interface.l2.VlanTagRewriteBuilder; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.openvpp.jvpp.dto.L2InterfaceVlanTagRewrite; import org.openvpp.jvpp.dto.L2InterfaceVlanTagRewriteReply; diff --git a/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/v3po/translate/v3po/interfacesstate/L2CustomizerTest.java b/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/v3po/translate/v3po/interfacesstate/L2CustomizerTest.java index 45d4575cd..b3cf5ebfd 100644 --- a/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/v3po/translate/v3po/interfacesstate/L2CustomizerTest.java +++ b/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/v3po/translate/v3po/interfacesstate/L2CustomizerTest.java @@ -47,8 +47,8 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.VppInterfaceStateAugmentationBuilder; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces.state._interface.L2; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces.state._interface.L2Builder; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.l2.attributes.Interconnection; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.l2.attributes.interconnection.BridgeBasedBuilder; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.l2.base.attributes.Interconnection; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.l2.base.attributes.interconnection.BridgeBasedBuilder; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.opendaylight.yangtools.yang.binding.KeyedInstanceIdentifier; import org.openvpp.jvpp.dto.BridgeDomainDetails; diff --git a/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/v3po/translate/v3po/interfacesstate/VlanTagRewriteCustomizerTest.java b/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/v3po/translate/v3po/interfacesstate/VlanTagRewriteCustomizerTest.java index 78c9e266e..354f221d6 100644 --- a/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/v3po/translate/v3po/interfacesstate/VlanTagRewriteCustomizerTest.java +++ b/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/v3po/translate/v3po/interfacesstate/VlanTagRewriteCustomizerTest.java @@ -39,8 +39,8 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.VppInterfaceStateAugmentation; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces.state._interface.L2; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces.state._interface.L2Builder; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.l2.attributes.VlanTagRewrite; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.l2.attributes.VlanTagRewriteBuilder; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces.state._interface.l2.VlanTagRewrite; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces.state._interface.l2.VlanTagRewriteBuilder; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.openvpp.jvpp.dto.SwInterfaceDetails; diff --git a/vbd/impl/src/main/java/io/fd/honeycomb/vbd/impl/VppModifier.java b/vbd/impl/src/main/java/io/fd/honeycomb/vbd/impl/VppModifier.java index 6f3853413..cffad412d 100644 --- a/vbd/impl/src/main/java/io/fd/honeycomb/vbd/impl/VppModifier.java +++ b/vbd/impl/src/main/java/io/fd/honeycomb/vbd/impl/VppModifier.java @@ -41,7 +41,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces._interface.L2Builder; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces._interface.Vxlan; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces._interface.VxlanBuilder; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.l2.attributes.interconnection.BridgeBasedBuilder; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.l2.base.attributes.interconnection.BridgeBasedBuilder; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.vpp.BridgeDomains; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.vpp.bridge.domains.BridgeDomainBuilder; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.vpp.bridge.domains.BridgeDomainKey; |