From 3af5cb9926238ba0fa802e0e067451a8e19f1c6a Mon Sep 17 00:00:00 2001 From: Marek Gradzki Date: Tue, 17 May 2016 08:41:24 +0200 Subject: HONEYCOMB-63: bump ODL dependencies to BE-SR2 + Remove dedicated reads to netconf-state in operational datatree. Use regular reader from now on Change-Id: I3d7245cd6cb5d9cf057aea600fddceb49cf18039 Signed-off-by: Marek Gradzki Signed-off-by: Maros Marsalek --- v3po/api/pom.xml | 2 +- v3po/data-api/pom.xml | 2 +- v3po/data-impl/pom.xml | 6 +- .../v3po/data/impl/ReadableDataTreeDelegator.java | 42 +------------ .../impl/rev160411/OperationalDataTreeModule.java | 2 +- v3po/data-impl/src/main/yang/data-impl.yang | 10 --- .../data/impl/ReadableDataTreeDelegatorTest.java | 2 +- v3po/features/pom.xml | 12 ++-- v3po/features/src/main/features/features.xml | 5 +- v3po/impl/pom.xml | 4 +- v3po/impl/src/main/config/default-config.xml | 71 ---------------------- v3po/impl/src/main/config/netconf-north-config.xml | 59 ++++++++++++++++++ v3po/pom.xml | 2 +- v3po/translate-api/pom.xml | 2 +- .../impl/write/AbstractCompositeWriter.java | 13 ++-- v3po/translate-spi/pom.xml | 2 +- v3po/translate-utils/pom.xml | 4 +- .../v3po/interfaces/VhostUserCustomizer.java | 5 -- .../v3po/interfaces/VlanTagRewriteCustomizer.java | 4 -- .../translate/v3po/interfaces/VxlanCustomizer.java | 4 -- .../translate/v3po/vpp/BridgeDomainCustomizer.java | 7 --- .../v3po/interfaces/VhostUserCustomizerTest.java | 9 --- .../interfaces/VlanTagRewriteCustomizerTest.java | 9 --- .../v3po/interfaces/VxlanCustomizerTest.java | 7 --- 24 files changed, 89 insertions(+), 196 deletions(-) (limited to 'v3po') diff --git a/v3po/api/pom.xml b/v3po/api/pom.xml index 6ae5dc5be..f8d833417 100644 --- a/v3po/api/pom.xml +++ b/v3po/api/pom.xml @@ -32,7 +32,7 @@ org.opendaylight.mdsal.model mdsal-model-artifacts - 0.8.0-Beryllium + 0.8.2-Beryllium-SR2 pom import diff --git a/v3po/data-api/pom.xml b/v3po/data-api/pom.xml index 9ecbe80cb..5d4a6cd03 100644 --- a/v3po/data-api/pom.xml +++ b/v3po/data-api/pom.xml @@ -46,7 +46,7 @@ org.opendaylight.controller sal-common-api - 1.3.0-Beryllium + 1.3.2-Beryllium-SR2 diff --git a/v3po/data-impl/pom.xml b/v3po/data-impl/pom.xml index 1d716a6d9..d7a51b0b5 100644 --- a/v3po/data-impl/pom.xml +++ b/v3po/data-impl/pom.xml @@ -51,20 +51,20 @@ org.opendaylight.controller sal-core-api - 1.3.0-Beryllium + 1.3.2-Beryllium-SR2 org.opendaylight.netconf ietf-netconf-monitoring - 1.0.0-Beryllium + 1.0.2-Beryllium-SR2 org.opendaylight.netconf ietf-netconf-monitoring-extension - 1.0.0-Beryllium + 1.0.2-Beryllium-SR2 diff --git a/v3po/data-impl/src/main/java/io/fd/honeycomb/v3po/data/impl/ReadableDataTreeDelegator.java b/v3po/data-impl/src/main/java/io/fd/honeycomb/v3po/data/impl/ReadableDataTreeDelegator.java index e660ee429..46903a1f0 100644 --- a/v3po/data-impl/src/main/java/io/fd/honeycomb/v3po/data/impl/ReadableDataTreeDelegator.java +++ b/v3po/data-impl/src/main/java/io/fd/honeycomb/v3po/data/impl/ReadableDataTreeDelegator.java @@ -36,11 +36,7 @@ import io.fd.honeycomb.v3po.translate.util.write.TransactionMappingContext; import java.util.Collection; import java.util.Map; import javax.annotation.Nonnull; -import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType; import org.opendaylight.controller.md.sal.common.api.data.TransactionCommitFailedException; -import org.opendaylight.controller.md.sal.dom.api.DOMDataBroker; -import org.opendaylight.controller.md.sal.dom.api.DOMDataReadOnlyTransaction; -import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.netconf.monitoring.rev101004.NetconfState; import org.opendaylight.yangtools.binding.data.codec.api.BindingNormalizedNodeSerializer; import org.opendaylight.yangtools.yang.binding.DataObject; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; @@ -70,24 +66,20 @@ public final class ReadableDataTreeDelegator implements ReadableDataManager { private final BindingNormalizedNodeSerializer serializer; private final ReaderRegistry readerRegistry; private final SchemaContext globalContext; - private final DOMDataBroker netconfMonitoringDomDataBrokerDependency; private final org.opendaylight.controller.md.sal.binding.api.DataBroker contextBroker; /** * Creates operational data tree instance. - * @param serializer service for serialization between Java Binding Data representation and NormalizedNode + * @param serializer service for serialization between Java Binding Data representation and NormalizedNode * representation. * @param globalContext service for obtaining top level context data from all yang modules. * @param readerRegistry service responsible for translation between DataObjects and data provider. - * @param netconfMonitoringDomDataBrokerDependency TODO remove * @param contextBroker BA broker for context data */ public ReadableDataTreeDelegator(@Nonnull BindingNormalizedNodeSerializer serializer, @Nonnull final SchemaContext globalContext, @Nonnull final ReaderRegistry readerRegistry, - @Nonnull final DOMDataBroker netconfMonitoringDomDataBrokerDependency, @Nonnull final org.opendaylight.controller.md.sal.binding.api.DataBroker contextBroker) { - this.netconfMonitoringDomDataBrokerDependency = netconfMonitoringDomDataBrokerDependency; this.contextBroker = checkNotNull(contextBroker, "contextBroker should not be null"); this.globalContext = checkNotNull(globalContext, "globalContext should not be null"); this.serializer = checkNotNull(serializer, "serializer should not be null"); @@ -133,15 +125,6 @@ public final class ReadableDataTreeDelegator implements ReadableDataManager { private Optional> readNode(final YangInstanceIdentifier yangInstanceIdentifier, final ReadContext ctx) throws ReadFailedException { - - // FIXME workaround for: https://git.opendaylight.org/gerrit/#/c/37499/ - // Just delete, dedicated reader from NetconfMonitoringReaderModule takes care of netconf state data - // TODO test connecting with netconf and issuing a get (netconf-state) data should be provided - if(yangInstanceIdentifier.getPathArguments().size() > 0 && - yangInstanceIdentifier.getPathArguments().get(0).getNodeType().equals(NetconfState.QNAME)) { - return readFromNetconfDs(yangInstanceIdentifier); - } - LOG.debug("OperationalDataTree.readNode(), yangInstanceIdentifier={}", yangInstanceIdentifier); final InstanceIdentifier path = serializer.fromYangInstanceIdentifier(yangInstanceIdentifier); checkNotNull(path, "Invalid instance identifier %s. Cannot create BA equivalent.", yangInstanceIdentifier); @@ -158,19 +141,6 @@ public final class ReadableDataTreeDelegator implements ReadableDataManager { } } - // FIXME workaround for: https://git.opendaylight.org/gerrit/#/c/37499/ - private Optional> readFromNetconfDs(final YangInstanceIdentifier yangInstanceIdentifier) - throws ReadFailedException { - try(final DOMDataReadOnlyTransaction domDataReadOnlyTransaction = - netconfMonitoringDomDataBrokerDependency.newReadOnlyTransaction()) { - try { - return domDataReadOnlyTransaction.read(LogicalDatastoreType.OPERATIONAL, yangInstanceIdentifier).checkedGet(); - } catch (org.opendaylight.controller.md.sal.common.api.data.ReadFailedException e) { - throw new ReadFailedException(InstanceIdentifier.create(NetconfState.class), e); - } - } - } - private Optional> readRoot(final ReadContext ctx) throws ReadFailedException { LOG.debug("OperationalDataTree.readRoot()"); @@ -187,14 +157,6 @@ public final class ReadableDataTreeDelegator implements ReadableDataManager { wrapDataObjects(rootElementId, instanceIdentifier, dataObjects.get(instanceIdentifier)); dataNodeBuilder.withChild((DataContainerChild) node); } - - // FIXME workaround for: https://git.opendaylight.org/gerrit/#/c/37499/ - final Optional> normalizedNodeOptional = - readFromNetconfDs(YangInstanceIdentifier.builder().node(NetconfState.QNAME).build()); - if(normalizedNodeOptional.isPresent()) { - dataNodeBuilder.withChild((DataContainerChild) normalizedNodeOptional.get()); - } - return Optional.>of(dataNodeBuilder.build()); } @@ -252,7 +214,7 @@ public final class ReadableDataTreeDelegator implements ReadableDataManager { private static final class ReadContextImpl implements ReadContext { - public final ModificationCache ctx = new ModificationCache(); + private final ModificationCache ctx = new ModificationCache(); private final MappingContext mappingContext; private ReadContextImpl(final MappingContext mappingContext) { diff --git a/v3po/data-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/data/impl/rev160411/OperationalDataTreeModule.java b/v3po/data-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/data/impl/rev160411/OperationalDataTreeModule.java index 286eaf664..2e49cb7ec 100644 --- a/v3po/data-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/data/impl/rev160411/OperationalDataTreeModule.java +++ b/v3po/data-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/data/impl/rev160411/OperationalDataTreeModule.java @@ -38,7 +38,7 @@ public class OperationalDataTreeModule extends LOG.debug("OperationalDataTreeModule.createInstance()"); return new CloseableOperationalDataTree( new ReadableDataTreeDelegator(getSerializerDependency(), getSchemaServiceDependency().getGlobalContext(), - getReaderRegistryDependency(), getNetconfMonitoringDomDataBrokerDependency(), getContextBindingBrokerDependency())); + getReaderRegistryDependency(), getContextBindingBrokerDependency())); } private static final class CloseableOperationalDataTree implements ReadableDataManager, AutoCloseable { diff --git a/v3po/data-impl/src/main/yang/data-impl.yang b/v3po/data-impl/src/main/yang/data-impl.yang index a6b217a84..ebca239a2 100644 --- a/v3po/data-impl/src/main/yang/data-impl.yang +++ b/v3po/data-impl/src/main/yang/data-impl.yang @@ -162,16 +162,6 @@ module data-impl { } } - // FIXME workaround for: https://git.opendaylight.org/gerrit/#/c/37499/ - container netconf-monitoring-dom-data-broker { - uses config:service-ref { - refine type { - mandatory true; - config:required-identity dom:dom-async-data-broker; - } - } - } - container context-binding-broker { uses config:service-ref { refine type { diff --git a/v3po/data-impl/src/test/java/io/fd/honeycomb/v3po/data/impl/ReadableDataTreeDelegatorTest.java b/v3po/data-impl/src/test/java/io/fd/honeycomb/v3po/data/impl/ReadableDataTreeDelegatorTest.java index 4492c70a2..c8d4fe4e5 100644 --- a/v3po/data-impl/src/test/java/io/fd/honeycomb/v3po/data/impl/ReadableDataTreeDelegatorTest.java +++ b/v3po/data-impl/src/test/java/io/fd/honeycomb/v3po/data/impl/ReadableDataTreeDelegatorTest.java @@ -88,7 +88,7 @@ public class ReadableDataTreeDelegatorTest { @Before public void setUp() { initMocks(this); - operationalData = new ReadableDataTreeDelegator(serializer, globalContext, reader, netconfMonitoringBroker, contextBroker); + operationalData = new ReadableDataTreeDelegator(serializer, globalContext, reader, contextBroker); doReturn(schemaNode).when(globalContext).getDataChildByName(any(QName.class)); doReturn(domDataReadOnlyTransaction).when(netconfMonitoringBroker).newReadOnlyTransaction(); diff --git a/v3po/features/pom.xml b/v3po/features/pom.xml index b79e62d92..b511e8f11 100644 --- a/v3po/features/pom.xml +++ b/v3po/features/pom.xml @@ -29,12 +29,12 @@ 3.1.1 - 0.8.0-Beryllium - 1.3.0-Beryllium - 1.3.0-Beryllium - 1.0.0-Beryllium - 0.8.0-Beryllium - 0.3.0-Beryllium + 0.8.2-Beryllium-SR2 + 1.3.2-Beryllium-SR2 + 1.3.2-Beryllium-SR2 + 1.0.2-Beryllium-SR2 + 0.8.2-Beryllium-SR2 + 0.3.2-Beryllium-SR2 etc/opendaylight/karaf diff --git a/v3po/features/src/main/features/features.xml b/v3po/features/src/main/features/features.xml index 98fc17aff..49208e7fa 100644 --- a/v3po/features/src/main/features/features.xml +++ b/v3po/features/src/main/features/features.xml @@ -51,14 +51,15 @@ mvn:io.fd.honeycomb.v3po/v3po-impl/${project.version}/xml/context mvn:io.fd.honeycomb.v3po/v3po-impl/${project.version}/xml/config mvn:io.fd.honeycomb.v3po/v3po-impl/${project.version}/xml/init - mvn:io.fd.honeycomb.v3po/v3po-impl/${project.version}/xml/netconf - mvn:io.fd.honeycomb.v3po/v3po-impl/${project.version}/xml/restconf mvn:io.fd.honeycomb.v3po/v3po2vpp/${project.version}/xml/config odl-v3po odl-restconf + + mvn:io.fd.honeycomb.v3po/v3po-impl/${project.version}/xml/netconf + mvn:io.fd.honeycomb.v3po/v3po-impl/${project.version}/xml/restconf diff --git a/v3po/impl/pom.xml b/v3po/impl/pom.xml index 6f4f4e172..dc41c5b75 100644 --- a/v3po/impl/pom.xml +++ b/v3po/impl/pom.xml @@ -58,12 +58,12 @@ org.opendaylight.netconf ietf-netconf-monitoring - 1.0.0-Beryllium + 1.0.2-Beryllium-SR2 org.opendaylight.netconf ietf-netconf-monitoring-extension - 1.0.0-Beryllium + 1.0.2-Beryllium-SR2 diff --git a/v3po/impl/src/main/config/default-config.xml b/v3po/impl/src/main/config/default-config.xml index 961ca72c0..2fe385631 100644 --- a/v3po/impl/src/main/config/default-config.xml +++ b/v3po/impl/src/main/config/default-config.xml @@ -93,48 +93,6 @@ - - - prefix:inmemory-config-datastore-provider - netconf-config-store-service - - - dom:schema-service - yang-schema-service - - - - - prefix:inmemory-operational-datastore-provider - netconf-operational-store-service - - - dom:schema-service - yang-schema-service - - - - - prefix:dom-inmemory-data-broker - netconf-inmemory-data-broker - - - dom:schema-service - yang-schema-service - - - - config-dom-store-spi:config-dom-datastore - netconf-config-store-service - - - - operational-dom-store-spi:operational-dom-datastore - netconf-operational-store-service - - - - prefix:honeycomb-operational-data-tree @@ -151,10 +109,6 @@ prefix:honeycomb-reader-registry read-registry - - dom:dom-async-data-broker - netconf-inmemory-data-broker - binding:binding-async-data-broker honeycomb-context-binding-data-broker @@ -211,31 +165,6 @@ - - - - config-dom-store-spi:config-dom-datastore - - netconf-config-store-service - /modules/module[type='inmemory-config-datastore-provider'][name='netconf-config-store-service'] - - - - operational-dom-store-spi:operational-dom-datastore - - netconf-operational-store-service - /modules/module[type='inmemory-operational-datastore-provider'][name='netconf-operational-store-service'] - - - - dom:dom-async-data-broker - - netconf-inmemory-data-broker - /modules/module[type='dom-inmemory-data-broker'][name='netconf-inmemory-data-broker'] - - - - dom:dom-async-data-broker diff --git a/v3po/impl/src/main/config/netconf-north-config.xml b/v3po/impl/src/main/config/netconf-north-config.xml index b41aafeda..ef500c68c 100644 --- a/v3po/impl/src/main/config/netconf-north-config.xml +++ b/v3po/impl/src/main/config/netconf-north-config.xml @@ -23,8 +23,45 @@ + + prefix:inmemory-config-datastore-provider + netconf-config-store-service + + + dom:schema-service + yang-schema-service + + + + + prefix:inmemory-operational-datastore-provider + netconf-operational-store-service + + + dom:schema-service + yang-schema-service + + + + + prefix:dom-inmemory-data-broker + netconf-inmemory-data-broker + + dom:schema-service + yang-schema-service + + + config-dom-store-spi:config-dom-datastore + netconf-config-store-service + + + + operational-dom-store-spi:operational-dom-datastore + netconf-operational-store-service + + prefix:binding-forwarded-data-broker @@ -304,6 +341,28 @@ + + config-dom-store-spi:config-dom-datastore + + netconf-config-store-service + /modules/module[type='inmemory-config-datastore-provider'][name='netconf-config-store-service'] + + + + operational-dom-store-spi:operational-dom-datastore + + netconf-operational-store-service + /modules/module[type='inmemory-operational-datastore-provider'][name='netconf-operational-store-service'] + + + + dom:dom-async-data-broker + + netconf-inmemory-data-broker + /modules/module[type='dom-inmemory-data-broker'][name='netconf-inmemory-data-broker'] + + + prefix:honeycomb-reader diff --git a/v3po/pom.xml b/v3po/pom.xml index c79cb1213..7676a299a 100644 --- a/v3po/pom.xml +++ b/v3po/pom.xml @@ -18,7 +18,7 @@ org.opendaylight.odlparent odlparent - 1.6.0-Beryllium + 1.6.2-Beryllium-SR2 diff --git a/v3po/translate-api/pom.xml b/v3po/translate-api/pom.xml index 4323e7f37..8e244fa8d 100644 --- a/v3po/translate-api/pom.xml +++ b/v3po/translate-api/pom.xml @@ -33,7 +33,7 @@ org.opendaylight.mdsal mdsal-artifacts - 2.0.0-Beryllium + 2.0.2-Beryllium-SR2 pom import diff --git a/v3po/translate-impl/src/main/java/io/fd/honeycomb/v3po/translate/impl/write/AbstractCompositeWriter.java b/v3po/translate-impl/src/main/java/io/fd/honeycomb/v3po/translate/impl/write/AbstractCompositeWriter.java index 8b42a6c6f..2a08da12c 100644 --- a/v3po/translate-impl/src/main/java/io/fd/honeycomb/v3po/translate/impl/write/AbstractCompositeWriter.java +++ b/v3po/translate-impl/src/main/java/io/fd/honeycomb/v3po/translate/impl/write/AbstractCompositeWriter.java @@ -98,14 +98,11 @@ public abstract class AbstractCompositeWriter implements W final WriteContext ctx) throws WriteFailedException { LOG.debug("{}: Updating current: {} dataBefore: {}, datAfter: {}", this, id, dataBefore, dataAfter); - // FIXME: Equals does not work properly with augments: https://git.opendaylight.org/gerrit/#/c/37719 - // Solution: update mdsal-binding-dom-codec to 0.8.2-Beryllium-SR2 when it will be published in - // ODL release repository - //if (dataBefore.equals(dataAfter)) { - // LOG.debug("{}: Skipping current(no update): {}", this, id); - // // No change, ignore - // return; - //} + if (dataBefore.equals(dataAfter)) { + LOG.debug("{}: Skipping current(no update): {}", this, id); + // No change, ignore + return; + } switch (traversalType) { case PREORDER: { diff --git a/v3po/translate-spi/pom.xml b/v3po/translate-spi/pom.xml index 17e108810..ebb7606d1 100644 --- a/v3po/translate-spi/pom.xml +++ b/v3po/translate-spi/pom.xml @@ -33,7 +33,7 @@ org.opendaylight.mdsal mdsal-artifacts - 2.0.0-Beryllium + 2.0.2-Beryllium-SR2 pom import diff --git a/v3po/translate-utils/pom.xml b/v3po/translate-utils/pom.xml index 9cb6590d8..86a11bdba 100644 --- a/v3po/translate-utils/pom.xml +++ b/v3po/translate-utils/pom.xml @@ -33,14 +33,14 @@ org.opendaylight.mdsal mdsal-artifacts - 2.0.0-Beryllium + 2.0.2-Beryllium-SR2 pom import org.opendaylight.controller mdsal-artifacts - 1.3.0-Beryllium + 1.3.2-Beryllium-SR2 pom import diff --git a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/v3po/translate/v3po/interfaces/VhostUserCustomizer.java b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/v3po/translate/v3po/interfaces/VhostUserCustomizer.java index 5f7d626e8..aef45c821 100644 --- a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/v3po/translate/v3po/interfaces/VhostUserCustomizer.java +++ b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/v3po/translate/v3po/interfaces/VhostUserCustomizer.java @@ -112,11 +112,6 @@ public class VhostUserCustomizer extends AbstractInterfaceTypeCustomizer { public void updateCurrentAttributes(@Nonnull final InstanceIdentifier id, @Nonnull final Vxlan dataBefore, @Nonnull final Vxlan dataAfter, @Nonnull final WriteContext writeContext) throws WriteFailedException.UpdateFailedException { - if (dataBefore.equals(dataAfter)) { - LOG.debug("dataBefore equals dataAfter, update will not be performed"); - return; - } throw new WriteFailedException.UpdateFailedException(id, dataBefore, dataAfter, new UnsupportedOperationException("Vxlan tunnel update is not supported")); } diff --git a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/v3po/translate/v3po/vpp/BridgeDomainCustomizer.java b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/v3po/translate/v3po/vpp/BridgeDomainCustomizer.java index 6e94461a6..db1e61578 100644 --- a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/v3po/translate/v3po/vpp/BridgeDomainCustomizer.java +++ b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/v3po/translate/v3po/vpp/BridgeDomainCustomizer.java @@ -142,13 +142,6 @@ public class BridgeDomainCustomizer LOG.debug("updateCurrentAttributes: id={}, dataBefore={}, dataAfter={}, ctx={}", id, dataBefore, dataAfter, ctx); - // FIXME can be removed after updating mdsal-binding-dom-codec to 0.8.2-Beryllium-SR2 - // and restoring equality check in AbstractCompositeWriter - if (dataBefore.equals(dataAfter)) { - LOG.debug("dataBefore equals dataAfter, update will not be performed"); - return; - } - final String bdName = checkNotNull(dataAfter.getName()); checkArgument(bdName.equals(dataBefore.getName()), "BridgeDomain name changed. It should be deleted and then created."); diff --git a/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/v3po/translate/v3po/interfaces/VhostUserCustomizerTest.java b/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/v3po/translate/v3po/interfaces/VhostUserCustomizerTest.java index 1015f24c0..a14718124 100644 --- a/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/v3po/translate/v3po/interfaces/VhostUserCustomizerTest.java +++ b/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/v3po/translate/v3po/interfaces/VhostUserCustomizerTest.java @@ -26,7 +26,6 @@ import static org.mockito.Matchers.any; import static org.mockito.Matchers.eq; import static org.mockito.Mockito.doReturn; import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.never; import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.verifyZeroInteractions; @@ -229,14 +228,6 @@ public class VhostUserCustomizerTest { verifyModifyVhostUserIfWasInvoked(vhostUserAfter, IFACE_ID); } - @Test - public void testUpdateCurrentAttributesNoUpdate() throws Exception { - final VhostUser vhostUserBefore = generateVhostUser(VhostUserRole.Server, "socketName"); - final VhostUser vhostUserAfter = generateVhostUser(VhostUserRole.Server, "socketName"); - customizer.updateCurrentAttributes(ID, vhostUserBefore, vhostUserAfter, writeContext); - verify(api, never()).modifyVhostUserIf(any(ModifyVhostUserIf.class)); - } - @Test public void testUpdateCurrentAttributesFailed() throws Exception { final VhostUser vhostUserBefore = generateVhostUser(VhostUserRole.Client, "socketName0"); diff --git a/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/v3po/translate/v3po/interfaces/VlanTagRewriteCustomizerTest.java b/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/v3po/translate/v3po/interfaces/VlanTagRewriteCustomizerTest.java index 639257914..6b9f52cc9 100644 --- a/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/v3po/translate/v3po/interfaces/VlanTagRewriteCustomizerTest.java +++ b/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/v3po/translate/v3po/interfaces/VlanTagRewriteCustomizerTest.java @@ -22,7 +22,6 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.fail; import static org.mockito.Matchers.any; import static org.mockito.Mockito.doReturn; -import static org.mockito.Mockito.never; import static org.mockito.Mockito.verify; import static org.mockito.MockitoAnnotations.initMocks; @@ -173,14 +172,6 @@ public class VlanTagRewriteCustomizerTest { fail("WriteFailedException.CreateFailedException was expected"); } - @Test - public void testUpdateNoChange() throws Exception { - final VlanTagRewrite before = generateVlanTagRewrite(6); - final VlanTagRewrite after = generateVlanTagRewrite(6); - customizer.updateCurrentAttributes(null, before, after, writeContext); - verify(api, never()).l2InterfaceVlanTagRewrite(any()); - } - @Test public void testUpdate() throws Exception { final int vtrOpAfter = 5; diff --git a/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/v3po/translate/v3po/interfaces/VxlanCustomizerTest.java b/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/v3po/translate/v3po/interfaces/VxlanCustomizerTest.java index a5103b178..1ddb48089 100644 --- a/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/v3po/translate/v3po/interfaces/VxlanCustomizerTest.java +++ b/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/v3po/translate/v3po/interfaces/VxlanCustomizerTest.java @@ -25,7 +25,6 @@ import static org.mockito.Matchers.any; import static org.mockito.Matchers.eq; import static org.mockito.Mockito.doReturn; import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.never; import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; @@ -186,12 +185,6 @@ public class VxlanCustomizerTest { fail("WriteFailedException.UpdateFailedException was expected"); } - @Test - public void testUpdateCurrentAttributesNoUpdate() throws Exception { - customizer.updateCurrentAttributes(id, generateVxlan(), generateVxlan(), writeContext); - verify(api, never()).vxlanAddDelTunnel(any(VxlanAddDelTunnel.class)); - } - @Test public void testDeleteCurrentAttributes() throws Exception { final Vxlan vxlan = generateVxlan(); -- cgit 1.2.3-korg