From acf5a8a052e2f7f7c2b03c023df3dd489688cb00 Mon Sep 17 00:00:00 2001 From: Michal Cmarada Date: Mon, 28 Jan 2019 14:23:11 +0100 Subject: remove vpp deprecated tap-cli interface Change-Id: I5b78cd2c9d8250b6af691d124fd31bb1bf822fb1 Signed-off-by: Michal Cmarada --- .../hc2vpp/l3/write/factory/Ipv4WriterFactory.java | 2 +- .../hc2vpp/l3/write/factory/Ipv6WriterFactory.java | 2 +- v3po/api/src/main/yang/v3po@2018-10-08.yang | 963 --------------------- v3po/api/src/main/yang/v3po@2019-01-28.yang | 931 ++++++++++++++++++++ v3po/postman_rest_collection.json | 149 ---- .../v3po/factory/InterfacesStateReaderFactory.java | 35 +- .../v3po/factory/InterfacesWriterFactory.java | 36 +- .../v3po/factory/L2HoneycombWriterFactory.java | 12 +- .../factory/L2StateHoneycombReaderFactory.java | 12 +- .../SubinterfaceAugmentationWriterFactory.java | 4 +- ...SubinterfaceStateAugmentationReaderFactory.java | 2 +- .../hc2vpp/v3po/interfaces/AfPacketCustomizer.java | 4 +- .../hc2vpp/v3po/interfaces/EthernetCustomizer.java | 2 +- .../fd/hc2vpp/v3po/interfaces/GreCustomizer.java | 4 +- .../v3po/interfaces/InterconnectionWriteUtils.java | 6 +- .../interfaces/InterfaceRoutingCustomizer.java | 2 +- .../io/fd/hc2vpp/v3po/interfaces/L2Customizer.java | 2 +- .../hc2vpp/v3po/interfaces/LoopbackCustomizer.java | 4 +- .../hc2vpp/v3po/interfaces/RoutingCustomizer.java | 2 +- .../fd/hc2vpp/v3po/interfaces/TapCustomizer.java | 190 ---- .../fd/hc2vpp/v3po/interfaces/TapV2Customizer.java | 4 +- .../v3po/interfaces/VhostUserCustomizer.java | 6 +- .../fd/hc2vpp/v3po/interfaces/VxlanCustomizer.java | 8 +- .../hc2vpp/v3po/interfaces/VxlanGpeCustomizer.java | 4 +- .../span/MirroredInterfaceCustomizer.java | 8 +- .../v3po/interfacesstate/AfPacketCustomizer.java | 18 +- .../v3po/interfacesstate/EthernetCustomizer.java | 16 +- .../hc2vpp/v3po/interfacesstate/GreCustomizer.java | 18 +- .../interfacesstate/InterconnectionReadUtils.java | 4 +- .../interfacesstate/InterfaceDataTranslator.java | 18 +- .../InterfaceRoutingCustomizer.java | 16 +- .../hc2vpp/v3po/interfacesstate/L2Customizer.java | 28 +- .../v3po/interfacesstate/RoutingCustomizer.java | 2 +- .../interfacesstate/SubInterfaceL2Customizer.java | 8 +- .../hc2vpp/v3po/interfacesstate/TapCustomizer.java | 153 ---- .../v3po/interfacesstate/TapV2Customizer.java | 18 +- .../v3po/interfacesstate/VhostUserCustomizer.java | 20 +- .../v3po/interfacesstate/VxlanCustomizer.java | 24 +- .../v3po/interfacesstate/VxlanGpeCustomizer.java | 22 +- .../span/AbstractMirroredInterfacesCustomizer.java | 12 +- .../InterfaceMirroredInterfacesCustomizer.java | 20 +- .../SubInterfaceMirroredInterfacesCustomizer.java | 14 +- .../l2/ArpTerminationTableEntryCustomizer.java | 6 +- .../fd/hc2vpp/v3po/l2/BridgeDomainCustomizer.java | 10 +- .../io/fd/hc2vpp/v3po/l2/L2FibEntryCustomizer.java | 8 +- .../v3po/l2state/BridgeDomainCustomizer.java | 20 +- .../hc2vpp/v3po/l2state/L2FibEntryCustomizer.java | 18 +- .../InterfaceChangeNotificationProducer.java | 12 +- .../v3po/interfaces/AfPacketCustomizerTest.java | 8 +- .../v3po/interfaces/EthernetCustomizerTest.java | 6 +- .../hc2vpp/v3po/interfaces/GreCustomizerTest.java | 8 +- .../interfaces/InterfaceRoutingCustomizerTest.java | 6 +- .../hc2vpp/v3po/interfaces/L2CustomizerTest.java | 16 +- .../v3po/interfaces/LoopbackCustomizerTest.java | 8 +- .../interfaces/SubInterfaceL2CustomizerTest.java | 2 +- .../hc2vpp/v3po/interfaces/TapCustomizerTest.java | 129 --- .../v3po/interfaces/TapV2CustomizerTest.java | 8 +- .../v3po/interfaces/VhostUserCustomizerTest.java | 10 +- .../v3po/interfaces/VxlanCustomizerTest.java | 12 +- .../v3po/interfaces/VxlanGpeCustomizerTest.java | 12 +- .../span/MirroredInterfacesCustomizerTest.java | 12 +- .../interfacesstate/AfPacketCustomizerTest.java | 12 +- .../interfacesstate/EthernetCustomizerTest.java | 10 +- .../v3po/interfacesstate/GreCustomizerTest.java | 8 +- .../InterfaceDataTranslatorTest.java | 15 +- .../InterfaceRoutingCustomizerTest.java | 8 +- .../v3po/interfacesstate/L2CustomizerTest.java | 12 +- .../v3po/interfacesstate/TapCustomizerTest.java | 104 --- .../v3po/interfacesstate/TapV2CustomizerTest.java | 8 +- .../interfacesstate/VhostUserCustomizerTest.java | 10 +- .../v3po/interfacesstate/VxlanCustomizerTest.java | 10 +- .../interfacesstate/VxlanGpeCustomizerTest.java | 8 +- .../span/MirroredInterfacesCustomizerTest.java | 18 +- .../l2/ArpTerminationTableEntryCustomizerTest.java | 14 +- .../hc2vpp/v3po/l2/BridgeDomainCustomizerTest.java | 16 +- .../hc2vpp/v3po/l2/L2FibEntryCustomizerTest.java | 18 +- .../v3po/l2state/BridgeDomainCustomizerTest.java | 8 +- .../v3po/l2state/L2FibEntryCustomizerTest.java | 18 +- .../io/fd/hc2vpp/v3po/l2state/L2StateTest.java | 10 +- .../InterfaceChangeNotificationProducerTest.java | 4 +- 80 files changed, 1326 insertions(+), 2101 deletions(-) delete mode 100644 v3po/api/src/main/yang/v3po@2018-10-08.yang create mode 100644 v3po/api/src/main/yang/v3po@2019-01-28.yang delete mode 100644 v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/TapCustomizer.java delete mode 100644 v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/TapCustomizer.java delete mode 100644 v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/TapCustomizerTest.java delete mode 100644 v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfacesstate/TapCustomizerTest.java diff --git a/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/factory/Ipv4WriterFactory.java b/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/factory/Ipv4WriterFactory.java index 96a3d89af..cf256274f 100644 --- a/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/factory/Ipv4WriterFactory.java +++ b/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/factory/Ipv4WriterFactory.java @@ -32,7 +32,7 @@ import io.fd.honeycomb.translate.write.WriterFactory; import io.fd.honeycomb.translate.write.registry.ModifiableWriterRegistryBuilder; import io.fd.vpp.jvpp.core.future.FutureJVppCore; import javax.annotation.Nonnull; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces._interface.Routing; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces._interface.Routing; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev140616.Interface1; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev140616.interfaces._interface.Ipv4; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev140616.interfaces._interface.ipv4.Address; diff --git a/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/factory/Ipv6WriterFactory.java b/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/factory/Ipv6WriterFactory.java index 120391e16..ffd1e7269 100644 --- a/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/factory/Ipv6WriterFactory.java +++ b/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/factory/Ipv6WriterFactory.java @@ -36,7 +36,7 @@ import javax.annotation.Nonnull; import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.nd.proxy.rev170315.NdProxyIp6Augmentation; import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.nd.proxy.rev170315.interfaces._interface.ipv6.NdProxies; import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.nd.proxy.rev170315.interfaces._interface.ipv6.nd.proxies.NdProxy; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces._interface.Routing; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces._interface.Routing; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.Interfaces; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev140616.Interface1; diff --git a/v3po/api/src/main/yang/v3po@2018-10-08.yang b/v3po/api/src/main/yang/v3po@2018-10-08.yang deleted file mode 100644 index b93cd3386..000000000 --- a/v3po/api/src/main/yang/v3po@2018-10-08.yang +++ /dev/null @@ -1,963 +0,0 @@ -module v3po { - yang-version 1; - namespace "http://fd.io/hc2vpp/yang/v3po"; - prefix "v3po"; - - import iana-if-type { - prefix "ianaift"; - } - import ietf-interfaces { - prefix "if"; - } - import ietf-yang-types { - prefix "yang"; - } - import ietf-inet-types { - prefix "inet"; - } - import yang-ext { - prefix "ext"; - } - import vpp-fib-table-management { - prefix fib-management; - revision-date 2018-05-21; - } - - organization - "FD.io - The Fast Data Project"; - - contact - "Hc2vpp Wiki - Mailing List "; - - description - "This module contains a collection of YANG definitions - that extend ietf-interfaces module with VPP specific interface types. - - Copyright (c) 2015-2017 Cisco and/or its affiliates. - - Licensed under the Apache License, Version 2.0 (the 'License'); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at: - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an 'AS IS' BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License."; - - revision "2018-10-08" { - description - "Revision changes: - - adds support for Tap v2 interface - - fixes tap-name pattern"; - } - - revision "2018-07-03" { - description - "Revision changes: - - adds support for af-packet interface - - uses references to fib-management module instead of uint32 identifiers - - changes type of IP addresses from inet:ip-address to inet:ip-address-no-zone - - fixes some minor issues"; - } - - revision "2017-06-07" { - description "Eliminated config leafrefs in operational tree"; - } - - revision "2017-03-15" { - description - "Revision changes: - - acl and ietf-acl moved to vpp-interface-acl - - vpp-state and rpc moved to vpp-management - - bridge domains moved to standalone container"; - } - - revision "2016-12-14" { - description - "This revision adds the following new features: - - ingress/egress ACLs support - - moved ACL definitions to vpp-acl module - - updated l2 container constraint (permit IP address on BVI interface) - - added PID of vpp process to vpp-state - - added support for Loopback interfaces - - added support for port mirroring"; - } - - revision "2015-01-05" { - description "Initial revision of v3po model"; - } - - typedef bridge-domain-ref { - type leafref { - path "/bridge-domains/bridge-domain/name"; - } - description - "This type is used by to reference a bridge domain table"; - } - - typedef bridged-virtual-interface-ref { - type leafref { - path "/if:interfaces/if:interface/l2/bridged-virtual-interface"; - } - description - "This type is used by to reference a bridged virtual interface"; - } - - identity vxlan-tunnel { - base if:interface-type; - } - - identity gre-tunnel { - base if:interface-type; - } - - identity vhost-user { - base if:interface-type; - } - - identity tap { - base if:interface-type; - } - - identity tap-v2 { - base if:interface-type; - } - - identity loopback { - base if:interface-type; - } - - identity l2-fib-action { - description "Base identity for l2-fib actions"; - } - - identity l2-fib-forward { - base l2-fib-action; - description - "Forwards packet with configured mac address"; - } - - identity l2-fib-filter { - base l2-fib-action; - description - "Drops packet with configured mac address"; - } - - typedef l2-fib-action { - type identityref { - base "l2-fib-action"; - } - description "Identifies a specific L2 FIB action"; - } - - typedef vxlan-vni { - // FIXME: should be in a vxlan-specific model - description "VXLAN Network Identifier"; - type uint32 { - range "0..16777215"; - } - } - - typedef vhost-user-role { - type enumeration { - enum "server"; - enum "client"; - } - } - - identity vxlan-gpe-tunnel { - base if:interface-type; - } - - identity af-packet { - base if:interface-type; - } - - typedef vxlan-gpe-vni { - description "VNI used in a VXLAN-GPE tunnel"; - type uint32 { - range "0..16777215"; - } - } - - typedef vxlan-gpe-next-protocol { - type enumeration { - enum "ipv4" { - value 1; - } - enum "ipv6" { - value 2; - } - enum "ethernet" { - value 3; - } - enum "nsh" { - value 4; - } - } - } - - - typedef span-state { - type enumeration { - enum "receive" { - value "1"; - description - "Receive (Rx) SPAN—The goal of receive (or ingress) SPAN - is to monitor as much as possible all the packets received by the source interface. - A copy of each packet received by the source is sent to the destination port for that SPAN session. - You can monitor a series or range of ingress ports in a SPAN session."; - } - - enum "transmit" { - value "2"; - description - "Transmit (Tx) SPAN—The goal of transmit (or egress) SPAN is to monitor as much as possible all the packets - sent by the source interface after all modification and processing is performed by the switch. - A copy of each packet sent by the source is sent to the destination port for that SPAN session. - The copy is provided after the packet is modified. Monitors a range of egress ports in a SPAN session."; - } - - enum "both" { - value "3"; - description - "In a SPAN session, you can monitor a series or range of ports for both received and sent packets."; - } - } - } - - grouping bridge-domain-attributes { - leaf flood { - type boolean; - default true; - description - "Enable/disable L2 flooding."; - } - leaf forward { - type boolean; - default true; - description - "Enable/disable L2 forwarding."; - } - leaf learn { - type boolean; - default true; - description - "Enable/disable L2 learning."; - } - leaf unknown-unicast-flood { - type boolean; - default true; - } - leaf arp-termination { - type boolean; - default false; - } - - container arp-termination-table { - when "../v3po:arp-termination = 'true'"; - - // TODO(HONEYCOMB-133): add support for read (after VPP-230 is done) - list arp-termination-table-entry { - key "ip-address phys-address"; - leaf ip-address { - type inet:ip-address-no-zone; - } - leaf phys-address { - type yang:phys-address; - } - } - } - } - - // TODO express constraints for L2 FIB entries in YANG if possible - grouping l2-fib-attributes { - container l2-fib-table { - list l2-fib-entry { - key "phys-address"; - - leaf phys-address { - type yang:phys-address; - } - - leaf outgoing-interface { - // either filter must be specified or interface(can't be both) - when "../action != 'l2-fib-filter'"; - type if:interface-ref; - // mandatory true; - when is not actually resolved, so mandatory can't be in place - description - "One of interfaces assigned to the FIB table's bridge-domain."; - } - leaf static-config { - type boolean; - default false; - description - "Static entries cannot be overridden by mac learning."; - } - leaf action { - type l2-fib-action; - mandatory true; - description - "L2 FIB action. For filter action, entry must be configured as static."; - } - leaf bridged-virtual-interface { - when "../action = 'l2-fib-forward'"; - type boolean; - config false; // FIXME setting bvi is currently not supported by VPP's binary api - } - } - } - } - - grouping interface-tag { - leaf tag { - type string { - length 1..63; - } - description - "ASCII string placeholder for interface metadata. Value is stored in vpp, - and returned in read requests. No processing involved."; - } - } - - grouping tap-interface-base-attributes { - leaf tap-name { - type string{ - pattern '[a-zA-Z0-9\-;.+@$#^&*!_()=\[\]]*'; - } - } - uses interface-tag; - } - - grouping tap-interface-config-attributes { - leaf mac { - type yang:phys-address; - mandatory false; - description "Mac address to be set for the tap interface. Random will be used if not configured"; - } - - leaf device-instance { - type uint32; - mandatory false; - description "Custom device instance. Autogenerated will be used if not configured"; - } - } - - grouping tap-v2-interface-base-attributes { - leaf id { - type uint32; - description "Interface ID."; - } - - leaf tx-ring-size { - type uint16; - description "Optional transmit ring size, default is 256 entries, must be power of 2."; - default 256; - } - - leaf rx-ring-size { - type uint16; - description "Optional receive ring size, default is 256 entries, must be power of 2."; - default 256; - } - - leaf host-mac { - type yang:phys-address; - description "Mac address to be set for the tap host interface."; - } - - leaf host-interface-name { - type string { - pattern '[a-zA-Z0-9\-;.+@$#^&*!_()=\[\]]*'; - length 1..63; - } - description "Name of the tap host interface."; - } - - leaf host-namespace { - type string { - pattern '[a-zA-Z0-9\-;.+@$#^&*!_()=\[\]]*'; - length 1..63; - } - description "Host namespace to assign this tap interface to."; - } - - leaf host-bridge { - type string { - pattern '[a-zA-Z0-9\-;.+@$#^&*!_()=\[\]]*'; - length 1..63; - } - description "Host bridge to assign this tap interface to."; - } - - leaf host-ipv4-address { - type inet:ipv4-prefix; - description "Host IPv4 address in form of IPv4Prefix."; - } - - leaf host-ipv6-address { - type inet:ipv6-prefix; - description "Host IPv6 address in form of IPv6Prefix."; - } - - uses interface-tag; - } - - grouping tap-v2-interface-config-attributes { - leaf mac { - type yang:phys-address; - description "Mac address to be set for the tap v2 interface. Random will be used if not configured."; - } - leaf host-ipv4-gateway { - type inet:ipv4-address; - description "Host IPv4 gateway address."; - } - - leaf host-ipv6-gateway { - type inet:ipv6-address; - description "Host IPv6 gateway address."; - } - } - - grouping tap-v2-interface-state-attributes { - leaf device-name { - config false; - type string{ - pattern '[a-zA-Z0-9\-;.+@$#^&*!_()=\[\]]*'; - length 1..63; - } - description "Device name of the Tap v2 interface in VPP."; - } - } - - grouping loopback-interface-base-attributes { - leaf mac { - type yang:phys-address; - mandatory false; - description "Mac address of the loopback interface"; - } - } - - grouping ethernet-base-attributes { - leaf mtu { - type uint16 { - range "64..9216"; - } - units "octets"; - default 9216; - description - "The size, in octets, of the largest packet that the - hardware interface will send and receive. - - Mapped to hw_interface_set_mtu VPP API message which programs the NIC."; - } - } - - grouping routing-base-attributes { - leaf ipv4-vrf-id { - type fib-management:fib-table-list-ref; - } - leaf ipv6-vrf-id { - type fib-management:fib-table-list-ref; - } - description - "Defines VRF tables used for ipv4 and ipv6 traffic"; - } - - grouping ethernet-state-attributes { - leaf manufacturer-description { - type string; - config false; - } - leaf duplex { - type enumeration { - enum "half"; - enum "full"; - } - config false; - } - } - - grouping vhost-user-interface-base-attributes { - leaf socket { - type string { - length 1..255; - } - } - leaf role { - type vhost-user-role; - default "server"; - } - uses interface-tag; - description "vhost-user settings"; - } - - grouping vhost-user-interface-config-attributes { - leaf device-instance { - type uint32; - mandatory false; - description "Custom device instance. Autogenerated will be used if not configured"; - } - description "vhost-user settings"; - } - - grouping vhost-user-interface-state-attributes { - leaf features { - type uint64; - config false; - } - leaf virtio-net-hdr-size { - type uint32; - config false; - } - leaf num-memory-regions { - type uint32; - config false; - } - leaf connect-error { - type string; - config false; - } - } - - /* - * Defines the supported decap node for vxlan. - */ - identity decap-node { - description - "Define the supported decap node"; - } - identity l2-input { - base decap-node; - description - "The next decap node is l2-input"; - } - identity nsh-proxy { - base decap-node; - description - "The next decap node is nsh-proxy"; - } - typedef vxlan-decap-node { - type identityref { - base "decap-node"; - } - } - grouping vxlan-base-attributes { - // FIXME: this should be in an vxlan-specific extension - leaf src { - /*mandatory true;*/ - type inet:ip-address-no-zone; - } - leaf dst { - /*mandatory true;*/ - type inet:ip-address-no-zone; - } - leaf vni { - /*mandatory true;*/ - type vxlan-vni; - } - leaf encap-vrf-id { - /*mandatory true;*/ - type fib-management:fib-table-list-ref; - } - leaf decap-next { - type vxlan-decap-node; - default "l2-input"; - } - } - - grouping gre-base-attributes { - leaf src { - /*mandatory true;*/ - type inet:ip-address-no-zone; - } - leaf dst { - /*mandatory true;*/ - type inet:ip-address-no-zone; - } - leaf outer-fib-id { - type uint32; - } - } - - grouping vxlan-gpe-base-attributes { - leaf local { - /*mandatory true;*/ - type inet:ip-address-no-zone; - } - leaf remote { - /*mandatory true;*/ - type inet:ip-address-no-zone; - } - leaf vni { - /*mandatory true;*/ - type vxlan-gpe-vni; - } - leaf next-protocol { - type vxlan-gpe-next-protocol; - } - leaf encap-vrf-id { - type uint32; - } - leaf decap-vrf-id { - type uint32; - } - } - - grouping af-packet-base-attributes { - leaf host-interface-name { - type string { - length "1..63"; - } - /* mandatory true; */ - description "Name of the host interface (veth end point)."; - } - leaf mac { - type yang:phys-address; - mandatory false; - description "Mac address to be set for the af-packet interface. Random will be used if not configured."; - } - reference - "https://docs.fd.io/vpp/18.07/clicmd_src_vnet_devices_af_packet.html"; - } - - grouping l2-config-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-ref; - description - "L2 xconnect mode"; - } - } - case bridge-based { - 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"; - - container mirrored-interfaces { - list mirrored-interface { - key "iface-ref"; - leaf iface-ref { - type if:interface-ref; - } - - leaf state { - type span-state; - mandatory true; - } - } - } - } - - 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"; - - // FIXME using ietf-interfaces model for vpp interfaces makes it hard to implement because: - // 1. The link between interface type and this augmentation is unclear - // 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 - // 3. The ietf-interfaces model does not define groupings which makes types reuse difficult - - container tap { - when "../if:type = 'v3po:tap'"; - uses tap-interface-base-attributes; - uses tap-interface-config-attributes; - } - - container tap-v2 { - when "../if:type = 'v3po:tap-v2'"; - uses tap-v2-interface-base-attributes; - uses tap-v2-interface-config-attributes; - } - - container loopback { - presence "Presence of this container indicates loopback nature of the interface"; - when "../if:type = 'v3po:loopback'"; - uses loopback-interface-base-attributes; - } - - container ethernet { - when "../if:type = 'ianaift:ethernetCsmacd'"; - uses ethernet-base-attributes; - } - - container routing { - uses routing-base-attributes; - } - - container vhost-user { - when "../if:type = 'v3po:vhost-user'"; - uses vhost-user-interface-base-attributes; - uses vhost-user-interface-config-attributes; - } - - container vxlan { - when "../if:type = 'v3po:vxlan-tunnel'"; - uses vxlan-base-attributes; - } - - container gre { - when "../if:type = 'v3po:gre-tunnel'"; - uses gre-base-attributes; - } - - container l2 { - must "bridged-virtual-interface = 'true' or " + - "(not (../if:ipv4[if:enabled = 'true']/if:address/if:ip) and " + - "not (../if:ipv6[if:enabled = 'true']/if:address/if:ip))"; - - uses l2-config-attributes; - } - - container vxlan-gpe { - when "../if:type = 'v3po:vxlan-gpe-tunnel'"; - - uses vxlan-gpe-base-attributes; - } - - container af-packet { - when "../if:type = 'v3po:af-packet'"; - uses af-packet-base-attributes; - } - - container span { - uses span-attributes; - } - } - - container bridge-domains { - presence "Bridge domains configuration"; - list bridge-domain { - key "name"; - - leaf name { - type string; - } - - uses bridge-domain-attributes; - uses l2-fib-attributes; - - description - "bridge-domain configuration"; - } - } - - augment /if:interfaces-state/if:interface { - ext:augment-identifier "vpp-interface-state-augmentation"; - - leaf description { - type string; - } - - container tap { - when "../if:type = 'v3po:tap'"; - uses tap-interface-base-attributes; - } - - container tap-v2 { - when "../if:type = 'v3po:tap-v2'"; - uses tap-v2-interface-base-attributes; - uses tap-v2-interface-state-attributes; - } - - container ethernet { - when "../if:type = 'ianaift:ethernetCsmacd'"; - uses ethernet-base-attributes; - uses ethernet-state-attributes; - } - - container routing { - uses routing-base-attributes; - } - - container vhost-user { - when "../if:type = 'v3po:vhost-user'"; - uses vhost-user-interface-base-attributes; - uses vhost-user-interface-state-attributes; - } - - container vxlan { - when "../if:type = 'v3po:vxlan-tunnel'"; - uses vxlan-base-attributes; - } - container vxlan-gpe { - when "../if:type = 'v3po:vxlan-gpe-tunnel'"; - - uses vxlan-gpe-base-attributes; - } - - container gre { - when "../if:type = 'gre-tunnel'"; - uses gre-base-attributes; - } - - container l2 { - must "bridged-virtual-interface = 'true' or " + - "(not (../if:ipv4[if:enabled = 'true']/if:address/if:ip) and " + - "not (../if:ipv6[if:enabled = 'true']/if:address/if:ip))"; - - uses l2-state-attributes; - } - - container af-packet { - when "../if:type = 'v3po:af-packet'"; - uses af-packet-base-attributes; - } - - container span { - uses span-state-attributes; - } - } - - augment /if:interfaces-state/if:interface/if:statistics { - ext:augment-identifier "vpp-interface-statistics-augmentation"; - leaf in-errors-no-buf { - type yang:counter64; - } - leaf in-errors-miss { - type yang:counter64; - } - leaf out-discards-fifo-full { - type yang:counter64; - } - } - - container bridge-domains-state { - // FIXME: Should this live in bridge-domain.yang in a modular fashion ? - config "false"; - list bridge-domain { - - key "name"; - leaf name { - type string; - } - - uses bridge-domain-attributes; - uses l2-fib-attributes; - - description - "bridge-domain operational data"; - } - } - - // VPP Notifications - - typedef interface-status { - type enumeration { - enum up { - value 1; - } - enum down { - value 0; - } - } - } - - typedef interface-name-or-index { - type union { - type string; - type uint32; - } - } - - notification interface-state-change { - leaf name { - type interface-name-or-index; - } - - leaf admin-status { - type interface-status; - } - - leaf oper-status { - type interface-status; - } - } - - notification interface-deleted { - leaf name { - type interface-name-or-index; - } - } -} diff --git a/v3po/api/src/main/yang/v3po@2019-01-28.yang b/v3po/api/src/main/yang/v3po@2019-01-28.yang new file mode 100644 index 000000000..9fbb6c6d3 --- /dev/null +++ b/v3po/api/src/main/yang/v3po@2019-01-28.yang @@ -0,0 +1,931 @@ +module v3po { + yang-version 1; + namespace "http://fd.io/hc2vpp/yang/v3po"; + prefix "v3po"; + + import iana-if-type { + prefix "ianaift"; + } + import ietf-interfaces { + prefix "if"; + } + import ietf-yang-types { + prefix "yang"; + } + import ietf-inet-types { + prefix "inet"; + } + import yang-ext { + prefix "ext"; + } + import vpp-fib-table-management { + prefix fib-management; + revision-date 2018-05-21; + } + + organization + "FD.io - The Fast Data Project"; + + contact + "Hc2vpp Wiki + Mailing List "; + + description + "This module contains a collection of YANG definitions + that extend ietf-interfaces module with VPP specific interface types. + + Copyright (c) 2015-2017 Cisco and/or its affiliates. + + Licensed under the Apache License, Version 2.0 (the 'License'); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an 'AS IS' BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License."; + + revision "2019-01-28" { + description + "Revision changes: + - removed deprecated tap-cli interface"; + } + + revision "2018-10-08" { + description + "Revision changes: + - adds support for Tap v2 interface + - fixes tap-name pattern"; + } + + revision "2018-07-03" { + description + "Revision changes: + - adds support for af-packet interface + - uses references to fib-management module instead of uint32 identifiers + - changes type of IP addresses from inet:ip-address to inet:ip-address-no-zone + - fixes some minor issues"; + } + + revision "2017-06-07" { + description "Eliminated config leafrefs in operational tree"; + } + + revision "2017-03-15" { + description + "Revision changes: + - acl and ietf-acl moved to vpp-interface-acl + - vpp-state and rpc moved to vpp-management + - bridge domains moved to standalone container"; + } + + revision "2016-12-14" { + description + "This revision adds the following new features: + - ingress/egress ACLs support + - moved ACL definitions to vpp-acl module + - updated l2 container constraint (permit IP address on BVI interface) + - added PID of vpp process to vpp-state + - added support for Loopback interfaces + - added support for port mirroring"; + } + + revision "2015-01-05" { + description "Initial revision of v3po model"; + } + + typedef bridge-domain-ref { + type leafref { + path "/bridge-domains/bridge-domain/name"; + } + description + "This type is used by to reference a bridge domain table"; + } + + typedef bridged-virtual-interface-ref { + type leafref { + path "/if:interfaces/if:interface/l2/bridged-virtual-interface"; + } + description + "This type is used by to reference a bridged virtual interface"; + } + + identity vxlan-tunnel { + base if:interface-type; + } + + identity gre-tunnel { + base if:interface-type; + } + + identity vhost-user { + base if:interface-type; + } + + identity tap-v2 { + base if:interface-type; + } + + identity loopback { + base if:interface-type; + } + + identity l2-fib-action { + description "Base identity for l2-fib actions"; + } + + identity l2-fib-forward { + base l2-fib-action; + description + "Forwards packet with configured mac address"; + } + + identity l2-fib-filter { + base l2-fib-action; + description + "Drops packet with configured mac address"; + } + + typedef l2-fib-action { + type identityref { + base "l2-fib-action"; + } + description "Identifies a specific L2 FIB action"; + } + + typedef vxlan-vni { + // FIXME: should be in a vxlan-specific model + description "VXLAN Network Identifier"; + type uint32 { + range "0..16777215"; + } + } + + typedef vhost-user-role { + type enumeration { + enum "server"; + enum "client"; + } + } + + identity vxlan-gpe-tunnel { + base if:interface-type; + } + + identity af-packet { + base if:interface-type; + } + + typedef vxlan-gpe-vni { + description "VNI used in a VXLAN-GPE tunnel"; + type uint32 { + range "0..16777215"; + } + } + + typedef vxlan-gpe-next-protocol { + type enumeration { + enum "ipv4" { + value 1; + } + enum "ipv6" { + value 2; + } + enum "ethernet" { + value 3; + } + enum "nsh" { + value 4; + } + } + } + + + typedef span-state { + type enumeration { + enum "receive" { + value "1"; + description + "Receive (Rx) SPAN—The goal of receive (or ingress) SPAN + is to monitor as much as possible all the packets received by the source interface. + A copy of each packet received by the source is sent to the destination port for that SPAN session. + You can monitor a series or range of ingress ports in a SPAN session."; + } + + enum "transmit" { + value "2"; + description + "Transmit (Tx) SPAN—The goal of transmit (or egress) SPAN is to monitor as much as possible all the packets + sent by the source interface after all modification and processing is performed by the switch. + A copy of each packet sent by the source is sent to the destination port for that SPAN session. + The copy is provided after the packet is modified. Monitors a range of egress ports in a SPAN session."; + } + + enum "both" { + value "3"; + description + "In a SPAN session, you can monitor a series or range of ports for both received and sent packets."; + } + } + } + + grouping bridge-domain-attributes { + leaf flood { + type boolean; + default true; + description + "Enable/disable L2 flooding."; + } + leaf forward { + type boolean; + default true; + description + "Enable/disable L2 forwarding."; + } + leaf learn { + type boolean; + default true; + description + "Enable/disable L2 learning."; + } + leaf unknown-unicast-flood { + type boolean; + default true; + } + leaf arp-termination { + type boolean; + default false; + } + + container arp-termination-table { + when "../v3po:arp-termination = 'true'"; + + // TODO(HONEYCOMB-133): add support for read (after VPP-230 is done) + list arp-termination-table-entry { + key "ip-address phys-address"; + leaf ip-address { + type inet:ip-address-no-zone; + } + leaf phys-address { + type yang:phys-address; + } + } + } + } + + // TODO express constraints for L2 FIB entries in YANG if possible + grouping l2-fib-attributes { + container l2-fib-table { + list l2-fib-entry { + key "phys-address"; + + leaf phys-address { + type yang:phys-address; + } + + leaf outgoing-interface { + // either filter must be specified or interface(can't be both) + when "../action != 'l2-fib-filter'"; + type if:interface-ref; + // mandatory true; - when is not actually resolved, so mandatory can't be in place + description + "One of interfaces assigned to the FIB table's bridge-domain."; + } + leaf static-config { + type boolean; + default false; + description + "Static entries cannot be overridden by mac learning."; + } + leaf action { + type l2-fib-action; + mandatory true; + description + "L2 FIB action. For filter action, entry must be configured as static."; + } + leaf bridged-virtual-interface { + when "../action = 'l2-fib-forward'"; + type boolean; + config false; // FIXME setting bvi is currently not supported by VPP's binary api + } + } + } + } + + grouping interface-tag { + leaf tag { + type string { + length 1..63; + } + description + "ASCII string placeholder for interface metadata. Value is stored in vpp, + and returned in read requests. No processing involved."; + } + } + + grouping tap-v2-interface-base-attributes { + leaf id { + type uint32; + description "Interface ID."; + } + + leaf tx-ring-size { + type uint16; + description "Optional transmit ring size, default is 256 entries, must be power of 2."; + default 256; + } + + leaf rx-ring-size { + type uint16; + description "Optional receive ring size, default is 256 entries, must be power of 2."; + default 256; + } + + leaf host-mac { + type yang:phys-address; + description "Mac address to be set for the tap host interface."; + } + + leaf host-interface-name { + type string { + pattern '[a-zA-Z0-9\-;.+@$#^&*!_()=\[\]]*'; + length 1..63; + } + description "Name of the tap host interface."; + } + + leaf host-namespace { + type string { + pattern '[a-zA-Z0-9\-;.+@$#^&*!_()=\[\]]*'; + length 1..63; + } + description "Host namespace to assign this tap interface to."; + } + + leaf host-bridge { + type string { + pattern '[a-zA-Z0-9\-;.+@$#^&*!_()=\[\]]*'; + length 1..63; + } + description "Host bridge to assign this tap interface to."; + } + + leaf host-ipv4-address { + type inet:ipv4-prefix; + description "Host IPv4 address in form of IPv4Prefix."; + } + + leaf host-ipv6-address { + type inet:ipv6-prefix; + description "Host IPv6 address in form of IPv6Prefix."; + } + + uses interface-tag; + } + + grouping tap-v2-interface-config-attributes { + leaf mac { + type yang:phys-address; + description "Mac address to be set for the tap v2 interface. Random will be used if not configured."; + } + leaf host-ipv4-gateway { + type inet:ipv4-address; + description "Host IPv4 gateway address."; + } + + leaf host-ipv6-gateway { + type inet:ipv6-address; + description "Host IPv6 gateway address."; + } + } + + grouping tap-v2-interface-state-attributes { + leaf device-name { + config false; + type string{ + pattern '[a-zA-Z0-9\-;.+@$#^&*!_()=\[\]]*'; + length 1..63; + } + description "Device name of the Tap v2 interface in VPP."; + } + } + + grouping loopback-interface-base-attributes { + leaf mac { + type yang:phys-address; + mandatory false; + description "Mac address of the loopback interface"; + } + } + + grouping ethernet-base-attributes { + leaf mtu { + type uint16 { + range "64..9216"; + } + units "octets"; + default 9216; + description + "The size, in octets, of the largest packet that the + hardware interface will send and receive. + + Mapped to hw_interface_set_mtu VPP API message which programs the NIC."; + } + } + + grouping routing-base-attributes { + leaf ipv4-vrf-id { + type fib-management:fib-table-list-ref; + } + leaf ipv6-vrf-id { + type fib-management:fib-table-list-ref; + } + description + "Defines VRF tables used for ipv4 and ipv6 traffic"; + } + + grouping ethernet-state-attributes { + leaf manufacturer-description { + type string; + config false; + } + leaf duplex { + type enumeration { + enum "half"; + enum "full"; + } + config false; + } + } + + grouping vhost-user-interface-base-attributes { + leaf socket { + type string { + length 1..255; + } + } + leaf role { + type vhost-user-role; + default "server"; + } + uses interface-tag; + description "vhost-user settings"; + } + + grouping vhost-user-interface-config-attributes { + leaf device-instance { + type uint32; + mandatory false; + description "Custom device instance. Autogenerated will be used if not configured"; + } + description "vhost-user settings"; + } + + grouping vhost-user-interface-state-attributes { + leaf features { + type uint64; + config false; + } + leaf virtio-net-hdr-size { + type uint32; + config false; + } + leaf num-memory-regions { + type uint32; + config false; + } + leaf connect-error { + type string; + config false; + } + } + + /* + * Defines the supported decap node for vxlan. + */ + identity decap-node { + description + "Define the supported decap node"; + } + identity l2-input { + base decap-node; + description + "The next decap node is l2-input"; + } + identity nsh-proxy { + base decap-node; + description + "The next decap node is nsh-proxy"; + } + typedef vxlan-decap-node { + type identityref { + base "decap-node"; + } + } + grouping vxlan-base-attributes { + // FIXME: this should be in an vxlan-specific extension + leaf src { + /*mandatory true;*/ + type inet:ip-address-no-zone; + } + leaf dst { + /*mandatory true;*/ + type inet:ip-address-no-zone; + } + leaf vni { + /*mandatory true;*/ + type vxlan-vni; + } + leaf encap-vrf-id { + /*mandatory true;*/ + type fib-management:fib-table-list-ref; + } + leaf decap-next { + type vxlan-decap-node; + default "l2-input"; + } + } + + grouping gre-base-attributes { + leaf src { + /*mandatory true;*/ + type inet:ip-address-no-zone; + } + leaf dst { + /*mandatory true;*/ + type inet:ip-address-no-zone; + } + leaf outer-fib-id { + type uint32; + } + } + + grouping vxlan-gpe-base-attributes { + leaf local { + /*mandatory true;*/ + type inet:ip-address-no-zone; + } + leaf remote { + /*mandatory true;*/ + type inet:ip-address-no-zone; + } + leaf vni { + /*mandatory true;*/ + type vxlan-gpe-vni; + } + leaf next-protocol { + type vxlan-gpe-next-protocol; + } + leaf encap-vrf-id { + type uint32; + } + leaf decap-vrf-id { + type uint32; + } + } + + grouping af-packet-base-attributes { + leaf host-interface-name { + type string { + length "1..63"; + } + /* mandatory true; */ + description "Name of the host interface (veth end point)."; + } + leaf mac { + type yang:phys-address; + mandatory false; + description "Mac address to be set for the af-packet interface. Random will be used if not configured."; + } + reference + "https://docs.fd.io/vpp/18.07/clicmd_src_vnet_devices_af_packet.html"; + } + + grouping l2-config-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-ref; + description + "L2 xconnect mode"; + } + } + case bridge-based { + 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"; + + container mirrored-interfaces { + list mirrored-interface { + key "iface-ref"; + leaf iface-ref { + type if:interface-ref; + } + + leaf state { + type span-state; + mandatory true; + } + } + } + } + + 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"; + + // FIXME using ietf-interfaces model for vpp interfaces makes it hard to implement because: + // 1. The link between interface type and this augmentation is unclear + // 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 + // 3. The ietf-interfaces model does not define groupings which makes types reuse difficult + + container tap-v2 { + when "../if:type = 'v3po:tap-v2'"; + uses tap-v2-interface-base-attributes; + uses tap-v2-interface-config-attributes; + } + + container loopback { + presence "Presence of this container indicates loopback nature of the interface"; + when "../if:type = 'v3po:loopback'"; + uses loopback-interface-base-attributes; + } + + container ethernet { + when "../if:type = 'ianaift:ethernetCsmacd'"; + uses ethernet-base-attributes; + } + + container routing { + uses routing-base-attributes; + } + + container vhost-user { + when "../if:type = 'v3po:vhost-user'"; + uses vhost-user-interface-base-attributes; + uses vhost-user-interface-config-attributes; + } + + container vxlan { + when "../if:type = 'v3po:vxlan-tunnel'"; + uses vxlan-base-attributes; + } + + container gre { + when "../if:type = 'v3po:gre-tunnel'"; + uses gre-base-attributes; + } + + container l2 { + must "bridged-virtual-interface = 'true' or " + + "(not (../if:ipv4[if:enabled = 'true']/if:address/if:ip) and " + + "not (../if:ipv6[if:enabled = 'true']/if:address/if:ip))"; + + uses l2-config-attributes; + } + + container vxlan-gpe { + when "../if:type = 'v3po:vxlan-gpe-tunnel'"; + + uses vxlan-gpe-base-attributes; + } + + container af-packet { + when "../if:type = 'v3po:af-packet'"; + uses af-packet-base-attributes; + } + + container span { + uses span-attributes; + } + } + + container bridge-domains { + presence "Bridge domains configuration"; + list bridge-domain { + key "name"; + + leaf name { + type string; + } + + uses bridge-domain-attributes; + uses l2-fib-attributes; + + description + "bridge-domain configuration"; + } + } + + augment /if:interfaces-state/if:interface { + ext:augment-identifier "vpp-interface-state-augmentation"; + + leaf description { + type string; + } + + container tap-v2 { + when "../if:type = 'v3po:tap-v2'"; + uses tap-v2-interface-base-attributes; + uses tap-v2-interface-state-attributes; + } + + container ethernet { + when "../if:type = 'ianaift:ethernetCsmacd'"; + uses ethernet-base-attributes; + uses ethernet-state-attributes; + } + + container routing { + uses routing-base-attributes; + } + + container vhost-user { + when "../if:type = 'v3po:vhost-user'"; + uses vhost-user-interface-base-attributes; + uses vhost-user-interface-state-attributes; + } + + container vxlan { + when "../if:type = 'v3po:vxlan-tunnel'"; + uses vxlan-base-attributes; + } + container vxlan-gpe { + when "../if:type = 'v3po:vxlan-gpe-tunnel'"; + + uses vxlan-gpe-base-attributes; + } + + container gre { + when "../if:type = 'gre-tunnel'"; + uses gre-base-attributes; + } + + container l2 { + must "bridged-virtual-interface = 'true' or " + + "(not (../if:ipv4[if:enabled = 'true']/if:address/if:ip) and " + + "not (../if:ipv6[if:enabled = 'true']/if:address/if:ip))"; + + uses l2-state-attributes; + } + + container af-packet { + when "../if:type = 'v3po:af-packet'"; + uses af-packet-base-attributes; + } + + container span { + uses span-state-attributes; + } + } + + augment /if:interfaces-state/if:interface/if:statistics { + ext:augment-identifier "vpp-interface-statistics-augmentation"; + leaf in-errors-no-buf { + type yang:counter64; + } + leaf in-errors-miss { + type yang:counter64; + } + leaf out-discards-fifo-full { + type yang:counter64; + } + } + + container bridge-domains-state { + // FIXME: Should this live in bridge-domain.yang in a modular fashion ? + config "false"; + list bridge-domain { + + key "name"; + leaf name { + type string; + } + + uses bridge-domain-attributes; + uses l2-fib-attributes; + + description + "bridge-domain operational data"; + } + } + + // VPP Notifications + + typedef interface-status { + type enumeration { + enum up { + value 1; + } + enum down { + value 0; + } + } + } + + typedef interface-name-or-index { + type union { + type string; + type uint32; + } + } + + notification interface-state-change { + leaf name { + type interface-name-or-index; + } + + leaf admin-status { + type interface-status; + } + + leaf oper-status { + type interface-status; + } + } + + notification interface-deleted { + leaf name { + type interface-name-or-index; + } + } +} diff --git a/v3po/postman_rest_collection.json b/v3po/postman_rest_collection.json index a65327788..5fe995c11 100644 --- a/v3po/postman_rest_collection.json +++ b/v3po/postman_rest_collection.json @@ -1599,155 +1599,6 @@ } ] }, - { - "name": "TAP", - "item": [ - { - "name": "Add simple tap ifc -cfg", - "request": { - "method": "PUT", - "header": [ - { - "key": "Authorization", - "value": "Basic YWRtaW46YWRtaW4=" - }, - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\r\n \r\n \"interface\": [\r\n {\r\n \"name\": \"tapp\",\r\n \"description\": \"for testing purposes\",\r\n \"type\": \"v3po:tap\",\r\n \"tap\" :{\r\n \"tap-name\" : \"tapp\"\r\n }\r\n }\r\n ]\r\n \r\n}" - }, - "url": { - "raw": "http://localhost:8183/restconf/config/ietf-interfaces:interfaces/interface/tapp", - "protocol": "http", - "host": [ - "localhost" - ], - "port": "8183", - "path": [ - "restconf", - "config", - "ietf-interfaces:interfaces", - "interface", - "tapp" - ] - } - }, - "response": [] - }, - { - "name": "Add complex tap ifc - cfg", - "request": { - "method": "PUT", - "header": [ - { - "key": "Authorization", - "value": "Basic YWRtaW46YWRtaW4=" - }, - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\r\n \r\n \"interface\": [\r\n {\r\n \"name\": \"tapp2\",\r\n \"description\": \"for testing purposes\",\r\n \"type\": \"v3po:tap\",\r\n \"tap\" :{\r\n \"tap-name\" : \"tapp2\",\r\n \"mac\" : \"00:ff:ff:ff:ff:ff\",\r\n \"device-instance\" : 55,\r\n \"tag\": \"tapp2_tag\"\r\n }\r\n }\r\n ]\r\n \r\n}" - }, - "url": { - "raw": "http://localhost:8183/restconf/config/ietf-interfaces:interfaces/interface/tapp2", - "protocol": "http", - "host": [ - "localhost" - ], - "port": "8183", - "path": [ - "restconf", - "config", - "ietf-interfaces:interfaces", - "interface", - "tapp2" - ] - } - }, - "response": [] - }, - { - "name": "Modify complex tap ifc - cfg", - "request": { - "method": "PUT", - "header": [ - { - "key": "Authorization", - "value": "Basic YWRtaW46YWRtaW4=" - }, - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\r\n \r\n \"interface\": [\r\n {\r\n \"name\": \"tapp2\",\r\n \"description\": \"for testing purposes\",\r\n \"type\": \"v3po:tap\",\r\n \"tap\" :{\r\n \"tap-name\" : \"tapp2\",\r\n \"mac\" : \"00:ff:ff:ff:ff:ae\",\r\n \"device-instance\" : 77\r\n }\r\n }\r\n ]\r\n \r\n}" - }, - "url": { - "raw": "http://localhost:8183/restconf/config/ietf-interfaces:interfaces/interface/tapp2", - "protocol": "http", - "host": [ - "localhost" - ], - "port": "8183", - "path": [ - "restconf", - "config", - "ietf-interfaces:interfaces", - "interface", - "tapp2" - ] - } - }, - "response": [] - }, - { - "name": "Delete complex tap ifc - cfg", - "request": { - "method": "DELETE", - "header": [ - { - "key": "Authorization", - "value": "Basic YWRtaW46YWRtaW4=" - }, - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "" - }, - "url": { - "raw": "http://localhost:8183/restconf/config/ietf-interfaces:interfaces/interface/tapp2", - "protocol": "http", - "host": [ - "localhost" - ], - "port": "8183", - "path": [ - "restconf", - "config", - "ietf-interfaces:interfaces", - "interface", - "tapp2" - ] - } - }, - "response": [] - } - ] - }, { "name": "TAPV2", "item": [ diff --git a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/factory/InterfacesStateReaderFactory.java b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/factory/InterfacesStateReaderFactory.java index d42fcb556..a54f04d0d 100644 --- a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/factory/InterfacesStateReaderFactory.java +++ b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/factory/InterfacesStateReaderFactory.java @@ -27,7 +27,6 @@ import io.fd.hc2vpp.v3po.interfacesstate.GreCustomizer; import io.fd.hc2vpp.v3po.interfacesstate.InterfaceCustomizer; import io.fd.hc2vpp.v3po.interfacesstate.InterfaceRoutingCustomizer; import io.fd.hc2vpp.v3po.interfacesstate.L2Customizer; -import io.fd.hc2vpp.v3po.interfacesstate.TapCustomizer; import io.fd.hc2vpp.v3po.interfacesstate.TapV2Customizer; import io.fd.hc2vpp.v3po.interfacesstate.VhostUserCustomizer; import io.fd.hc2vpp.v3po.interfacesstate.VxlanCustomizer; @@ -41,22 +40,21 @@ import io.fd.honeycomb.translate.impl.read.GenericReader; import io.fd.honeycomb.translate.read.ReaderFactory; import io.fd.honeycomb.translate.read.registry.ModifiableReaderRegistryBuilder; import io.fd.vpp.jvpp.core.future.FutureJVppCore; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.VppInterfaceStateAugmentation; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.VppInterfaceStateAugmentationBuilder; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces.state._interface.AfPacket; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces.state._interface.Ethernet; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces.state._interface.Gre; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces.state._interface.L2; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces.state._interface.Routing; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces.state._interface.Span; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces.state._interface.SpanBuilder; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces.state._interface.Tap; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces.state._interface.TapV2; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces.state._interface.VhostUser; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces.state._interface.Vxlan; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces.state._interface.VxlanGpe; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.span.state.attributes.MirroredInterfaces; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.span.state.attributes.mirrored.interfaces.MirroredInterface; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.VppInterfaceStateAugmentation; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.VppInterfaceStateAugmentationBuilder; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces.state._interface.AfPacket; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces.state._interface.Ethernet; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces.state._interface.Gre; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces.state._interface.L2; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces.state._interface.Routing; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces.state._interface.Span; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces.state._interface.SpanBuilder; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces.state._interface.TapV2; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces.state._interface.VhostUser; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces.state._interface.Vxlan; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces.state._interface.VxlanGpe; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.span.state.attributes.MirroredInterfaces; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.span.state.attributes.mirrored.interfaces.MirroredInterface; import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.vpp.pbb.rev161214.PbbRewriteStateInterfaceAugmentation; import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.vpp.pbb.rev161214.PbbRewriteStateInterfaceAugmentationBuilder; import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.vpp.pbb.rev161214.interfaces.state._interface.PbbRewriteState; @@ -117,9 +115,6 @@ public final class InterfacesStateReaderFactory implements ReaderFactory { // Routing registry.add(new GenericInitReader<>(vppIfcAugId.child(Routing.class), new InterfaceRoutingCustomizer(jvpp, ifcNamingCtx))); - // Tap - registry.add(new GenericInitReader<>(vppIfcAugId.child(Tap.class), - new TapCustomizer(jvpp, ifcNamingCtx, ifaceDumpManager))); // TapV2 registry.add(new GenericInitReader<>(vppIfcAugId.child(TapV2.class), new TapV2Customizer(jvpp, ifcNamingCtx, ifaceDumpManager))); diff --git a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/factory/InterfacesWriterFactory.java b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/factory/InterfacesWriterFactory.java index 35c39960b..cad0a723e 100644 --- a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/factory/InterfacesWriterFactory.java +++ b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/factory/InterfacesWriterFactory.java @@ -29,7 +29,6 @@ import io.fd.hc2vpp.v3po.interfaces.InterfaceRoutingCustomizer; import io.fd.hc2vpp.v3po.interfaces.InterfaceUnnumberedCustomizer; import io.fd.hc2vpp.v3po.interfaces.L2Customizer; import io.fd.hc2vpp.v3po.interfaces.LoopbackCustomizer; -import io.fd.hc2vpp.v3po.interfaces.TapCustomizer; import io.fd.hc2vpp.v3po.interfaces.TapV2Customizer; import io.fd.hc2vpp.v3po.interfaces.VhostUserCustomizer; import io.fd.hc2vpp.v3po.interfaces.VxlanCustomizer; @@ -44,21 +43,20 @@ import io.fd.vpp.jvpp.core.future.FutureJVppCore; import java.util.Set; import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.unnumbered.interfaces.rev180103.InterfaceUnnumberedAugmentation; import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.unnumbered.interfaces.rev180103.unnumbered.config.attributes.Unnumbered; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.VppInterfaceAugmentation; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces._interface.AfPacket; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces._interface.Ethernet; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces._interface.Gre; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces._interface.L2; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces._interface.Loopback; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces._interface.Routing; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces._interface.Span; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces._interface.Tap; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces._interface.TapV2; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces._interface.VhostUser; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces._interface.Vxlan; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces._interface.VxlanGpe; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.span.attributes.MirroredInterfaces; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.span.attributes.mirrored.interfaces.MirroredInterface; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.VppInterfaceAugmentation; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces._interface.AfPacket; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces._interface.Ethernet; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces._interface.Gre; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces._interface.L2; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces._interface.Loopback; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces._interface.Routing; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces._interface.Span; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces._interface.TapV2; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces._interface.VhostUser; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces._interface.Vxlan; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces._interface.VxlanGpe; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.span.attributes.MirroredInterfaces; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.span.attributes.mirrored.interfaces.MirroredInterface; import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.vpp.pbb.rev161214.PbbRewriteInterfaceAugmentation; import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.vpp.pbb.rev161214.interfaces._interface.PbbRewrite; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.Interfaces; @@ -118,10 +116,6 @@ public final class InterfacesWriterFactory implements WriterFactory { final InstanceIdentifier vxlanGpeId = VPP_IFC_AUG_ID.child(VxlanGpe.class); registry.addBefore(new GenericWriter<>(vxlanGpeId, new VxlanGpeCustomizer(jvpp, ifcNamingContext, ifcDisableContext)), ifcId); - // Tap(Needs to be executed before Interface customizer) = - final InstanceIdentifier tapId = VPP_IFC_AUG_ID.child(Tap.class); - registry.addBefore(new GenericWriter<>(tapId, new TapCustomizer(jvpp, ifcNamingContext)), - ifcId); // TapV2(Needs to be executed before Interface customizer) = final InstanceIdentifier tapV2Id = VPP_IFC_AUG_ID.child(TapV2.class); registry.addBefore(new GenericWriter<>(tapV2Id, new TapV2Customizer(jvpp, ifcNamingContext)), @@ -137,7 +131,7 @@ public final class InterfacesWriterFactory implements WriterFactory { ifcId); final Set> specificIfcTypes = - Sets.newHashSet(vhostId, afpacketId, vxlanId, vxlanGpeId, tapId, tapV2Id, loopbackId); + Sets.newHashSet(vhostId, afpacketId, vxlanId, vxlanGpeId, tapV2Id, loopbackId); // Ethernet = registry.add(new GenericWriter<>(VPP_IFC_AUG_ID.child(Ethernet.class), diff --git a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/factory/L2HoneycombWriterFactory.java b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/factory/L2HoneycombWriterFactory.java index 12bceb288..b7501ac7a 100644 --- a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/factory/L2HoneycombWriterFactory.java +++ b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/factory/L2HoneycombWriterFactory.java @@ -27,12 +27,12 @@ import io.fd.honeycomb.translate.impl.write.GenericListWriter; import io.fd.honeycomb.translate.write.WriterFactory; import io.fd.honeycomb.translate.write.registry.ModifiableWriterRegistryBuilder; import io.fd.vpp.jvpp.core.future.FutureJVppCore; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.BridgeDomains; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.bridge.domain.attributes.ArpTerminationTable; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.bridge.domain.attributes.arp.termination.table.ArpTerminationTableEntry; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.bridge.domains.BridgeDomain; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.l2.fib.attributes.L2FibTable; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.l2.fib.attributes.l2.fib.table.L2FibEntry; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.BridgeDomains; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.bridge.domain.attributes.ArpTerminationTable; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.bridge.domain.attributes.arp.termination.table.ArpTerminationTableEntry; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.bridge.domains.BridgeDomain; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.l2.fib.attributes.L2FibTable; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.l2.fib.attributes.l2.fib.table.L2FibEntry; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; public final class L2HoneycombWriterFactory implements WriterFactory { diff --git a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/factory/L2StateHoneycombReaderFactory.java b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/factory/L2StateHoneycombReaderFactory.java index b5edc479e..7ae4fbc0f 100644 --- a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/factory/L2StateHoneycombReaderFactory.java +++ b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/factory/L2StateHoneycombReaderFactory.java @@ -25,12 +25,12 @@ import io.fd.honeycomb.translate.impl.read.GenericInitListReader; import io.fd.honeycomb.translate.read.ReaderFactory; import io.fd.honeycomb.translate.read.registry.ModifiableReaderRegistryBuilder; import io.fd.vpp.jvpp.core.future.FutureJVppCore; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.BridgeDomainsState; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.BridgeDomainsStateBuilder; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.bridge.domains.state.BridgeDomain; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.l2.fib.attributes.L2FibTable; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.l2.fib.attributes.L2FibTableBuilder; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.l2.fib.attributes.l2.fib.table.L2FibEntry; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.BridgeDomainsState; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.BridgeDomainsStateBuilder; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.bridge.domains.state.BridgeDomain; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.l2.fib.attributes.L2FibTable; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.l2.fib.attributes.L2FibTableBuilder; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.l2.fib.attributes.l2.fib.table.L2FibEntry; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; public final class L2StateHoneycombReaderFactory implements ReaderFactory { diff --git a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/factory/SubinterfaceAugmentationWriterFactory.java b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/factory/SubinterfaceAugmentationWriterFactory.java index 7e68f7023..49c7d21c7 100644 --- a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/factory/SubinterfaceAugmentationWriterFactory.java +++ b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/factory/SubinterfaceAugmentationWriterFactory.java @@ -36,8 +36,8 @@ import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.subinterface.span.rev import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.subinterface.span.rev170607.interfaces._interface.sub.interfaces.sub._interface.Span; import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.unnumbered.interfaces.rev180103.SubinterfaceUnnumberedAugmentation; import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.unnumbered.interfaces.rev180103.unnumbered.config.attributes.Unnumbered; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.span.attributes.MirroredInterfaces; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.span.attributes.mirrored.interfaces.MirroredInterface; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.span.attributes.MirroredInterfaces; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.span.attributes.mirrored.interfaces.MirroredInterface; import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.vpp.vlan.rev180319.SubinterfaceAugmentation; import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.vpp.vlan.rev180319.interfaces._interface.SubInterfaces; import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.vpp.vlan.rev180319.interfaces._interface.sub.interfaces.SubInterface; diff --git a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/factory/SubinterfaceStateAugmentationReaderFactory.java b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/factory/SubinterfaceStateAugmentationReaderFactory.java index 36c58e158..6a17f73fa 100644 --- a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/factory/SubinterfaceStateAugmentationReaderFactory.java +++ b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/factory/SubinterfaceStateAugmentationReaderFactory.java @@ -36,7 +36,7 @@ import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.subinterface.span.rev import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.subinterface.span.rev170607.VppSubinterfaceSpanStateAugmentationBuilder; import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.subinterface.span.rev170607.interfaces.state._interface.sub.interfaces.sub._interface.SpanState; import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.subinterface.span.rev170607.interfaces.state._interface.sub.interfaces.sub._interface.SpanStateBuilder; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.span.state.attributes.MirroredInterfaces; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.span.state.attributes.MirroredInterfaces; import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.vpp.vlan.rev180319.SubinterfaceStateAugmentation; import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.vpp.vlan.rev180319.SubinterfaceStateAugmentationBuilder; import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.vpp.vlan.rev180319.interfaces.state._interface.SubInterfaces; diff --git a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/AfPacketCustomizer.java b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/AfPacketCustomizer.java index 4e1a13695..33877aa9f 100644 --- a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/AfPacketCustomizer.java +++ b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/AfPacketCustomizer.java @@ -33,7 +33,7 @@ import io.fd.vpp.jvpp.core.future.FutureJVppCore; import java.nio.charset.StandardCharsets; import java.util.concurrent.CompletionStage; import javax.annotation.Nonnull; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces._interface.AfPacket; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces._interface.AfPacket; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.InterfaceType; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.PhysAddress; @@ -54,7 +54,7 @@ public class AfPacketCustomizer extends AbstractInterfaceTypeCustomizer getExpectedInterfaceType() { - return org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.AfPacket.class; + return org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.AfPacket.class; } @Override diff --git a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/EthernetCustomizer.java b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/EthernetCustomizer.java index e3914ac9d..365193c00 100644 --- a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/EthernetCustomizer.java +++ b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/EthernetCustomizer.java @@ -24,7 +24,7 @@ import io.fd.honeycomb.translate.write.WriteFailedException; import io.fd.vpp.jvpp.core.dto.HwInterfaceSetMtu; import io.fd.vpp.jvpp.core.future.FutureJVppCore; import javax.annotation.Nonnull; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces._interface.Ethernet; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces._interface.Ethernet; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.iana._if.type.rev140508.EthernetCsmacd; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.InterfaceType; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface; diff --git a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/GreCustomizer.java b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/GreCustomizer.java index c948cef87..637511938 100644 --- a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/GreCustomizer.java +++ b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/GreCustomizer.java @@ -29,8 +29,8 @@ import io.fd.vpp.jvpp.core.dto.GreAddDelTunnelReply; import io.fd.vpp.jvpp.core.future.FutureJVppCore; import java.util.concurrent.CompletionStage; import javax.annotation.Nonnull; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.GreTunnel; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces._interface.Gre; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.GreTunnel; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces._interface.Gre; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddressNoZone; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.InterfaceType; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface; diff --git a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/InterconnectionWriteUtils.java b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/InterconnectionWriteUtils.java index 5516acb46..3fe1ea5dc 100644 --- a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/InterconnectionWriteUtils.java +++ b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/InterconnectionWriteUtils.java @@ -31,9 +31,9 @@ import io.fd.vpp.jvpp.core.future.FutureJVppCore; import io.fd.vpp.jvpp.core.types.L2PortType; import java.util.concurrent.CompletionStage; import javax.annotation.Nonnull; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.l2.config.attributes.Interconnection; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.l2.config.attributes.interconnection.BridgeBased; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.l2.config.attributes.interconnection.XconnectBased; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.l2.config.attributes.Interconnection; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.l2.config.attributes.interconnection.BridgeBased; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.l2.config.attributes.interconnection.XconnectBased; import org.opendaylight.yangtools.yang.binding.DataObject; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.slf4j.Logger; diff --git a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/InterfaceRoutingCustomizer.java b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/InterfaceRoutingCustomizer.java index a4b4d3856..31c78b981 100644 --- a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/InterfaceRoutingCustomizer.java +++ b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/InterfaceRoutingCustomizer.java @@ -27,7 +27,7 @@ import io.fd.honeycomb.translate.write.WriteFailedException; import io.fd.vpp.jvpp.core.future.FutureJVppCore; import java.util.List; import javax.annotation.Nonnull; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces._interface.Routing; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces._interface.Routing; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev140616.Interface1; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev140616.interfaces._interface.Ipv4; diff --git a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/L2Customizer.java b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/L2Customizer.java index 686a6f305..b324ae2cc 100644 --- a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/L2Customizer.java +++ b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/L2Customizer.java @@ -23,7 +23,7 @@ import io.fd.honeycomb.translate.write.WriteContext; import io.fd.honeycomb.translate.write.WriteFailedException; import io.fd.vpp.jvpp.core.future.FutureJVppCore; import javax.annotation.Nonnull; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces._interface.L2; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces._interface.L2; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.slf4j.Logger; diff --git a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/LoopbackCustomizer.java b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/LoopbackCustomizer.java index a22348b39..b7309bd91 100644 --- a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/LoopbackCustomizer.java +++ b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/LoopbackCustomizer.java @@ -27,7 +27,7 @@ import io.fd.vpp.jvpp.core.dto.CreateLoopbackReply; import io.fd.vpp.jvpp.core.dto.DeleteLoopback; import io.fd.vpp.jvpp.core.future.FutureJVppCore; import javax.annotation.Nonnull; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces._interface.Loopback; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces._interface.Loopback; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.InterfaceType; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; @@ -47,7 +47,7 @@ public final class LoopbackCustomizer extends AbstractInterfaceTypeCustomizer getExpectedInterfaceType() { - return org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.Loopback.class; + return org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.Loopback.class; } @Override diff --git a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/RoutingCustomizer.java b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/RoutingCustomizer.java index a758a7c35..a23c876b5 100644 --- a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/RoutingCustomizer.java +++ b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/RoutingCustomizer.java @@ -29,7 +29,7 @@ import io.fd.vpp.jvpp.core.dto.SwInterfaceSetTableReply; import io.fd.vpp.jvpp.core.future.FutureJVppCore; import java.util.concurrent.CompletionStage; import javax.annotation.Nonnull; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.RoutingBaseAttributes; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.RoutingBaseAttributes; import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.vpp.fib.table.management.rev180521.VniReference; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.slf4j.Logger; diff --git a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/TapCustomizer.java b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/TapCustomizer.java deleted file mode 100644 index d8efb4d1f..000000000 --- a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/TapCustomizer.java +++ /dev/null @@ -1,190 +0,0 @@ -/* - * Copyright (c) 2016 Cisco and/or its affiliates. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.fd.hc2vpp.v3po.interfaces; - -import io.fd.hc2vpp.common.translate.util.AbstractInterfaceTypeCustomizer; -import io.fd.hc2vpp.common.translate.util.JvppReplyConsumer; -import io.fd.hc2vpp.common.translate.util.MacTranslator; -import io.fd.hc2vpp.common.translate.util.NamingContext; -import io.fd.honeycomb.translate.write.WriteContext; -import io.fd.honeycomb.translate.write.WriteFailedException; -import io.fd.vpp.jvpp.core.dto.TapConnect; -import io.fd.vpp.jvpp.core.dto.TapConnectReply; -import io.fd.vpp.jvpp.core.dto.TapDelete; -import io.fd.vpp.jvpp.core.dto.TapDeleteReply; -import io.fd.vpp.jvpp.core.dto.TapModify; -import io.fd.vpp.jvpp.core.dto.TapModifyReply; -import io.fd.vpp.jvpp.core.future.FutureJVppCore; -import java.nio.charset.StandardCharsets; -import java.util.concurrent.CompletionStage; -import javax.annotation.Nonnull; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces._interface.Tap; -import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.InterfaceType; -import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface; -import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.PhysAddress; -import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class TapCustomizer extends AbstractInterfaceTypeCustomizer implements MacTranslator, JvppReplyConsumer { - - private static final Logger LOG = LoggerFactory.getLogger(TapCustomizer.class); - private final NamingContext interfaceContext; - - public TapCustomizer(final FutureJVppCore vppApi, final NamingContext interfaceContext) { - super(vppApi); - this.interfaceContext = interfaceContext; - } - - @Override - protected Class getExpectedInterfaceType() { - return org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.Tap.class; - } - - @Override - protected final void writeInterface(@Nonnull final InstanceIdentifier id, @Nonnull final Tap dataAfter, - @Nonnull final WriteContext writeContext) - throws WriteFailedException { - final String ifcName = id.firstKeyOf(Interface.class).getName(); - createTap(id, ifcName, dataAfter, writeContext); - } - - @Override - public void updateCurrentAttributes(@Nonnull final InstanceIdentifier id, @Nonnull final Tap dataBefore, - @Nonnull final Tap dataAfter, @Nonnull final WriteContext writeContext) - throws WriteFailedException { - final String ifcName = id.firstKeyOf(Interface.class).getName(); - - final int index; - try { - index = interfaceContext.getIndex(ifcName, writeContext.getMappingContext()); - } catch (IllegalArgumentException e) { - throw new WriteFailedException.UpdateFailedException(id, dataBefore, dataAfter, e); - } - - modifyTap(id, ifcName, index, dataBefore, dataAfter); - } - - @Override - public void deleteCurrentAttributes(@Nonnull final InstanceIdentifier id, @Nonnull final Tap dataBefore, - @Nonnull final WriteContext writeContext) - throws WriteFailedException { - final String ifcName = id.firstKeyOf(Interface.class).getName(); - - final int index; - try { - index = interfaceContext.getIndex(ifcName, writeContext.getMappingContext()); - } catch (IllegalArgumentException e) { - throw new WriteFailedException.DeleteFailedException(id, e); - } - - deleteTap(id, ifcName, index, dataBefore, writeContext); - } - - private void createTap(final InstanceIdentifier id, final String swIfName, final Tap tap, - final WriteContext writeContext) throws WriteFailedException { - LOG.debug("Setting tap interface: {}. Tap: {}", swIfName, tap); - final CompletionStage tapConnectFuture = getFutureJVpp() - .tapConnect(getTapConnectRequest(tap)); - final TapConnectReply reply = getReplyForCreate(tapConnectFuture.toCompletableFuture(), id, tap); - LOG.debug("Tap set successfully for: {}, tap: {}", swIfName, tap); - // Add new interface to our interface context - interfaceContext.addName(reply.swIfIndex, swIfName, writeContext.getMappingContext()); - } - - private void modifyTap(final InstanceIdentifier id, final String swIfName, final int index, - final Tap tapBefore, final Tap tapAfter) throws WriteFailedException { - LOG.debug("Modifying tap interface: {}. Tap: {}", swIfName, tapAfter); - final CompletionStage vxlanAddDelTunnelReplyCompletionStage = - getFutureJVpp() - .tapModify(getTapModifyRequest(tapAfter.getTapName(), index, tapAfter.getMac(), - tapAfter.getDeviceInstance())); - getReplyForUpdate(vxlanAddDelTunnelReplyCompletionStage.toCompletableFuture(), id, tapBefore, tapAfter); - LOG.debug("Tap modified successfully for: {}, tap: {}", swIfName, tapAfter); - } - - private void deleteTap(final InstanceIdentifier id, final String swIfName, final int index, - final Tap dataBefore, final WriteContext writeContext) - throws WriteFailedException { - LOG.debug("Deleting tap interface: {}. Tap: {}", swIfName, dataBefore); - final CompletionStage vxlanAddDelTunnelReplyCompletionStage = - getFutureJVpp().tapDelete(getTapDeleteRequest(index)); - getReplyForDelete(vxlanAddDelTunnelReplyCompletionStage.toCompletableFuture(), id); - LOG.debug("Tap deleted successfully for: {}, tap: {}", swIfName, dataBefore); - // Remove deleted interface from interface context - interfaceContext.removeName(swIfName, writeContext.getMappingContext()); - } - - private TapConnect getTapConnectRequest(final Tap tap) { - final TapConnect tapConnect = new TapConnect(); - tapConnect.tapName = tap.getTapName().getBytes(); - - final PhysAddress mac = tap.getMac(); - if (mac == null) { - tapConnect.useRandomMac = 1; - tapConnect.macAddress = new byte[6]; - } else { - tapConnect.useRandomMac = 0; - tapConnect.macAddress = parseMac(mac.getValue()); - } - - final Long deviceInstance = tap.getDeviceInstance(); - if (deviceInstance == null) { - tapConnect.renumber = 0; - } else { - tapConnect.renumber = 1; - tapConnect.customDevInstance = Math.toIntExact(deviceInstance); - } - - final String tag = tap.getTag(); - if (tag != null) { - tapConnect.tag = tag.getBytes(StandardCharsets.US_ASCII); - } - - return tapConnect; - } - - private TapModify getTapModifyRequest(final String tapName, final int swIndex, final PhysAddress mac, - final Long deviceInstance) { - final TapModify tapConnect = new TapModify(); - tapConnect.tapName = tapName.getBytes(); - tapConnect.swIfIndex = swIndex; - - if (mac == null) { - tapConnect.useRandomMac = 1; - tapConnect.macAddress = new byte[6]; - } else { - tapConnect.useRandomMac = 0; - tapConnect.macAddress = parseMac(mac.getValue()); - } - - if (deviceInstance == null) { - tapConnect.renumber = 0; - } else { - tapConnect.renumber = 1; - tapConnect.customDevInstance = Math.toIntExact(deviceInstance); - } - - return tapConnect; - } - - private TapDelete getTapDeleteRequest(final int swIndex) { - final TapDelete tapConnect = new TapDelete(); - tapConnect.swIfIndex = swIndex; - return tapConnect; - } -} diff --git a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/TapV2Customizer.java b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/TapV2Customizer.java index a008a251a..3b553fd0c 100644 --- a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/TapV2Customizer.java +++ b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/TapV2Customizer.java @@ -34,7 +34,7 @@ import io.fd.vpp.jvpp.core.future.FutureJVppCore; import java.nio.charset.StandardCharsets; import java.util.concurrent.CompletionStage; import javax.annotation.Nonnull; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces._interface.TapV2; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces._interface.TapV2; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Address; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4AddressNoZone; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Prefix; @@ -60,7 +60,7 @@ public class TapV2Customizer extends AbstractInterfaceTypeCustomizer @Override protected Class getExpectedInterfaceType() { - return org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.TapV2.class; + return org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.TapV2.class; } @Override diff --git a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/VhostUserCustomizer.java b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/VhostUserCustomizer.java index c90439dc0..aea1c0890 100644 --- a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/VhostUserCustomizer.java +++ b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/VhostUserCustomizer.java @@ -33,8 +33,8 @@ import io.fd.vpp.jvpp.core.future.FutureJVppCore; import java.nio.charset.StandardCharsets; import java.util.concurrent.CompletionStage; import javax.annotation.Nonnull; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.VhostUserRole; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces._interface.VhostUser; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.VhostUserRole; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces._interface.VhostUser; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.InterfaceType; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; @@ -57,7 +57,7 @@ public class VhostUserCustomizer extends AbstractInterfaceTypeCustomizer getExpectedInterfaceType() { - return org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.VhostUser.class; + return org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.VhostUser.class; } @Override diff --git a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/VxlanCustomizer.java b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/VxlanCustomizer.java index a937e89b5..4d9a3ceee 100644 --- a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/VxlanCustomizer.java +++ b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/VxlanCustomizer.java @@ -30,10 +30,10 @@ import io.fd.vpp.jvpp.core.dto.VxlanAddDelTunnelReply; import io.fd.vpp.jvpp.core.future.FutureJVppCore; import java.util.concurrent.CompletionStage; import javax.annotation.Nonnull; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.L2Input; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.NshProxy; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.VxlanTunnel; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces._interface.Vxlan; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.L2Input; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.NshProxy; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.VxlanTunnel; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces._interface.Vxlan; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddressNoZone; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.InterfaceType; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface; diff --git a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/VxlanGpeCustomizer.java b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/VxlanGpeCustomizer.java index da6e681b8..f73dbe0f6 100644 --- a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/VxlanGpeCustomizer.java +++ b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/VxlanGpeCustomizer.java @@ -30,8 +30,8 @@ import io.fd.vpp.jvpp.core.dto.VxlanGpeAddDelTunnelReply; import io.fd.vpp.jvpp.core.future.FutureJVppCore; import java.util.concurrent.CompletionStage; import javax.annotation.Nonnull; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.VxlanGpeTunnel; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces._interface.VxlanGpe; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.VxlanGpeTunnel; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces._interface.VxlanGpe; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddressNoZone; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.InterfaceType; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface; diff --git a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/span/MirroredInterfaceCustomizer.java b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/span/MirroredInterfaceCustomizer.java index ec4657911..d10feaf73 100644 --- a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/span/MirroredInterfaceCustomizer.java +++ b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/span/MirroredInterfaceCustomizer.java @@ -29,10 +29,10 @@ import io.fd.vpp.jvpp.core.future.FutureJVppCore; import java.util.function.Function; import javax.annotation.Nonnull; import javax.annotation.Nullable; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.SpanState; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.span.attributes.MirroredInterfaces; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.span.attributes.mirrored.interfaces.MirroredInterface; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.span.attributes.mirrored.interfaces.MirroredInterfaceKey; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.SpanState; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.span.attributes.MirroredInterfaces; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.span.attributes.mirrored.interfaces.MirroredInterface; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.span.attributes.mirrored.interfaces.MirroredInterfaceKey; 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/hc2vpp/v3po/interfacesstate/AfPacketCustomizer.java b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/AfPacketCustomizer.java index df51f206e..479acc305 100644 --- a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/AfPacketCustomizer.java +++ b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/AfPacketCustomizer.java @@ -36,10 +36,10 @@ import io.fd.vpp.jvpp.core.dto.SwInterfaceDetails; import io.fd.vpp.jvpp.core.future.FutureJVppCore; import java.util.concurrent.CompletionStage; import javax.annotation.Nonnull; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.VppInterfaceAugmentation; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.VppInterfaceStateAugmentationBuilder; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces.state._interface.AfPacket; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces.state._interface.AfPacketBuilder; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.VppInterfaceAugmentation; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.VppInterfaceStateAugmentationBuilder; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces.state._interface.AfPacket; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces.state._interface.AfPacketBuilder; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.Interface; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.InterfaceKey; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.PhysAddress; @@ -92,7 +92,7 @@ public class AfPacketCustomizer implements InitializingReaderCustomizer init( + public Initialized init( @Nonnull final InstanceIdentifier id, @Nonnull final AfPacket readValue, @Nonnull final ReadContext ctx) { return Initialized.create(getCfgId(id), - new org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces._interface.AfPacketBuilder() + new org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces._interface.AfPacketBuilder() .setHostInterfaceName(readValue.getHostInterfaceName()) .setMac(readValue.getMac()) .build()); } @VisibleForTesting - static InstanceIdentifier getCfgId( + static InstanceIdentifier getCfgId( final InstanceIdentifier id) { return InterfaceCustomizer.getCfgId(RWUtils.cutId(id, Interface.class)) .augmentation(VppInterfaceAugmentation.class) .child( - org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces._interface.AfPacket.class); + org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces._interface.AfPacket.class); } } diff --git a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/EthernetCustomizer.java b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/EthernetCustomizer.java index 868ded39b..71d98a99f 100644 --- a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/EthernetCustomizer.java +++ b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/EthernetCustomizer.java @@ -24,10 +24,10 @@ import io.fd.honeycomb.translate.spi.read.InitializingReaderCustomizer; import io.fd.honeycomb.translate.util.RWUtils; import io.fd.vpp.jvpp.core.dto.SwInterfaceDetails; import javax.annotation.Nonnull; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.VppInterfaceAugmentation; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.VppInterfaceStateAugmentationBuilder; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces.state._interface.Ethernet; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces.state._interface.EthernetBuilder; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.VppInterfaceAugmentation; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.VppInterfaceStateAugmentationBuilder; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces.state._interface.Ethernet; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces.state._interface.EthernetBuilder; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.Interface; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.InterfaceKey; import org.opendaylight.yangtools.concepts.Builder; @@ -86,20 +86,20 @@ public class EthernetCustomizer } @Override - public Initialized init( + public Initialized init( @Nonnull final InstanceIdentifier id, @Nonnull final Ethernet readValue, @Nonnull final ReadContext ctx) { return Initialized.create(getCfgId(id), - new org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces._interface.EthernetBuilder() + new org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces._interface.EthernetBuilder() .setMtu(readValue.getMtu()) .build()); } - private InstanceIdentifier getCfgId( + private InstanceIdentifier getCfgId( final InstanceIdentifier id) { return InterfaceCustomizer.getCfgId(RWUtils.cutId(id, Interface.class)) .augmentation(VppInterfaceAugmentation.class) - .child(org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces._interface.Ethernet.class); + .child(org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces._interface.Ethernet.class); } } diff --git a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/GreCustomizer.java b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/GreCustomizer.java index 2fd4a9eb1..a185c6218 100644 --- a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/GreCustomizer.java +++ b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/GreCustomizer.java @@ -34,11 +34,11 @@ import io.fd.vpp.jvpp.core.dto.GreTunnelDump; import io.fd.vpp.jvpp.core.future.FutureJVppCore; import java.util.concurrent.CompletionStage; import javax.annotation.Nonnull; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.GreTunnel; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.VppInterfaceAugmentation; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.VppInterfaceStateAugmentationBuilder; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces.state._interface.Gre; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces.state._interface.GreBuilder; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.GreTunnel; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.VppInterfaceAugmentation; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.VppInterfaceStateAugmentationBuilder; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces.state._interface.Gre; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces.state._interface.GreBuilder; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddressNoZone; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.Interface; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.InterfaceKey; @@ -124,20 +124,20 @@ public class GreCustomizer extends FutureJVppCustomizer } @Override - public Initialized init( + public Initialized init( @Nonnull final InstanceIdentifier id, @Nonnull final Gre readValue, @Nonnull final ReadContext ctx) { return Initialized.create(getCfgId(id), - new org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces._interface.GreBuilder() + new org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces._interface.GreBuilder() .setDst(readValue.getDst()) .setSrc(readValue.getSrc()) .setOuterFibId(readValue.getOuterFibId()) .build()); } - private InstanceIdentifier getCfgId( + private InstanceIdentifier getCfgId( final InstanceIdentifier id) { return InterfaceCustomizer.getCfgId(RWUtils.cutId(id, Interface.class)) .augmentation(VppInterfaceAugmentation.class) - .child(org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces._interface.Gre.class); + .child(org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces._interface.Gre.class); } } diff --git a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/InterconnectionReadUtils.java b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/InterconnectionReadUtils.java index bca3578d7..17825c0e2 100644 --- a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/InterconnectionReadUtils.java +++ b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/InterconnectionReadUtils.java @@ -35,8 +35,8 @@ import java.util.Optional; import java.util.concurrent.CompletableFuture; import javax.annotation.Nonnull; import javax.annotation.Nullable; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.l2.state.attributes.Interconnection; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.l2.state.attributes.interconnection.BridgeBasedBuilder; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.l2.state.attributes.Interconnection; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.l2.state.attributes.interconnection.BridgeBasedBuilder; 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/hc2vpp/v3po/interfacesstate/InterfaceDataTranslator.java b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/InterfaceDataTranslator.java index e18792080..794507adc 100644 --- a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/InterfaceDataTranslator.java +++ b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/InterfaceDataTranslator.java @@ -30,14 +30,13 @@ import java.util.Objects; import java.util.stream.Collector; import javax.annotation.Nonnull; import javax.annotation.Nullable; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.AfPacket; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.GreTunnel; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.Loopback; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.Tap; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.TapV2; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.VhostUser; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.VxlanGpeTunnel; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.VxlanTunnel; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.AfPacket; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.GreTunnel; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.Loopback; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.TapV2; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.VhostUser; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.VxlanGpeTunnel; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.VxlanTunnel; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.iana._if.type.rev140508.EthernetCsmacd; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.InterfaceType; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.Interface; @@ -116,9 +115,6 @@ public interface InterfaceDataTranslator extends ByteDataTranslator, JvppReplyCo */ @Nonnull default Class getInterfaceType(@Nonnull final String interfaceName) { - if (interfaceName.startsWith("tapcli-")) { - return Tap.class; - } if (interfaceName.startsWith("tap")) { return TapV2.class; diff --git a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/InterfaceRoutingCustomizer.java b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/InterfaceRoutingCustomizer.java index 2e73e9d28..ab63397c6 100644 --- a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/InterfaceRoutingCustomizer.java +++ b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/InterfaceRoutingCustomizer.java @@ -24,10 +24,10 @@ import io.fd.honeycomb.translate.spi.read.InitializingReaderCustomizer; import io.fd.honeycomb.translate.util.RWUtils; import io.fd.vpp.jvpp.core.future.FutureJVppCore; import javax.annotation.Nonnull; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.VppInterfaceAugmentation; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.VppInterfaceStateAugmentationBuilder; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces.state._interface.Routing; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces.state._interface.RoutingBuilder; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.VppInterfaceAugmentation; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.VppInterfaceStateAugmentationBuilder; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces.state._interface.Routing; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces.state._interface.RoutingBuilder; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.Interface; import org.opendaylight.yangtools.concepts.Builder; import org.opendaylight.yangtools.yang.binding.DataObject; @@ -67,22 +67,22 @@ public class InterfaceRoutingCustomizer extends RoutingCustomizer implements @Nonnull @Override - public Initialized init( + public Initialized init( @Nonnull final InstanceIdentifier id, @Nonnull final Routing readValue, @Nonnull final ReadContext ctx) { return Initialized.create(getCfgId(id), - new org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces._interface.RoutingBuilder() + new org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces._interface.RoutingBuilder() .setIpv4VrfId(readValue.getIpv4VrfId()) .setIpv6VrfId(readValue.getIpv6VrfId()) .build()); } - private InstanceIdentifier getCfgId( + private InstanceIdentifier getCfgId( final InstanceIdentifier id) { return InterfaceCustomizer.getCfgId(RWUtils.cutId(id, Interface.class)) .augmentation(VppInterfaceAugmentation.class) .child( - org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces._interface.Routing.class); + org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces._interface.Routing.class); } } diff --git a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/L2Customizer.java b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/L2Customizer.java index 3b41226e9..7a1873ee8 100644 --- a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/L2Customizer.java +++ b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/L2Customizer.java @@ -26,15 +26,15 @@ import io.fd.honeycomb.translate.spi.read.InitializingReaderCustomizer; import io.fd.honeycomb.translate.util.RWUtils; import io.fd.vpp.jvpp.core.future.FutureJVppCore; import javax.annotation.Nonnull; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.VppInterfaceAugmentation; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.VppInterfaceStateAugmentationBuilder; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces.state._interface.L2; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces.state._interface.L2Builder; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.l2.config.attributes.interconnection.BridgeBasedBuilder; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.l2.config.attributes.interconnection.XconnectBasedBuilder; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.l2.state.attributes.Interconnection; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.l2.state.attributes.interconnection.BridgeBased; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.l2.state.attributes.interconnection.XconnectBased; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.VppInterfaceAugmentation; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.VppInterfaceStateAugmentationBuilder; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces.state._interface.L2; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces.state._interface.L2Builder; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.l2.config.attributes.interconnection.BridgeBasedBuilder; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.l2.config.attributes.interconnection.XconnectBasedBuilder; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.l2.state.attributes.Interconnection; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.l2.state.attributes.interconnection.BridgeBased; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.l2.state.attributes.interconnection.XconnectBased; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.Interface; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.InterfaceKey; import org.opendaylight.yangtools.concepts.Builder; @@ -82,13 +82,13 @@ public class L2Customizer extends FutureJVppCustomizer implements InitializingRe } @Override - public Initialized init( + public Initialized init( @Nonnull final InstanceIdentifier id, @Nonnull final L2 readValue, @Nonnull final ReadContext ctx) { - final org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces._interface.L2Builder + final org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces._interface.L2Builder l2Builder = - new org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces._interface.L2Builder(); + new org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces._interface.L2Builder(); final Interconnection interconnection = readValue.getInterconnection(); if (interconnection != null) { @@ -110,10 +110,10 @@ public class L2Customizer extends FutureJVppCustomizer implements InitializingRe return Initialized.create(getCfgId(id), l2Builder.build()); } - private InstanceIdentifier getCfgId( + private InstanceIdentifier getCfgId( final InstanceIdentifier id) { return InterfaceCustomizer.getCfgId(RWUtils.cutId(id, Interface.class)) .augmentation(VppInterfaceAugmentation.class) - .child(org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces._interface.L2.class); + .child(org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces._interface.L2.class); } } diff --git a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/RoutingCustomizer.java b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/RoutingCustomizer.java index 2e2b4556d..6766d3dc9 100644 --- a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/RoutingCustomizer.java +++ b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/RoutingCustomizer.java @@ -27,7 +27,7 @@ import io.fd.vpp.jvpp.core.dto.SwInterfaceGetTableReply; import io.fd.vpp.jvpp.core.future.FutureJVppCore; import java.util.function.Consumer; import javax.annotation.Nonnull; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.RoutingBaseAttributes; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.RoutingBaseAttributes; import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.vpp.fib.table.management.rev180521.VniReference; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; diff --git a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/SubInterfaceL2Customizer.java b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/SubInterfaceL2Customizer.java index c82093c5d..29c89260a 100644 --- a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/SubInterfaceL2Customizer.java +++ b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/SubInterfaceL2Customizer.java @@ -27,8 +27,8 @@ import io.fd.honeycomb.translate.spi.read.InitializingReaderCustomizer; import io.fd.honeycomb.translate.util.RWUtils; import io.fd.vpp.jvpp.core.future.FutureJVppCore; import javax.annotation.Nonnull; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.l2.state.attributes.interconnection.BridgeBased; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.l2.state.attributes.interconnection.XconnectBased; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.l2.state.attributes.interconnection.BridgeBased; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.l2.state.attributes.interconnection.XconnectBased; import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.vpp.vlan.rev180319.interfaces.state._interface.sub.interfaces.SubInterface; import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.vpp.vlan.rev180319.interfaces.state._interface.sub.interfaces.SubInterfaceBuilder; import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.vpp.vlan.rev180319.interfaces.state._interface.sub.interfaces.SubInterfaceKey; @@ -95,13 +95,13 @@ public class SubInterfaceL2Customizer if (readValue.getInterconnection() instanceof XconnectBased) { XconnectBased state = (XconnectBased) readValue.getInterconnection(); builder.setInterconnection( - new org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.l2.config.attributes.interconnection.XconnectBasedBuilder() + new org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.l2.config.attributes.interconnection.XconnectBasedBuilder() .setXconnectOutgoingInterface(state.getXconnectOutgoingInterface()) .build()); } else { BridgeBased state = (BridgeBased) readValue.getInterconnection(); builder.setInterconnection( - new org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.l2.config.attributes.interconnection.BridgeBasedBuilder() + new org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.l2.config.attributes.interconnection.BridgeBasedBuilder() .setBridgeDomain(state.getBridgeDomain()) .setBridgedVirtualInterface(state.isBridgedVirtualInterface()) .setSplitHorizonGroup(state.getSplitHorizonGroup()) diff --git a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/TapCustomizer.java b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/TapCustomizer.java deleted file mode 100644 index e8f019a1f..000000000 --- a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/TapCustomizer.java +++ /dev/null @@ -1,153 +0,0 @@ -/* - * Copyright (c) 2016 Cisco and/or its affiliates. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.fd.hc2vpp.v3po.interfacesstate; - -import static com.google.common.base.Preconditions.checkState; -import static java.lang.String.format; - -import io.fd.hc2vpp.common.translate.util.FutureJVppCustomizer; -import io.fd.hc2vpp.common.translate.util.JvppReplyConsumer; -import io.fd.hc2vpp.common.translate.util.NamingContext; -import io.fd.hc2vpp.v3po.interfacesstate.cache.InterfaceCacheDumpManager; -import io.fd.honeycomb.translate.read.ReadContext; -import io.fd.honeycomb.translate.read.ReadFailedException; -import io.fd.honeycomb.translate.spi.read.Initialized; -import io.fd.honeycomb.translate.spi.read.InitializingReaderCustomizer; -import io.fd.honeycomb.translate.util.RWUtils; -import io.fd.honeycomb.translate.util.read.cache.DumpCacheManager; -import io.fd.honeycomb.translate.util.read.cache.StaticCacheKeyFactory; -import io.fd.vpp.jvpp.core.dto.SwInterfaceDetails; -import io.fd.vpp.jvpp.core.dto.SwInterfaceTapDetails; -import io.fd.vpp.jvpp.core.dto.SwInterfaceTapDetailsReplyDump; -import io.fd.vpp.jvpp.core.dto.SwInterfaceTapDump; -import io.fd.vpp.jvpp.core.future.FutureJVppCore; -import java.util.Optional; -import javax.annotation.Nonnull; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.VppInterfaceAugmentation; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.VppInterfaceStateAugmentationBuilder; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces.state._interface.Tap; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces.state._interface.TapBuilder; -import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.Interface; -import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.InterfaceKey; -import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.PhysAddress; -import org.opendaylight.yangtools.concepts.Builder; -import org.opendaylight.yangtools.yang.binding.DataObject; -import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - - -public class TapCustomizer extends FutureJVppCustomizer - implements InitializingReaderCustomizer, InterfaceDataTranslator, JvppReplyConsumer { - - private static final Logger LOG = LoggerFactory.getLogger(TapCustomizer.class); - private NamingContext interfaceContext; - private final InterfaceCacheDumpManager dumpManager; - private final DumpCacheManager tapDumpManager; - - public TapCustomizer(@Nonnull final FutureJVppCore jvpp, - @Nonnull final NamingContext interfaceContext, - @Nonnull final InterfaceCacheDumpManager dumpManager) { - super(jvpp); - this.interfaceContext = interfaceContext; - this.dumpManager = dumpManager; - this.tapDumpManager = new DumpCacheManager.DumpCacheManagerBuilder() - .withCacheKeyFactory(new StaticCacheKeyFactory(TapCustomizer.class.getName() + "_dump", - SwInterfaceTapDetailsReplyDump.class)) - .withExecutor((identifier, params) -> { - // Full Tap dump has to be performed here, no filter or anything is here to help so at least we cache it - return getReplyForRead(getFutureJVpp() - .swInterfaceTapDump(new SwInterfaceTapDump()).toCompletableFuture(), identifier); - }).build(); - } - - @Override - public void merge(@Nonnull Builder parentBuilder, @Nonnull Tap readValue) { - ((VppInterfaceStateAugmentationBuilder) parentBuilder).setTap(readValue); - } - - @Nonnull - @Override - public TapBuilder getBuilder(@Nonnull InstanceIdentifier id) { - return new TapBuilder(); - } - - @Override - public void readCurrentAttributes(@Nonnull final InstanceIdentifier id, - @Nonnull final TapBuilder builder, - @Nonnull final ReadContext ctx) throws ReadFailedException { - - final InterfaceKey key = id.firstKeyOf(Interface.class); - final int index = interfaceContext.getIndex(key.getName(), ctx.getMappingContext()); - if (!isInterfaceOfType(dumpManager, id, ctx, - org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.Tap.class)) { - return; - } - - LOG.debug("Reading attributes for tap interface: {}", key.getName()); - final SwInterfaceTapDetailsReplyDump reply = tapDumpManager.getDump(id, ctx.getModificationCache()) - .or(new SwInterfaceTapDetailsReplyDump()); - - final Optional detail = reply.swInterfaceTapDetails.stream() - .filter(d -> d.swIfIndex == index) - .findAny(); - - checkState(detail.isPresent(), "Tap interface for index %s not found", index); - final SwInterfaceTapDetails swInterfaceTapDetails = detail.get(); - - LOG.trace("Tap interface: {} attributes returned from VPP: {}", key.getName(), swInterfaceTapDetails); - builder.setTapName(toString(swInterfaceTapDetails.devName)); - - final SwInterfaceDetails ifcDetails = dumpManager.getInterfaceDetail(id, ctx, key.getName()); - - if (ifcDetails.tag[0] != 0) { // tag supplied - builder.setTag(toString(ifcDetails.tag)); - } - LOG.debug("Tap interface: {}, id: {} attributes read as: {}", key.getName(), index, builder); - } - - @Override - public Initialized init( - @Nonnull final InstanceIdentifier id, @Nonnull final Tap readValue, @Nonnull final ReadContext ctx) { - // The MAC address & tag is set from interface details, those details are retrieved from cache - final InterfaceKey key = id.firstKeyOf(Interface.class); - - final SwInterfaceDetails ifcDetails; - try { - ifcDetails = dumpManager.getInterfaceDetail(id, ctx, key.getName()); - } catch (ReadFailedException e) { - throw new IllegalStateException(format("Unable to read interface %s", key.getName()), e); - } - - return Initialized.create(getCfgId(id), - new org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces._interface.TapBuilder() - .setMac(new PhysAddress(vppPhysAddrToYang(ifcDetails.l2Address))) - .setTapName(readValue.getTapName()) - .setTag(ifcDetails.tag[0] == 0 - ? null - : toString(ifcDetails.tag)) -// tapBuilder.setDeviceInstance(); - .build()); - } - - private InstanceIdentifier getCfgId( - final InstanceIdentifier id) { - return InterfaceCustomizer.getCfgId(RWUtils.cutId(id, Interface.class)) - .augmentation(VppInterfaceAugmentation.class) - .child(org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces._interface.Tap.class); - } -} diff --git a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/TapV2Customizer.java b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/TapV2Customizer.java index 4b3814a70..15d909b6a 100644 --- a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/TapV2Customizer.java +++ b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/TapV2Customizer.java @@ -41,10 +41,10 @@ import io.fd.vpp.jvpp.core.dto.SwInterfaceTapV2Dump; import io.fd.vpp.jvpp.core.future.FutureJVppCore; import java.util.Optional; import javax.annotation.Nonnull; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.VppInterfaceAugmentation; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.VppInterfaceStateAugmentationBuilder; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces.state._interface.TapV2; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces.state._interface.TapV2Builder; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.VppInterfaceAugmentation; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.VppInterfaceStateAugmentationBuilder; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces.state._interface.TapV2; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces.state._interface.TapV2Builder; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.Interface; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.InterfaceKey; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.PhysAddress; @@ -99,7 +99,7 @@ public class TapV2Customizer extends FutureJVppCustomizer final InterfaceKey key = id.firstKeyOf(Interface.class); final int index = interfaceContext.getIndex(key.getName(), ctx.getMappingContext()); if (!isInterfaceOfType(dumpManager, id, ctx, - org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.TapV2.class)) { + org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.TapV2.class)) { return; } @@ -173,7 +173,7 @@ public class TapV2Customizer extends FutureJVppCustomizer } @Override - public Initialized init( + public Initialized init( @Nonnull final InstanceIdentifier id, @Nonnull final TapV2 readValue, @Nonnull final ReadContext ctx) { // The MAC address & tag is set from interface details, those details are retrieved from cache @@ -187,7 +187,7 @@ public class TapV2Customizer extends FutureJVppCustomizer } return Initialized.create(getCfgId(id), - new org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces._interface.TapV2Builder() + new org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces._interface.TapV2Builder() .setMac(new PhysAddress(vppPhysAddrToYang(ifcDetails.l2Address))) .setHostInterfaceName(readValue.getHostInterfaceName()) .setTag(ifcDetails.tag[0] == 0 @@ -203,10 +203,10 @@ public class TapV2Customizer extends FutureJVppCustomizer .build()); } - private InstanceIdentifier getCfgId( + private InstanceIdentifier getCfgId( final InstanceIdentifier id) { return InterfaceCustomizer.getCfgId(RWUtils.cutId(id, Interface.class)) .augmentation(VppInterfaceAugmentation.class) - .child(org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces._interface.TapV2.class); + .child(org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces._interface.TapV2.class); } } diff --git a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/VhostUserCustomizer.java b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/VhostUserCustomizer.java index 6039c2719..01b00b5c4 100644 --- a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/VhostUserCustomizer.java +++ b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/VhostUserCustomizer.java @@ -36,11 +36,11 @@ import io.fd.vpp.jvpp.core.future.FutureJVppCore; import java.math.BigInteger; import java.util.concurrent.CompletionStage; import javax.annotation.Nonnull; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.VhostUserRole; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.VppInterfaceAugmentation; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.VppInterfaceStateAugmentationBuilder; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces.state._interface.VhostUser; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces.state._interface.VhostUserBuilder; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.VhostUserRole; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.VppInterfaceAugmentation; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.VppInterfaceStateAugmentationBuilder; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces.state._interface.VhostUser; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces.state._interface.VhostUserBuilder; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.Interface; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.InterfaceKey; import org.opendaylight.yangtools.concepts.Builder; @@ -98,7 +98,7 @@ public class VhostUserCustomizer implements InitializingReaderCustomizer init( + public Initialized init( @Nonnull final InstanceIdentifier id, @Nonnull final VhostUser readValue, @Nonnull final ReadContext ctx) { @@ -149,7 +149,7 @@ public class VhostUserCustomizer implements InitializingReaderCustomizer getCfgId( + private InstanceIdentifier getCfgId( final InstanceIdentifier id) { return InterfaceCustomizer.getCfgId(RWUtils.cutId(id, Interface.class)) .augmentation(VppInterfaceAugmentation.class) - .child(org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces._interface.VhostUser.class); + .child(org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces._interface.VhostUser.class); } } diff --git a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/VxlanCustomizer.java b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/VxlanCustomizer.java index e4cbe149a..3d5ef9974 100644 --- a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/VxlanCustomizer.java +++ b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/VxlanCustomizer.java @@ -36,14 +36,14 @@ import io.fd.vpp.jvpp.core.dto.VxlanTunnelDump; import io.fd.vpp.jvpp.core.future.FutureJVppCore; import java.util.concurrent.CompletionStage; import javax.annotation.Nonnull; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.L2Input; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.NshProxy; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.VppInterfaceAugmentation; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.VppInterfaceStateAugmentationBuilder; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.VxlanTunnel; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.VxlanVni; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces.state._interface.Vxlan; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces.state._interface.VxlanBuilder; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.L2Input; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.NshProxy; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.VppInterfaceAugmentation; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.VppInterfaceStateAugmentationBuilder; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.VxlanTunnel; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.VxlanVni; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces.state._interface.Vxlan; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces.state._interface.VxlanBuilder; import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.vpp.fib.table.management.rev180521.VniReference; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddressNoZone; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.Interface; @@ -142,11 +142,11 @@ public class VxlanCustomizer extends FutureJVppCustomizer } @Override - public Initialized init( + public Initialized init( @Nonnull final InstanceIdentifier id, @Nonnull final Vxlan readValue, @Nonnull final ReadContext ctx) { return Initialized.create(getCfgId(id), - new org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces._interface.VxlanBuilder() + new org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces._interface.VxlanBuilder() .setDst(readValue.getDst()) .setSrc(readValue.getSrc()) .setEncapVrfId(readValue.getEncapVrfId()) @@ -155,10 +155,10 @@ public class VxlanCustomizer extends FutureJVppCustomizer .build()); } - private InstanceIdentifier getCfgId( + private InstanceIdentifier getCfgId( final InstanceIdentifier id) { return InterfaceCustomizer.getCfgId(RWUtils.cutId(id, Interface.class)) .augmentation(VppInterfaceAugmentation.class) - .child(org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces._interface.Vxlan.class); + .child(org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces._interface.Vxlan.class); } } diff --git a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/VxlanGpeCustomizer.java b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/VxlanGpeCustomizer.java index 23e7c3c16..845108f5c 100644 --- a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/VxlanGpeCustomizer.java +++ b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/VxlanGpeCustomizer.java @@ -35,13 +35,13 @@ import io.fd.vpp.jvpp.core.dto.VxlanGpeTunnelDump; import io.fd.vpp.jvpp.core.future.FutureJVppCore; import java.util.concurrent.CompletionStage; import javax.annotation.Nonnull; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.VppInterfaceAugmentation; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.VppInterfaceStateAugmentationBuilder; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.VxlanGpeNextProtocol; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.VxlanGpeTunnel; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.VxlanGpeVni; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces.state._interface.VxlanGpe; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces.state._interface.VxlanGpeBuilder; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.VppInterfaceAugmentation; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.VppInterfaceStateAugmentationBuilder; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.VxlanGpeNextProtocol; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.VxlanGpeTunnel; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.VxlanGpeVni; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces.state._interface.VxlanGpe; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces.state._interface.VxlanGpeBuilder; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddressNoZone; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.Interface; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.InterfaceKey; @@ -132,11 +132,11 @@ public class VxlanGpeCustomizer extends FutureJVppCustomizer } @Override - public Initialized init( + public Initialized init( @Nonnull final InstanceIdentifier id, @Nonnull final VxlanGpe readValue, @Nonnull final ReadContext ctx) { return Initialized.create(getCfgId(id), - new org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces._interface.VxlanGpeBuilder() + new org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces._interface.VxlanGpeBuilder() .setLocal(readValue.getLocal()) .setRemote(readValue.getRemote()) .setVni(new VxlanGpeVni(readValue.getVni())) @@ -146,10 +146,10 @@ public class VxlanGpeCustomizer extends FutureJVppCustomizer .build()); } - private InstanceIdentifier getCfgId( + private InstanceIdentifier getCfgId( final InstanceIdentifier id) { return InterfaceCustomizer.getCfgId(RWUtils.cutId(id, Interface.class)) .augmentation(VppInterfaceAugmentation.class) - .child(org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces._interface.VxlanGpe.class); + .child(org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces._interface.VxlanGpe.class); } } diff --git a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/span/AbstractMirroredInterfacesCustomizer.java b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/span/AbstractMirroredInterfacesCustomizer.java index 4946be8d7..9039e1995 100644 --- a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/span/AbstractMirroredInterfacesCustomizer.java +++ b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/span/AbstractMirroredInterfacesCustomizer.java @@ -30,12 +30,12 @@ import java.util.List; import java.util.function.Function; import java.util.stream.Collectors; import javax.annotation.Nonnull; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.SpanState; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.span.state.attributes.MirroredInterfaces; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.span.state.attributes.MirroredInterfacesBuilder; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.span.state.attributes.mirrored.interfaces.MirroredInterface; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.span.state.attributes.mirrored.interfaces.MirroredInterfaceBuilder; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.span.state.attributes.mirrored.interfaces.MirroredInterfaceKey; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.SpanState; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.span.state.attributes.MirroredInterfaces; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.span.state.attributes.MirroredInterfacesBuilder; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.span.state.attributes.mirrored.interfaces.MirroredInterface; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.span.state.attributes.mirrored.interfaces.MirroredInterfaceBuilder; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.span.state.attributes.mirrored.interfaces.MirroredInterfaceKey; 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/hc2vpp/v3po/interfacesstate/span/InterfaceMirroredInterfacesCustomizer.java b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/span/InterfaceMirroredInterfacesCustomizer.java index 5eaeb83dc..e6c177d7e 100644 --- a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/span/InterfaceMirroredInterfacesCustomizer.java +++ b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/span/InterfaceMirroredInterfacesCustomizer.java @@ -26,12 +26,12 @@ import java.util.Collections; import java.util.Optional; import java.util.stream.Collectors; import javax.annotation.Nonnull; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.VppInterfaceAugmentation; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces.state._interface.SpanBuilder; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.span.attributes.MirroredInterfacesBuilder; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.span.attributes.mirrored.interfaces.MirroredInterfaceBuilder; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.span.attributes.mirrored.interfaces.MirroredInterfaceKey; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.span.state.attributes.MirroredInterfaces; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.VppInterfaceAugmentation; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces.state._interface.SpanBuilder; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.span.attributes.MirroredInterfacesBuilder; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.span.attributes.mirrored.interfaces.MirroredInterfaceBuilder; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.span.attributes.mirrored.interfaces.MirroredInterfaceKey; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.span.state.attributes.MirroredInterfaces; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.Interface; import org.opendaylight.yangtools.concepts.Builder; import org.opendaylight.yangtools.yang.binding.DataObject; @@ -52,12 +52,12 @@ public class InterfaceMirroredInterfacesCustomizer extends AbstractMirroredInter public Initialized init(@Nonnull final InstanceIdentifier id, @Nonnull final MirroredInterfaces readValue, @Nonnull final ReadContext ctx) { - final InstanceIdentifier cfgId = + final InstanceIdentifier cfgId = InterfaceCustomizer.getCfgId(RWUtils.cutId(id, Interface.class)) .augmentation(VppInterfaceAugmentation.class) - .child(org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces._interface.Span.class) - .child(org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.span.attributes.MirroredInterfaces.class); - final org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.span.attributes.MirroredInterfaces + .child(org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces._interface.Span.class) + .child(org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.span.attributes.MirroredInterfaces.class); + final org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.span.attributes.MirroredInterfaces cfgValue = new MirroredInterfacesBuilder() .setMirroredInterface(Optional.ofNullable(readValue.getMirroredInterface()).orElse(Collections.emptyList()) .stream() diff --git a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/span/SubInterfaceMirroredInterfacesCustomizer.java b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/span/SubInterfaceMirroredInterfacesCustomizer.java index 8857e22f4..4af0276c1 100644 --- a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/span/SubInterfaceMirroredInterfacesCustomizer.java +++ b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/span/SubInterfaceMirroredInterfacesCustomizer.java @@ -31,7 +31,7 @@ import javax.annotation.Nonnull; import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.subinterface.span.rev170607.VppSubinterfaceSpanAugmentation; import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.subinterface.span.rev170607.interfaces._interface.sub.interfaces.sub._interface.Span; import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.subinterface.span.rev170607.interfaces.state._interface.sub.interfaces.sub._interface.SpanStateBuilder; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.span.state.attributes.MirroredInterfaces; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.span.state.attributes.MirroredInterfaces; import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.vpp.vlan.rev180319.interfaces.state._interface.sub.interfaces.SubInterface; import org.opendaylight.yangtools.concepts.Builder; import org.opendaylight.yangtools.yang.binding.DataObject; @@ -51,19 +51,19 @@ public class SubInterfaceMirroredInterfacesCustomizer extends AbstractMirroredIn public Initialized init(@Nonnull InstanceIdentifier id, @Nonnull MirroredInterfaces readValue, @Nonnull ReadContext readContext) { - final InstanceIdentifier cfgId = + final InstanceIdentifier cfgId = SubInterfaceCustomizer.getCfgId(RWUtils.cutId(id, SubInterface.class)) .augmentation(VppSubinterfaceSpanAugmentation.class) .child(Span.class) - .child(org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.span.attributes.MirroredInterfaces.class); + .child(org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.span.attributes.MirroredInterfaces.class); - final org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.span.attributes.MirroredInterfaces - cfgValue = new org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.span.attributes.MirroredInterfacesBuilder() + final org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.span.attributes.MirroredInterfaces + cfgValue = new org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.span.attributes.MirroredInterfacesBuilder() .setMirroredInterface( Optional.ofNullable(readValue.getMirroredInterface()).orElse(Collections.emptyList()) .stream() - .map(mirroredInterface -> new org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.span.attributes.mirrored.interfaces.MirroredInterfaceBuilder() - .withKey(new org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.span.attributes.mirrored.interfaces.MirroredInterfaceKey(mirroredInterface.key().getIfaceRef())) + .map(mirroredInterface -> new org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.span.attributes.mirrored.interfaces.MirroredInterfaceBuilder() + .withKey(new org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.span.attributes.mirrored.interfaces.MirroredInterfaceKey(mirroredInterface.key().getIfaceRef())) .setIfaceRef(mirroredInterface.getIfaceRef()) .setState(mirroredInterface.getState()) .build()) diff --git a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/l2/ArpTerminationTableEntryCustomizer.java b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/l2/ArpTerminationTableEntryCustomizer.java index 168697c64..c8120fcf4 100644 --- a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/l2/ArpTerminationTableEntryCustomizer.java +++ b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/l2/ArpTerminationTableEntryCustomizer.java @@ -35,9 +35,9 @@ import io.fd.vpp.jvpp.core.types.Ip4Address; import io.fd.vpp.jvpp.core.types.MacAddress; import java.util.concurrent.CompletionStage; import javax.annotation.Nonnull; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.bridge.domain.attributes.arp.termination.table.ArpTerminationTableEntry; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.bridge.domain.attributes.arp.termination.table.ArpTerminationTableEntryKey; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.bridge.domains.BridgeDomain; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.bridge.domain.attributes.arp.termination.table.ArpTerminationTableEntry; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.bridge.domain.attributes.arp.termination.table.ArpTerminationTableEntryKey; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.bridge.domains.BridgeDomain; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddressNoZone; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.slf4j.Logger; diff --git a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/l2/BridgeDomainCustomizer.java b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/l2/BridgeDomainCustomizer.java index 692f87f0e..96748d3c3 100644 --- a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/l2/BridgeDomainCustomizer.java +++ b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/l2/BridgeDomainCustomizer.java @@ -36,11 +36,11 @@ import java.util.Collections; import java.util.Optional; import javax.annotation.Nonnull; import javax.annotation.concurrent.GuardedBy; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.L2ConfigAttributes; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.VppInterfaceAugmentation; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.bridge.domains.BridgeDomain; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.bridge.domains.BridgeDomainKey; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.l2.config.attributes.interconnection.BridgeBased; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.L2ConfigAttributes; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.VppInterfaceAugmentation; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.bridge.domains.BridgeDomain; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.bridge.domains.BridgeDomainKey; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.l2.config.attributes.interconnection.BridgeBased; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.Interfaces; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.slf4j.Logger; diff --git a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/l2/L2FibEntryCustomizer.java b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/l2/L2FibEntryCustomizer.java index 9b587888f..641e309cf 100644 --- a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/l2/L2FibEntryCustomizer.java +++ b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/l2/L2FibEntryCustomizer.java @@ -33,10 +33,10 @@ import io.fd.vpp.jvpp.core.dto.L2FibAddDelReply; import io.fd.vpp.jvpp.core.future.FutureJVppCore; import java.util.concurrent.CompletionStage; import javax.annotation.Nonnull; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.L2FibFilter; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.bridge.domains.BridgeDomain; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.l2.fib.attributes.l2.fib.table.L2FibEntry; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.l2.fib.attributes.l2.fib.table.L2FibEntryKey; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.L2FibFilter; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.bridge.domains.BridgeDomain; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.l2.fib.attributes.l2.fib.table.L2FibEntry; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.l2.fib.attributes.l2.fib.table.L2FibEntryKey; 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/hc2vpp/v3po/l2state/BridgeDomainCustomizer.java b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/l2state/BridgeDomainCustomizer.java index ec6747fcc..31cf89f9b 100644 --- a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/l2state/BridgeDomainCustomizer.java +++ b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/l2state/BridgeDomainCustomizer.java @@ -33,11 +33,11 @@ import java.util.ArrayList; import java.util.Collections; import java.util.List; import javax.annotation.Nonnull; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.BridgeDomains; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.BridgeDomainsStateBuilder; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.bridge.domains.state.BridgeDomain; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.bridge.domains.state.BridgeDomainBuilder; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.bridge.domains.state.BridgeDomainKey; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.BridgeDomains; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.BridgeDomainsStateBuilder; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.bridge.domains.state.BridgeDomain; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.bridge.domains.state.BridgeDomainBuilder; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.bridge.domains.state.BridgeDomainKey; import org.opendaylight.yangtools.concepts.Builder; import org.opendaylight.yangtools.yang.binding.DataObject; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; @@ -153,12 +153,12 @@ public final class BridgeDomainCustomizer extends FutureJVppCustomizer } @Override - public Initialized init( + public Initialized init( @Nonnull final InstanceIdentifier id, @Nonnull final BridgeDomain readValue, @Nonnull final ReadContext ctx) { return Initialized.create(getCfgId(id), - new org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.bridge.domains.BridgeDomainBuilder() + new org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.bridge.domains.BridgeDomainBuilder() .setName(readValue.getName()) .setLearn(readValue.isLearn()) .setUnknownUnicastFlood(readValue.isUnknownUnicastFlood()) @@ -168,11 +168,11 @@ public final class BridgeDomainCustomizer extends FutureJVppCustomizer .build()); } - static InstanceIdentifier getCfgId( + static InstanceIdentifier getCfgId( final InstanceIdentifier id) { return InstanceIdentifier.create(BridgeDomains.class).child( - org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.bridge.domains.BridgeDomain.class, - new org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.bridge.domains.BridgeDomainKey( + org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.bridge.domains.BridgeDomain.class, + new org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.bridge.domains.BridgeDomainKey( id.firstKeyOf(BridgeDomain.class).getName())); } } diff --git a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/l2state/L2FibEntryCustomizer.java b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/l2state/L2FibEntryCustomizer.java index bc3087427..40c407af6 100644 --- a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/l2state/L2FibEntryCustomizer.java +++ b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/l2state/L2FibEntryCustomizer.java @@ -36,15 +36,15 @@ import java.util.concurrent.CompletableFuture; import java.util.stream.Collector; import java.util.stream.Collectors; import javax.annotation.Nonnull; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.L2FibFilter; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.L2FibForward; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.bridge.domains.state.BridgeDomain; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.bridge.domains.state.BridgeDomainKey; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.l2.fib.attributes.L2FibTable; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.l2.fib.attributes.L2FibTableBuilder; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.l2.fib.attributes.l2.fib.table.L2FibEntry; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.l2.fib.attributes.l2.fib.table.L2FibEntryBuilder; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.l2.fib.attributes.l2.fib.table.L2FibEntryKey; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.L2FibFilter; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.L2FibForward; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.bridge.domains.state.BridgeDomain; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.bridge.domains.state.BridgeDomainKey; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.l2.fib.attributes.L2FibTable; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.l2.fib.attributes.L2FibTableBuilder; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.l2.fib.attributes.l2.fib.table.L2FibEntry; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.l2.fib.attributes.l2.fib.table.L2FibEntryBuilder; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.l2.fib.attributes.l2.fib.table.L2FibEntryKey; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.PhysAddress; import org.opendaylight.yangtools.concepts.Builder; import org.opendaylight.yangtools.yang.binding.DataObject; diff --git a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/notification/InterfaceChangeNotificationProducer.java b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/notification/InterfaceChangeNotificationProducer.java index 84f4f36eb..9f2dec06b 100644 --- a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/notification/InterfaceChangeNotificationProducer.java +++ b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/notification/InterfaceChangeNotificationProducer.java @@ -38,12 +38,12 @@ import java.util.concurrent.TimeoutException; import javax.annotation.Nonnull; import javax.annotation.Nullable; import javax.annotation.concurrent.NotThreadSafe; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.InterfaceDeleted; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.InterfaceDeletedBuilder; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.InterfaceNameOrIndex; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.InterfaceStateChange; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.InterfaceStateChangeBuilder; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.InterfaceStatus; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.InterfaceDeleted; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.InterfaceDeletedBuilder; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.InterfaceNameOrIndex; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.InterfaceStateChange; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.InterfaceStateChangeBuilder; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.InterfaceStatus; import org.opendaylight.yangtools.yang.binding.Notification; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/AfPacketCustomizerTest.java b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/AfPacketCustomizerTest.java index 048c7178a..29b562f02 100644 --- a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/AfPacketCustomizerTest.java +++ b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/AfPacketCustomizerTest.java @@ -31,9 +31,9 @@ import io.fd.vpp.jvpp.core.dto.AfPacketDelete; import io.fd.vpp.jvpp.core.dto.AfPacketDeleteReply; import java.nio.charset.StandardCharsets; import org.junit.Test; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.VppInterfaceAugmentation; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces._interface.AfPacket; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces._interface.AfPacketBuilder; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.VppInterfaceAugmentation; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces._interface.AfPacket; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces._interface.AfPacketBuilder; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.Interfaces; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.InterfaceKey; @@ -53,7 +53,7 @@ public class AfPacketCustomizerTest extends WriterCustomizerTest implements Ipv4 @Override public void setUpTest() throws Exception { InterfaceTypeTestUtils.setupWriteContext(writeContext, - org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.AfPacket.class); + org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.AfPacket.class); customizer = new AfPacketCustomizer(api, new NamingContext("generatedInterfaceName", IFC_TEST_INSTANCE)); final AfPacketCreateReply createReply = new AfPacketCreateReply(); diff --git a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/EthernetCustomizerTest.java b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/EthernetCustomizerTest.java index bd9c3f741..c948eb243 100644 --- a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/EthernetCustomizerTest.java +++ b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/EthernetCustomizerTest.java @@ -27,9 +27,9 @@ import io.fd.honeycomb.translate.write.WriteFailedException; import io.fd.vpp.jvpp.core.dto.HwInterfaceSetMtu; import io.fd.vpp.jvpp.core.dto.HwInterfaceSetMtuReply; import org.junit.Test; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.VppInterfaceAugmentation; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces._interface.Ethernet; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces._interface.EthernetBuilder; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.VppInterfaceAugmentation; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces._interface.Ethernet; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces._interface.EthernetBuilder; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.iana._if.type.rev140508.EthernetCsmacd; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.Interfaces; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface; diff --git a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/GreCustomizerTest.java b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/GreCustomizerTest.java index 065904284..932f3065c 100644 --- a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/GreCustomizerTest.java +++ b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/GreCustomizerTest.java @@ -36,9 +36,9 @@ import io.fd.vpp.jvpp.core.dto.GreAddDelTunnel; import io.fd.vpp.jvpp.core.dto.GreAddDelTunnelReply; import org.junit.Test; import org.mockito.ArgumentCaptor; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.VppInterfaceAugmentation; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces._interface.Gre; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces._interface.GreBuilder; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.VppInterfaceAugmentation; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces._interface.Gre; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces._interface.GreBuilder; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddressNoZone; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4AddressNoZone; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.Interfaces; @@ -68,7 +68,7 @@ public class GreCustomizerTest extends WriterCustomizerTest implements AddressTr @Override public void setUpTest() throws Exception { InterfaceTypeTestUtils.setupWriteContext(writeContext, - org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.GreTunnel.class); + org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.GreTunnel.class); customizer = new GreCustomizer(api, new NamingContext("generateInterfaceNAme", IFC_TEST_INSTANCE)); } diff --git a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/InterfaceRoutingCustomizerTest.java b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/InterfaceRoutingCustomizerTest.java index 785c37616..e78eb2fd7 100644 --- a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/InterfaceRoutingCustomizerTest.java +++ b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/InterfaceRoutingCustomizerTest.java @@ -29,9 +29,9 @@ import io.fd.vpp.jvpp.core.dto.SwInterfaceSetTable; import io.fd.vpp.jvpp.core.dto.SwInterfaceSetTableReply; import java.util.Collections; import org.junit.Test; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.VppInterfaceAugmentation; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces._interface.Routing; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces._interface.RoutingBuilder; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.VppInterfaceAugmentation; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces._interface.Routing; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces._interface.RoutingBuilder; import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.vpp.fib.table.management.rev180521.VniReference; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.Interfaces; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface; diff --git a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/L2CustomizerTest.java b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/L2CustomizerTest.java index 071bf0df1..78ede7e3e 100644 --- a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/L2CustomizerTest.java +++ b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/L2CustomizerTest.java @@ -33,14 +33,14 @@ import io.fd.vpp.jvpp.core.dto.SwInterfaceSetL2Xconnect; import io.fd.vpp.jvpp.core.dto.SwInterfaceSetL2XconnectReply; import io.fd.vpp.jvpp.core.types.L2PortType; import org.junit.Test; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.VppInterfaceAugmentation; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces._interface.L2; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces._interface.L2Builder; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.l2.config.attributes.Interconnection; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.l2.config.attributes.interconnection.BridgeBased; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.l2.config.attributes.interconnection.BridgeBasedBuilder; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.l2.config.attributes.interconnection.XconnectBased; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.l2.config.attributes.interconnection.XconnectBasedBuilder; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.VppInterfaceAugmentation; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces._interface.L2; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces._interface.L2Builder; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.l2.config.attributes.Interconnection; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.l2.config.attributes.interconnection.BridgeBased; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.l2.config.attributes.interconnection.BridgeBasedBuilder; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.l2.config.attributes.interconnection.XconnectBased; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.l2.config.attributes.interconnection.XconnectBasedBuilder; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.Interfaces; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.InterfaceKey; diff --git a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/LoopbackCustomizerTest.java b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/LoopbackCustomizerTest.java index 3af156819..7b7eec7d1 100644 --- a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/LoopbackCustomizerTest.java +++ b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/LoopbackCustomizerTest.java @@ -32,9 +32,9 @@ import io.fd.vpp.jvpp.core.dto.DeleteLoopbackReply; import org.junit.Test; import org.mockito.invocation.InvocationOnMock; import org.mockito.stubbing.Answer; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.VppInterfaceAugmentation; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces._interface.Loopback; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces._interface.LoopbackBuilder; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.VppInterfaceAugmentation; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces._interface.Loopback; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces._interface.LoopbackBuilder; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.Interfaces; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.InterfaceKey; @@ -49,7 +49,7 @@ public class LoopbackCustomizerTest extends WriterCustomizerTest { @Override public void setUpTest() throws Exception { InterfaceTypeTestUtils.setupWriteContext(writeContext, - org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.Loopback.class); + org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.Loopback.class); loopCustomizer = new LoopbackCustomizer(api, new NamingContext("ifcintest", IFC_TEST_INSTANCE)); } diff --git a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/SubInterfaceL2CustomizerTest.java b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/SubInterfaceL2CustomizerTest.java index a1a34f764..95b477646 100644 --- a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/SubInterfaceL2CustomizerTest.java +++ b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/SubInterfaceL2CustomizerTest.java @@ -28,7 +28,7 @@ import io.fd.vpp.jvpp.core.dto.SwInterfaceSetL2Bridge; import io.fd.vpp.jvpp.core.dto.SwInterfaceSetL2BridgeReply; import io.fd.vpp.jvpp.core.types.L2PortType; import org.junit.Test; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.l2.config.attributes.interconnection.BridgeBasedBuilder; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.l2.config.attributes.interconnection.BridgeBasedBuilder; import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.vpp.vlan.rev180319.SubinterfaceAugmentation; import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.vpp.vlan.rev180319.interfaces._interface.SubInterfaces; import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.vpp.vlan.rev180319.interfaces._interface.sub.interfaces.SubInterface; diff --git a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/TapCustomizerTest.java b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/TapCustomizerTest.java deleted file mode 100644 index b3ad6e228..000000000 --- a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/TapCustomizerTest.java +++ /dev/null @@ -1,129 +0,0 @@ -/* - * Copyright (c) 2016 Cisco and/or its affiliates. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.fd.hc2vpp.v3po.interfaces; - -import static org.mockito.Matchers.any; -import static org.mockito.Matchers.eq; -import static org.mockito.Mockito.doAnswer; -import static org.mockito.Mockito.doReturn; -import static org.mockito.Mockito.times; -import static org.mockito.Mockito.verify; - -import io.fd.hc2vpp.common.test.write.WriterCustomizerTest; -import io.fd.hc2vpp.common.translate.util.NamingContext; -import io.fd.vpp.jvpp.core.dto.TapConnect; -import io.fd.vpp.jvpp.core.dto.TapConnectReply; -import io.fd.vpp.jvpp.core.dto.TapDelete; -import io.fd.vpp.jvpp.core.dto.TapDeleteReply; -import io.fd.vpp.jvpp.core.dto.TapModify; -import io.fd.vpp.jvpp.core.dto.TapModifyReply; -import org.junit.Test; -import org.mockito.invocation.InvocationOnMock; -import org.mockito.stubbing.Answer; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.VppInterfaceAugmentation; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces._interface.Tap; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces._interface.TapBuilder; -import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.Interfaces; -import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface; -import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.InterfaceKey; -import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.PhysAddress; -import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; - -public class TapCustomizerTest extends WriterCustomizerTest { - - private static final String IFC_TEST_INSTANCE = "ifc-test-instance"; - private TapCustomizer tapCustomizer; - - @Override - public void setUpTest() throws Exception { - InterfaceTypeTestUtils.setupWriteContext(writeContext, - org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.Tap.class); - tapCustomizer = new TapCustomizer(api, new NamingContext("ifcintest", IFC_TEST_INSTANCE)); - } - - @Test - public void testCreate() throws Exception { - doAnswer(new Answer() { - - int idx = 0; - - @Override - public Object answer(final InvocationOnMock invocation) throws Throwable { - final TapConnectReply t = new TapConnectReply(); - t.swIfIndex = idx++; - return future(t); - } - }).when(api).tapConnect(any(TapConnect.class)); - - tapCustomizer.writeCurrentAttributes(getTapId("tap"), getTapData("tap", "ff:ff:ff:ff:ff:ff"), writeContext); - tapCustomizer.writeCurrentAttributes(getTapId("tap2"), getTapData("tap2", "ff:ff:ff:ff:ff:ff"), writeContext); - - verify(api, times(2)).tapConnect(any(TapConnect.class)); - verify(mappingContext).put(eq(mappingIid("tap", IFC_TEST_INSTANCE)), eq( - mapping("tap", 0).get())); - verify(mappingContext).put(eq(mappingIid("tap2", IFC_TEST_INSTANCE)), eq( - mapping("tap2", 1).get())); - } - - @Test - public void testModify() throws Exception { - final TapConnectReply t = new TapConnectReply(); - t.swIfIndex = 0; - doReturn(future(t)).when(api).tapConnect(any(TapConnect.class)); - - final TapModifyReply tmodif = new TapModifyReply(); - tmodif.swIfIndex = 0; - doReturn(future(tmodif)).when(api).tapModify(any(TapModify.class)); - - tapCustomizer.writeCurrentAttributes(getTapId("tap"), getTapData("tap", "ff:ff:ff:ff:ff:ff"), writeContext); - - defineMapping(mappingContext, "tap", 1, IFC_TEST_INSTANCE); - tapCustomizer.updateCurrentAttributes(getTapId("tap"), getTapData("tap", "ff:ff:ff:ff:ff:ff"), getTapData("tap", "ff:ff:ff:ff:ff:f1"), writeContext); - - verify(api).tapConnect(any(TapConnect.class)); - verify(api).tapModify(any(TapModify.class)); - - verify(mappingContext).put(eq(mappingIid("tap", IFC_TEST_INSTANCE)), eq( - mapping("tap", 0).get())); - } - - @Test - public void testDelete() throws Exception { - final TapConnectReply t = new TapConnectReply(); - t.swIfIndex = 0; - doReturn(future(t)).when(api).tapConnect(any(TapConnect.class)); - - doReturn(future(new TapDeleteReply())).when(api).tapDelete(any(TapDelete.class)); - - tapCustomizer.writeCurrentAttributes(getTapId("tap"), getTapData("tap", "ff:ff:ff:ff:ff:ff"), writeContext); - defineMapping(mappingContext, "tap", 1, IFC_TEST_INSTANCE); - tapCustomizer.deleteCurrentAttributes(getTapId("tap"), getTapData("tap", "ff:ff:ff:ff:ff:ff"), writeContext); - - verify(api).tapConnect(any(TapConnect.class)); - verify(api).tapDelete(any(TapDelete.class)); - verify(mappingContext).delete(eq(mappingIid("tap", IFC_TEST_INSTANCE))); - } - - private InstanceIdentifier getTapId(final String tap) { - return InstanceIdentifier.create(Interfaces.class).child(Interface.class, new InterfaceKey(tap)).augmentation( - VppInterfaceAugmentation.class).child(Tap.class); - } - - private Tap getTapData(final String tap, final String mac) { - return new TapBuilder().setTapName(tap).setMac(new PhysAddress(mac)).build(); - } -} diff --git a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/TapV2CustomizerTest.java b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/TapV2CustomizerTest.java index a2a7b0279..799214950 100644 --- a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/TapV2CustomizerTest.java +++ b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/TapV2CustomizerTest.java @@ -35,9 +35,9 @@ import io.fd.vpp.jvpp.core.dto.TapDeleteV2Reply; import java.util.concurrent.atomic.AtomicInteger; import org.junit.Assert; import org.junit.Test; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.VppInterfaceAugmentation; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces._interface.TapV2; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces._interface.TapV2Builder; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.VppInterfaceAugmentation; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces._interface.TapV2; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces._interface.TapV2Builder; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Address; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Prefix; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv6Address; @@ -69,7 +69,7 @@ public class TapV2CustomizerTest extends WriterCustomizerTest @Override public void setUpTest() throws Exception { InterfaceTypeTestUtils.setupWriteContext(writeContext, - org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.TapV2.class); + org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.TapV2.class); tapCustomizer = new TapV2Customizer(api, new NamingContext("ifcintest", IFC_TEST_INSTANCE)); } diff --git a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/VhostUserCustomizerTest.java b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/VhostUserCustomizerTest.java index dbe0ddf55..712965b52 100644 --- a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/VhostUserCustomizerTest.java +++ b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/VhostUserCustomizerTest.java @@ -43,10 +43,10 @@ import io.fd.vpp.jvpp.core.dto.ModifyVhostUserIf; import io.fd.vpp.jvpp.core.dto.ModifyVhostUserIfReply; import org.junit.Test; import org.mockito.ArgumentCaptor; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.VhostUserRole; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.VppInterfaceAugmentation; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces._interface.VhostUser; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces._interface.VhostUserBuilder; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.VhostUserRole; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.VppInterfaceAugmentation; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces._interface.VhostUser; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces._interface.VhostUserBuilder; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.Interfaces; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.InterfaceKey; @@ -71,7 +71,7 @@ public class VhostUserCustomizerTest extends WriterCustomizerTest implements Ipv @Override public void setUpTest() throws Exception { InterfaceTypeTestUtils.setupWriteContext(writeContext, - org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.VhostUser.class); + org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.VhostUser.class); customizer = new VhostUserCustomizer(api, new NamingContext("generatedInterfaceName", "test-instance")); } diff --git a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/VxlanCustomizerTest.java b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/VxlanCustomizerTest.java index c8bdde985..b4880d7df 100644 --- a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/VxlanCustomizerTest.java +++ b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/VxlanCustomizerTest.java @@ -39,11 +39,11 @@ import io.fd.vpp.jvpp.core.dto.VxlanAddDelTunnelReply; import org.junit.Test; import org.mockito.ArgumentCaptor; import org.mockito.Mock; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.L2Input; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.VppInterfaceAugmentation; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.VxlanVni; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces._interface.Vxlan; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces._interface.VxlanBuilder; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.L2Input; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.VppInterfaceAugmentation; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.VxlanVni; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces._interface.Vxlan; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces._interface.VxlanBuilder; import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.vpp.fib.table.management.rev180521.VniReference; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddressNoZone; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4AddressNoZone; @@ -81,7 +81,7 @@ public class VxlanCustomizerTest extends WriterCustomizerTest implements Address @Override public void setUpTest() throws Exception { InterfaceTypeTestUtils.setupWriteContext(writeContext, - org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.VxlanTunnel.class); + org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.VxlanTunnel.class); customizer = new VxlanCustomizer(api, new NamingContext("generateInterfaceNAme", "test-instance"), disableContext); diff --git a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/VxlanGpeCustomizerTest.java b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/VxlanGpeCustomizerTest.java index 3cc3b5173..d3806b54a 100644 --- a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/VxlanGpeCustomizerTest.java +++ b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/VxlanGpeCustomizerTest.java @@ -38,11 +38,11 @@ import io.fd.vpp.jvpp.core.dto.VxlanGpeAddDelTunnelReply; import org.junit.Test; import org.mockito.ArgumentCaptor; import org.mockito.Mock; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.VppInterfaceAugmentation; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.VxlanGpeNextProtocol; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.VxlanGpeVni; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces._interface.VxlanGpe; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces._interface.VxlanGpeBuilder; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.VppInterfaceAugmentation; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.VxlanGpeNextProtocol; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.VxlanGpeVni; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces._interface.VxlanGpe; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces._interface.VxlanGpeBuilder; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddressNoZone; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4AddressNoZone; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.Interfaces; @@ -80,7 +80,7 @@ public class VxlanGpeCustomizerTest extends WriterCustomizerTest implements Addr @Override public void setUpTest() throws Exception { InterfaceTypeTestUtils.setupWriteContext(writeContext, - org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.VxlanGpeTunnel.class); + org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.VxlanGpeTunnel.class); NamingContext namingContext = new NamingContext("generateInterfaceName", "test-instance"); customizer = new VxlanGpeCustomizer(api, namingContext, interfaceDisableContext); diff --git a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/span/MirroredInterfacesCustomizerTest.java b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/span/MirroredInterfacesCustomizerTest.java index 73895a86f..712c6ac9e 100644 --- a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/span/MirroredInterfacesCustomizerTest.java +++ b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/span/MirroredInterfacesCustomizerTest.java @@ -30,12 +30,12 @@ import io.fd.vpp.jvpp.core.dto.SwInterfaceSpanEnableDisableReply; import org.junit.Test; import org.mockito.ArgumentCaptor; import org.mockito.Captor; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.SpanState; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.VppInterfaceAugmentation; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces._interface.Span; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.span.attributes.MirroredInterfaces; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.span.attributes.mirrored.interfaces.MirroredInterface; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.span.attributes.mirrored.interfaces.MirroredInterfaceBuilder; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.SpanState; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.VppInterfaceAugmentation; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces._interface.Span; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.span.attributes.MirroredInterfaces; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.span.attributes.mirrored.interfaces.MirroredInterface; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.span.attributes.mirrored.interfaces.MirroredInterfaceBuilder; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.Interfaces; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.InterfaceKey; diff --git a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfacesstate/AfPacketCustomizerTest.java b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfacesstate/AfPacketCustomizerTest.java index 4e85bd7c3..107032f9b 100644 --- a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfacesstate/AfPacketCustomizerTest.java +++ b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfacesstate/AfPacketCustomizerTest.java @@ -35,10 +35,10 @@ import io.fd.vpp.jvpp.core.dto.SwInterfaceDetails; import java.util.Collections; import org.junit.Test; import org.mockito.Mock; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.VppInterfaceStateAugmentation; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.VppInterfaceStateAugmentationBuilder; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces.state._interface.AfPacket; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces.state._interface.AfPacketBuilder; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.VppInterfaceStateAugmentation; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.VppInterfaceStateAugmentationBuilder; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces.state._interface.AfPacket; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces.state._interface.AfPacketBuilder; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.InterfacesState; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.Interface; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.InterfaceKey; @@ -100,9 +100,9 @@ public class AfPacketCustomizerTest extends InitializingReaderCustomizerTest implements InterfaceDumpHelper { - - private static final String IFC_CTX_NAME = "ifc-test-instance"; - private static final String IF_NAME = "tapcli-1"; - private static final String TAP_NAME = "testTapName"; - private static final int IF_INDEX = 1; - private static final InstanceIdentifier IID = - InstanceIdentifier.create(InterfacesState.class).child(Interface.class, new InterfaceKey(IF_NAME)) - .augmentation(VppInterfaceStateAugmentation.class).child(Tap.class); - private NamingContext interfaceContext; - - @Mock - private InterfaceCacheDumpManager dumpCacheManager; - - public TapCustomizerTest() { - super(Tap.class, VppInterfaceStateAugmentationBuilder.class); - } - - @Override - protected void setUp() throws Exception { - interfaceContext = new NamingContext("generatedIfaceName", IFC_CTX_NAME); - defineMapping(mappingContext, IF_NAME, IF_INDEX, IFC_CTX_NAME); - when(dumpCacheManager.getInterfaceDetail(IID, ctx, IF_NAME)).thenReturn(ifaceDetails()); - } - - private SwInterfaceDetails ifaceDetails() { - final SwInterfaceDetails details = new SwInterfaceDetails(); - details.swIfIndex = IF_INDEX; - details.interfaceName = IF_NAME.getBytes(); - details.tag = new byte[64]; - return details; - } - - @Override - protected ReaderCustomizer initCustomizer() { - return new TapCustomizer(api, interfaceContext, dumpCacheManager); - } - - @Test - public void testRead() throws ReadFailedException { - final TapBuilder builder = mock(TapBuilder.class); - when(api.swInterfaceTapDump(any())).thenReturn(future(tapDump())); - getCustomizer().readCurrentAttributes(IID, builder, ctx); - verify(builder).setTapName(TAP_NAME); - } - - @Test(expected = ReadFailedException.class) - public void testReadFailed() throws ReadFailedException { - when(api.swInterfaceTapDump(any())).thenReturn(failedFuture()); - getCustomizer().readCurrentAttributes(IID, mock(TapBuilder.class), ctx); - } - - private SwInterfaceTapDetailsReplyDump tapDump() { - final SwInterfaceTapDetailsReplyDump reply = new SwInterfaceTapDetailsReplyDump(); - final SwInterfaceTapDetails details = new SwInterfaceTapDetails(); - details.devName = TAP_NAME.getBytes(); - details.swIfIndex = IF_INDEX; - reply.swInterfaceTapDetails.add(details); - return reply; - } -} diff --git a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfacesstate/TapV2CustomizerTest.java b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfacesstate/TapV2CustomizerTest.java index 6d052ad92..96db206c4 100644 --- a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfacesstate/TapV2CustomizerTest.java +++ b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfacesstate/TapV2CustomizerTest.java @@ -36,10 +36,10 @@ import io.fd.vpp.jvpp.core.dto.SwInterfaceTapV2Details; import io.fd.vpp.jvpp.core.dto.SwInterfaceTapV2DetailsReplyDump; import org.junit.Test; import org.mockito.Mock; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.VppInterfaceStateAugmentation; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.VppInterfaceStateAugmentationBuilder; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces.state._interface.TapV2; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces.state._interface.TapV2Builder; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.VppInterfaceStateAugmentation; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.VppInterfaceStateAugmentationBuilder; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces.state._interface.TapV2; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces.state._interface.TapV2Builder; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Prefix; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv6AddressNoZone; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv6Prefix; diff --git a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfacesstate/VhostUserCustomizerTest.java b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfacesstate/VhostUserCustomizerTest.java index dc65d2274..e78796fdc 100644 --- a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfacesstate/VhostUserCustomizerTest.java +++ b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfacesstate/VhostUserCustomizerTest.java @@ -33,11 +33,11 @@ import io.fd.vpp.jvpp.core.dto.SwInterfaceVhostUserDetailsReplyDump; import java.math.BigInteger; import org.junit.Test; import org.mockito.Mock; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.VhostUserRole; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.VppInterfaceStateAugmentation; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.VppInterfaceStateAugmentationBuilder; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces.state._interface.VhostUser; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces.state._interface.VhostUserBuilder; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.VhostUserRole; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.VppInterfaceStateAugmentation; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.VppInterfaceStateAugmentationBuilder; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces.state._interface.VhostUser; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces.state._interface.VhostUserBuilder; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.InterfacesState; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.Interface; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.InterfaceKey; diff --git a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfacesstate/VxlanCustomizerTest.java b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfacesstate/VxlanCustomizerTest.java index eaa10e6ba..b02b14a00 100644 --- a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfacesstate/VxlanCustomizerTest.java +++ b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfacesstate/VxlanCustomizerTest.java @@ -39,11 +39,11 @@ import io.fd.vpp.jvpp.core.dto.VxlanTunnelDetailsReplyDump; import io.fd.vpp.jvpp.core.dto.VxlanTunnelDump; import org.junit.Test; import org.mockito.Mock; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.L2Input; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.VppInterfaceStateAugmentation; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.VppInterfaceStateAugmentationBuilder; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces.state._interface.Vxlan; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces.state._interface.VxlanBuilder; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.L2Input; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.VppInterfaceStateAugmentation; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.VppInterfaceStateAugmentationBuilder; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces.state._interface.Vxlan; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces.state._interface.VxlanBuilder; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.InterfacesState; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.Interface; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.InterfaceKey; diff --git a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfacesstate/VxlanGpeCustomizerTest.java b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfacesstate/VxlanGpeCustomizerTest.java index eea8dc777..52558bc96 100644 --- a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfacesstate/VxlanGpeCustomizerTest.java +++ b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfacesstate/VxlanGpeCustomizerTest.java @@ -40,10 +40,10 @@ import io.fd.vpp.jvpp.core.dto.VxlanGpeTunnelDetailsReplyDump; import io.fd.vpp.jvpp.core.dto.VxlanGpeTunnelDump; import org.junit.Test; import org.mockito.Mock; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.VppInterfaceStateAugmentation; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.VppInterfaceStateAugmentationBuilder; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces.state._interface.VxlanGpe; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces.state._interface.VxlanGpeBuilder; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.VppInterfaceStateAugmentation; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.VppInterfaceStateAugmentationBuilder; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces.state._interface.VxlanGpe; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces.state._interface.VxlanGpeBuilder; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.InterfacesState; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.Interface; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.InterfaceKey; diff --git a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfacesstate/span/MirroredInterfacesCustomizerTest.java b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfacesstate/span/MirroredInterfacesCustomizerTest.java index 8b5e8d0dc..4e0b66637 100644 --- a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfacesstate/span/MirroredInterfacesCustomizerTest.java +++ b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfacesstate/span/MirroredInterfacesCustomizerTest.java @@ -29,15 +29,15 @@ import io.fd.vpp.jvpp.core.dto.SwInterfaceSpanDetails; import io.fd.vpp.jvpp.core.dto.SwInterfaceSpanDetailsReplyDump; import java.util.Arrays; import org.junit.Test; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.SpanState; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.VppInterfaceStateAugmentation; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces.state._interface.Span; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces.state._interface.SpanBuilder; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.span.state.attributes.MirroredInterfaces; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.span.state.attributes.MirroredInterfacesBuilder; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.span.state.attributes.mirrored.interfaces.MirroredInterface; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.span.state.attributes.mirrored.interfaces.MirroredInterfaceBuilder; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.span.state.attributes.mirrored.interfaces.MirroredInterfaceKey; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.SpanState; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.VppInterfaceStateAugmentation; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces.state._interface.Span; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces.state._interface.SpanBuilder; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.span.state.attributes.MirroredInterfaces; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.span.state.attributes.MirroredInterfacesBuilder; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.span.state.attributes.mirrored.interfaces.MirroredInterface; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.span.state.attributes.mirrored.interfaces.MirroredInterfaceBuilder; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.span.state.attributes.mirrored.interfaces.MirroredInterfaceKey; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.InterfacesState; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.Interface; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.InterfaceKey; diff --git a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/l2/ArpTerminationTableEntryCustomizerTest.java b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/l2/ArpTerminationTableEntryCustomizerTest.java index 142f2fae7..a42d91ab2 100644 --- a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/l2/ArpTerminationTableEntryCustomizerTest.java +++ b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/l2/ArpTerminationTableEntryCustomizerTest.java @@ -39,13 +39,13 @@ import io.fd.vpp.jvpp.core.types.Ip4Address; import io.fd.vpp.jvpp.core.types.MacAddress; import org.junit.Test; import org.mockito.ArgumentCaptor; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.BridgeDomains; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.bridge.domain.attributes.ArpTerminationTable; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.bridge.domain.attributes.arp.termination.table.ArpTerminationTableEntry; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.bridge.domain.attributes.arp.termination.table.ArpTerminationTableEntryBuilder; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.bridge.domain.attributes.arp.termination.table.ArpTerminationTableEntryKey; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.bridge.domains.BridgeDomain; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.bridge.domains.BridgeDomainKey; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.BridgeDomains; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.bridge.domain.attributes.ArpTerminationTable; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.bridge.domain.attributes.arp.termination.table.ArpTerminationTableEntry; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.bridge.domain.attributes.arp.termination.table.ArpTerminationTableEntryBuilder; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.bridge.domain.attributes.arp.termination.table.ArpTerminationTableEntryKey; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.bridge.domains.BridgeDomain; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.bridge.domains.BridgeDomainKey; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddressNoZone; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4AddressNoZone; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv6AddressNoZone; diff --git a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/l2/BridgeDomainCustomizerTest.java b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/l2/BridgeDomainCustomizerTest.java index 6382e6303..39c36b2a4 100644 --- a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/l2/BridgeDomainCustomizerTest.java +++ b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/l2/BridgeDomainCustomizerTest.java @@ -34,14 +34,14 @@ import io.fd.vpp.jvpp.core.dto.BridgeDomainAddDelReply; import java.util.Arrays; import javax.annotation.Nullable; import org.junit.Test; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.BridgeDomains; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.VppInterfaceAugmentation; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.VppInterfaceAugmentationBuilder; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.bridge.domains.BridgeDomain; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.bridge.domains.BridgeDomainBuilder; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.bridge.domains.BridgeDomainKey; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.interfaces._interface.L2Builder; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.l2.config.attributes.interconnection.BridgeBasedBuilder; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.BridgeDomains; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.VppInterfaceAugmentation; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.VppInterfaceAugmentationBuilder; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.bridge.domains.BridgeDomain; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.bridge.domains.BridgeDomainBuilder; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.bridge.domains.BridgeDomainKey; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.interfaces._interface.L2Builder; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.l2.config.attributes.interconnection.BridgeBasedBuilder; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.Interfaces; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.InterfacesBuilder; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface; diff --git a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/l2/L2FibEntryCustomizerTest.java b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/l2/L2FibEntryCustomizerTest.java index ded58935e..ac0572521 100644 --- a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/l2/L2FibEntryCustomizerTest.java +++ b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/l2/L2FibEntryCustomizerTest.java @@ -34,15 +34,15 @@ import io.fd.vpp.jvpp.core.dto.L2FibAddDel; import io.fd.vpp.jvpp.core.dto.L2FibAddDelReply; import org.junit.Test; import org.mockito.ArgumentCaptor; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.BridgeDomains; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.L2FibFilter; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.L2FibForward; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.bridge.domains.BridgeDomain; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.bridge.domains.BridgeDomainKey; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.l2.fib.attributes.L2FibTable; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.l2.fib.attributes.l2.fib.table.L2FibEntry; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.l2.fib.attributes.l2.fib.table.L2FibEntryBuilder; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.l2.fib.attributes.l2.fib.table.L2FibEntryKey; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.BridgeDomains; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.L2FibFilter; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.L2FibForward; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.bridge.domains.BridgeDomain; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.bridge.domains.BridgeDomainKey; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.l2.fib.attributes.L2FibTable; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.l2.fib.attributes.l2.fib.table.L2FibEntry; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.l2.fib.attributes.l2.fib.table.L2FibEntryBuilder; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.l2.fib.attributes.l2.fib.table.L2FibEntryKey; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.PhysAddress; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; diff --git a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/l2state/BridgeDomainCustomizerTest.java b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/l2state/BridgeDomainCustomizerTest.java index e78f4ebd8..efeb710f8 100644 --- a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/l2state/BridgeDomainCustomizerTest.java +++ b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/l2state/BridgeDomainCustomizerTest.java @@ -19,10 +19,10 @@ package io.fd.hc2vpp.v3po.l2state; import io.fd.hc2vpp.common.test.read.ListReaderCustomizerTest; import io.fd.hc2vpp.common.translate.util.NamingContext; import io.fd.honeycomb.translate.spi.read.ReaderCustomizer; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.BridgeDomainsStateBuilder; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.bridge.domains.state.BridgeDomain; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.bridge.domains.state.BridgeDomainBuilder; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.bridge.domains.state.BridgeDomainKey; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.BridgeDomainsStateBuilder; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.bridge.domains.state.BridgeDomain; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.bridge.domains.state.BridgeDomainBuilder; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.bridge.domains.state.BridgeDomainKey; public class BridgeDomainCustomizerTest diff --git a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/l2state/L2FibEntryCustomizerTest.java b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/l2state/L2FibEntryCustomizerTest.java index 51ccff45f..2f7825fab 100644 --- a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/l2state/L2FibEntryCustomizerTest.java +++ b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/l2state/L2FibEntryCustomizerTest.java @@ -33,15 +33,15 @@ import java.util.Collections; import java.util.List; import java.util.concurrent.ExecutionException; import org.junit.Test; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.BridgeDomainsState; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.L2FibForward; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.bridge.domains.state.BridgeDomain; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.bridge.domains.state.BridgeDomainKey; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.l2.fib.attributes.L2FibTable; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.l2.fib.attributes.L2FibTableBuilder; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.l2.fib.attributes.l2.fib.table.L2FibEntry; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.l2.fib.attributes.l2.fib.table.L2FibEntryBuilder; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.l2.fib.attributes.l2.fib.table.L2FibEntryKey; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.BridgeDomainsState; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.L2FibForward; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.bridge.domains.state.BridgeDomain; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.bridge.domains.state.BridgeDomainKey; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.l2.fib.attributes.L2FibTable; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.l2.fib.attributes.L2FibTableBuilder; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.l2.fib.attributes.l2.fib.table.L2FibEntry; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.l2.fib.attributes.l2.fib.table.L2FibEntryBuilder; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.l2.fib.attributes.l2.fib.table.L2FibEntryKey; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.PhysAddress; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; diff --git a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/l2state/L2StateTest.java b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/l2state/L2StateTest.java index 5237ea411..5c3a05854 100644 --- a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/l2state/L2StateTest.java +++ b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/l2state/L2StateTest.java @@ -52,11 +52,11 @@ import javax.annotation.Nonnull; import org.junit.Before; import org.junit.Test; import org.mockito.Mock; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.BridgeDomainsState; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.BridgeDomainsStateBuilder; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.bridge.domains.state.BridgeDomain; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.bridge.domains.state.BridgeDomainBuilder; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.bridge.domains.state.BridgeDomainKey; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.BridgeDomainsState; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.BridgeDomainsStateBuilder; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.bridge.domains.state.BridgeDomain; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.bridge.domains.state.BridgeDomainBuilder; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.bridge.domains.state.BridgeDomainKey; import org.opendaylight.yangtools.yang.binding.DataObject; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; diff --git a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/notification/InterfaceChangeNotificationProducerTest.java b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/notification/InterfaceChangeNotificationProducerTest.java index b09d1c0e5..202b9b2dc 100644 --- a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/notification/InterfaceChangeNotificationProducerTest.java +++ b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/notification/InterfaceChangeNotificationProducerTest.java @@ -38,8 +38,8 @@ import org.junit.Test; import org.mockito.ArgumentCaptor; import org.mockito.Mock; import org.mockito.MockitoAnnotations; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.InterfaceStateChange; -import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev181008.InterfaceStatus; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.InterfaceStateChange; +import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190128.InterfaceStatus; public class InterfaceChangeNotificationProducerTest implements FutureProducer, NamingContextHelper { -- cgit 1.2.3-korg