diff options
author | 2016-04-12 10:13:18 +0200 | |
---|---|---|
committer | 2016-04-12 10:13:18 +0200 | |
commit | e1743c8eccee7d5ea8ad2c247d2575e8fd219fe4 (patch) | |
tree | 285ad26e1e5bff6ef9ff8fdd7a77bd971dfd50ca /v3po/v3po2vpp/src/test/java | |
parent | c7ca517b00f2682987aef3ac390dfc04155a8aee (diff) |
HONEYCOMB-9: Remove references to VPP from translation layer
Change-Id: I281db366a112edc08203e8cb392a212708d4552a
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Diffstat (limited to 'v3po/v3po2vpp/src/test/java')
-rw-r--r-- | v3po/v3po2vpp/src/test/java/io/fd/honeycomb/v3po/translate/v3po/vpp/BridgeDomainCustomizerTest.java (renamed from v3po/v3po2vpp/src/test/java/io/fd/honeycomb/v3po/vpp/facade/v3po/vpp/BridgeDomainCustomizerTest.java) | 69 | ||||
-rw-r--r-- | v3po/v3po2vpp/src/test/java/io/fd/honeycomb/v3po/translate/v3po/vpp/BridgeDomainTestUtils.java (renamed from v3po/v3po2vpp/src/test/java/io/fd/honeycomb/v3po/vpp/facade/v3po/vpp/BridgeDomainTestUtils.java) | 2 | ||||
-rw-r--r-- | v3po/v3po2vpp/src/test/java/io/fd/honeycomb/v3po/translate/v3po/vpp/VppTest.java (renamed from v3po/v3po2vpp/src/test/java/io/fd/honeycomb/v3po/vpp/facade/v3po/vpp/VppTest.java) | 19 | ||||
-rw-r--r-- | v3po/v3po2vpp/src/test/java/io/fd/honeycomb/v3po/translate/v3po/vpp/VppUtils.java (renamed from v3po/v3po2vpp/src/test/java/io/fd/honeycomb/v3po/vpp/facade/v3po/vpp/VppUtils.java) | 30 | ||||
-rw-r--r-- | v3po/v3po2vpp/src/test/java/io/fd/honeycomb/v3po/translate/v3po/vppstate/VppStateTest.java (renamed from v3po/v3po2vpp/src/test/java/io/fd/honeycomb/v3po/vpp/facade/v3po/vppstate/VppStateTest.java) | 18 | ||||
-rw-r--r-- | v3po/v3po2vpp/src/test/java/io/fd/honeycomb/v3po/translate/v3po/vppstate/VppStateUtils.java (renamed from v3po/v3po2vpp/src/test/java/io/fd/honeycomb/v3po/vpp/facade/v3po/vppstate/VppStateUtils.java) | 36 |
6 files changed, 84 insertions, 90 deletions
diff --git a/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/v3po/vpp/facade/v3po/vpp/BridgeDomainCustomizerTest.java b/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/v3po/translate/v3po/vpp/BridgeDomainCustomizerTest.java index 059713544..f504918a8 100644 --- a/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/v3po/vpp/facade/v3po/vpp/BridgeDomainCustomizerTest.java +++ b/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/v3po/translate/v3po/vpp/BridgeDomainCustomizerTest.java @@ -14,13 +14,8 @@ * limitations under the License. */ -package io.fd.honeycomb.v3po.vpp.facade.v3po.vpp; +package io.fd.honeycomb.v3po.translate.v3po.vpp; -import static io.fd.honeycomb.v3po.vpp.facade.v3po.vpp.BridgeDomainTestUtils.BD_NAME_TO_ID_ANSWER; -import static io.fd.honeycomb.v3po.vpp.facade.v3po.vpp.BridgeDomainTestUtils.bdIdentifierForName; -import static io.fd.honeycomb.v3po.vpp.facade.v3po.vpp.BridgeDomainTestUtils.bdNameToID; -import static io.fd.honeycomb.v3po.vpp.facade.v3po.vpp.BridgeDomainTestUtils.booleanToByte; -import static io.fd.honeycomb.v3po.vpp.facade.v3po.vpp.BridgeDomainTestUtils.intToBoolean; import static org.junit.Assert.fail; import static org.mockito.Matchers.anyInt; import static org.mockito.Matchers.anyString; @@ -28,7 +23,7 @@ import static org.mockito.Mockito.never; import static org.mockito.Mockito.verify; import static org.mockito.MockitoAnnotations.initMocks; -import io.fd.honeycomb.v3po.vpp.facade.Context; +import io.fd.honeycomb.v3po.translate.Context; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; @@ -65,8 +60,8 @@ public class BridgeDomainCustomizerTest { initMocks(this); customizer = new BridgeDomainCustomizer(api); - PowerMockito.doAnswer(BD_NAME_TO_ID_ANSWER).when(api).findOrAddBridgeDomainId(anyString()); - PowerMockito.doAnswer(BD_NAME_TO_ID_ANSWER).when(api).bridgeDomainIdFromName(anyString()); + PowerMockito.doAnswer(BridgeDomainTestUtils.BD_NAME_TO_ID_ANSWER).when(api).findOrAddBridgeDomainId(anyString()); + PowerMockito.doAnswer(BridgeDomainTestUtils.BD_NAME_TO_ID_ANSWER).when(api).bridgeDomainIdFromName(anyString()); PowerMockito.when(api.getRetval(anyInt(), anyInt())).thenReturn(RESPONSE_NOT_READY).thenReturn(0); PowerMockito.doReturn(0).when(api).getRetval(anyInt(), anyInt()); } @@ -84,41 +79,41 @@ public class BridgeDomainCustomizerTest { final int forward, final int learn, final int uuf) { return new BridgeDomainBuilder() .setName(bdName) - .setArpTermination(intToBoolean(arpTerm)) - .setFlood(intToBoolean(flood)) - .setForward(intToBoolean(forward)) - .setLearn(intToBoolean(learn)) - .setUnknownUnicastFlood(intToBoolean(uuf)) + .setArpTermination(BridgeDomainTestUtils.intToBoolean(arpTerm)) + .setFlood(BridgeDomainTestUtils.intToBoolean(flood)) + .setForward(BridgeDomainTestUtils.intToBoolean(forward)) + .setLearn(BridgeDomainTestUtils.intToBoolean(learn)) + .setUnknownUnicastFlood(BridgeDomainTestUtils.intToBoolean(uuf)) .build(); } private final int verifyBridgeDomainAddOrUpdateWasInvoked(final BridgeDomain bd) { - final int bdn1Id = bdNameToID(bd.getName()); - final byte arpTerm = booleanToByte(bd.isArpTermination()); - final byte flood = booleanToByte(bd.isFlood()); - final byte forward = booleanToByte(bd.isForward()); - final byte learn = booleanToByte(bd.isLearn()); - final byte uuf = booleanToByte(bd.isUnknownUnicastFlood()); + final int bdn1Id = BridgeDomainTestUtils.bdNameToID(bd.getName()); + final byte arpTerm = BridgeDomainTestUtils.booleanToByte(bd.isArpTermination()); + final byte flood = BridgeDomainTestUtils.booleanToByte(bd.isFlood()); + final byte forward = BridgeDomainTestUtils.booleanToByte(bd.isForward()); + final byte learn = BridgeDomainTestUtils.booleanToByte(bd.isLearn()); + final byte uuf = BridgeDomainTestUtils.booleanToByte(bd.isUnknownUnicastFlood()); return verify(api).bridgeDomainAddDel(bdn1Id, flood, forward, learn, uuf, arpTerm, ADD_OR_UPDATE_BD); } private int verifyBridgeDomainAddOrUpdateWasNotInvoked(final BridgeDomain bd) { - final int bdn1Id = bdNameToID(bd.getName()); - final byte arpTerm = booleanToByte(bd.isArpTermination()); - final byte flood = booleanToByte(bd.isFlood()); - final byte forward = booleanToByte(bd.isForward()); - final byte learn = booleanToByte(bd.isLearn()); - final byte uuf = booleanToByte(bd.isUnknownUnicastFlood()); + final int bdn1Id = BridgeDomainTestUtils.bdNameToID(bd.getName()); + final byte arpTerm = BridgeDomainTestUtils.booleanToByte(bd.isArpTermination()); + final byte flood = BridgeDomainTestUtils.booleanToByte(bd.isFlood()); + final byte forward = BridgeDomainTestUtils.booleanToByte(bd.isForward()); + final byte learn = BridgeDomainTestUtils.booleanToByte(bd.isLearn()); + final byte uuf = BridgeDomainTestUtils.booleanToByte(bd.isUnknownUnicastFlood()); return verify(api, never()).bridgeDomainAddDel(bdn1Id, flood, forward, learn, uuf, arpTerm, ADD_OR_UPDATE_BD); } private int verifyBridgeDomainDeletedWasInvoked(final BridgeDomain bd) { - final int bdn1Id = bdNameToID(bd.getName()); + final int bdn1Id = BridgeDomainTestUtils.bdNameToID(bd.getName()); return verify(api).bridgeDomainAddDel(bdn1Id, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO); } private int verifyBridgeDomainDeletedWasNotInvoked(final BridgeDomain bd) { - final int bdn1Id = bdNameToID(bd.getName()); + final int bdn1Id = BridgeDomainTestUtils.bdNameToID(bd.getName()); return verify(api, never()).bridgeDomainAddDel(bdn1Id, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO); } @@ -127,7 +122,7 @@ public class BridgeDomainCustomizerTest { final String bdName = "bd1"; final BridgeDomain bd = generateBridgeDomain("bd1"); - customizer.writeCurrentAttributes(bdIdentifierForName(bdName), bd, ctx); + customizer.writeCurrentAttributes(BridgeDomainTestUtils.bdIdentifierForName(bdName), bd, ctx); verifyBridgeDomainAddOrUpdateWasInvoked(bd); } @@ -141,7 +136,7 @@ public class BridgeDomainCustomizerTest { PowerMockito.doReturn(-1).when(api).findOrAddBridgeDomainId(bdName); try { - customizer.writeCurrentAttributes(bdIdentifierForName(bdName), bd, ctx); + customizer.writeCurrentAttributes(BridgeDomainTestUtils.bdIdentifierForName(bdName), bd, ctx); } catch (IllegalStateException e) { verifyBridgeDomainAddOrUpdateWasNotInvoked(bd); return; @@ -158,7 +153,7 @@ public class BridgeDomainCustomizerTest { final BridgeDomain bd = generateBridgeDomain(bdName); try { - customizer.writeCurrentAttributes(bdIdentifierForName(bdName), bd, ctx); + customizer.writeCurrentAttributes(BridgeDomainTestUtils.bdIdentifierForName(bdName), bd, ctx); } catch (IllegalStateException e) { verifyBridgeDomainAddOrUpdateWasInvoked(bd); return; @@ -171,7 +166,7 @@ public class BridgeDomainCustomizerTest { final String bdName = "bd1"; final BridgeDomain bd = generateBridgeDomain("bd1"); - customizer.deleteCurrentAttributes(bdIdentifierForName(bdName), bd, ctx); + customizer.deleteCurrentAttributes(BridgeDomainTestUtils.bdIdentifierForName(bdName), bd, ctx); verifyBridgeDomainDeletedWasInvoked(bd); } @@ -185,7 +180,7 @@ public class BridgeDomainCustomizerTest { PowerMockito.doReturn(-1).when(api).bridgeDomainIdFromName(bdName); try { - customizer.deleteCurrentAttributes(bdIdentifierForName(bdName), bd, ctx); + customizer.deleteCurrentAttributes(BridgeDomainTestUtils.bdIdentifierForName(bdName), bd, ctx); } catch (IllegalStateException e) { verifyBridgeDomainDeletedWasNotInvoked(bd); return; @@ -202,7 +197,7 @@ public class BridgeDomainCustomizerTest { final BridgeDomain bd = generateBridgeDomain(bdName); try { - customizer.deleteCurrentAttributes(bdIdentifierForName(bdName), bd, ctx); + customizer.deleteCurrentAttributes(BridgeDomainTestUtils.bdIdentifierForName(bdName), bd, ctx); } catch (IllegalStateException e) { verifyBridgeDomainDeletedWasInvoked(bd); return; @@ -225,7 +220,7 @@ public class BridgeDomainCustomizerTest { generateBridgeDomain(bdName, arpTermBefore ^ 1, floodBefore ^ 1, forwardBefore ^ 1, learnBefore ^ 1, uufBefore ^ 1); - final KeyedInstanceIdentifier<BridgeDomain, BridgeDomainKey> id = bdIdentifierForName(bdName); + final KeyedInstanceIdentifier<BridgeDomain, BridgeDomainKey> id = BridgeDomainTestUtils.bdIdentifierForName(bdName); customizer.updateCurrentAttributes(id, dataBefore, dataAfter, ctx); @@ -241,7 +236,7 @@ public class BridgeDomainCustomizerTest { PowerMockito.doReturn(-1).when(api).bridgeDomainIdFromName(bdName); try { - customizer.updateCurrentAttributes(bdIdentifierForName(bdName), bd, bd, ctx); + customizer.updateCurrentAttributes(BridgeDomainTestUtils.bdIdentifierForName(bdName), bd, bd, ctx); } catch (IllegalStateException e) { verifyBridgeDomainAddOrUpdateWasNotInvoked(bd); return; @@ -258,7 +253,7 @@ public class BridgeDomainCustomizerTest { final BridgeDomain bd = generateBridgeDomain(bdName); try { - customizer.updateCurrentAttributes(bdIdentifierForName(bdName), bd, bd, ctx); + customizer.updateCurrentAttributes(BridgeDomainTestUtils.bdIdentifierForName(bdName), bd, bd, ctx); } catch (IllegalStateException e) { verifyBridgeDomainAddOrUpdateWasInvoked(bd); return; diff --git a/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/v3po/vpp/facade/v3po/vpp/BridgeDomainTestUtils.java b/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/v3po/translate/v3po/vpp/BridgeDomainTestUtils.java index 51a6b023e..ba4df9e49 100644 --- a/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/v3po/vpp/facade/v3po/vpp/BridgeDomainTestUtils.java +++ b/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/v3po/translate/v3po/vpp/BridgeDomainTestUtils.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.fd.honeycomb.v3po.vpp.facade.v3po.vpp; +package io.fd.honeycomb.v3po.translate.v3po.vpp; import javax.annotation.Nullable; import org.mockito.invocation.InvocationOnMock; diff --git a/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/v3po/vpp/facade/v3po/vpp/VppTest.java b/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/v3po/translate/v3po/vpp/VppTest.java index bc5bda383..0ff3ba16d 100644 --- a/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/v3po/vpp/facade/v3po/vpp/VppTest.java +++ b/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/v3po/translate/v3po/vpp/VppTest.java @@ -14,9 +14,8 @@ * limitations under the License. */ -package io.fd.honeycomb.v3po.vpp.facade.v3po.vpp; +package io.fd.honeycomb.v3po.translate.v3po.vpp; -import static io.fd.honeycomb.v3po.vpp.facade.v3po.vpp.BridgeDomainTestUtils.BD_NAME_TO_ID_ANSWER; import static org.mockito.Matchers.anyInt; import static org.mockito.Matchers.anyString; import static org.mockito.Mockito.mock; @@ -25,10 +24,10 @@ import static org.mockito.Mockito.verify; import static org.mockito.Mockito.verifyZeroInteractions; import com.google.common.collect.Lists; -import io.fd.honeycomb.v3po.vpp.facade.impl.write.CompositeRootVppWriter; -import io.fd.honeycomb.v3po.vpp.facade.impl.write.util.DelegatingWriterRegistry; -import io.fd.honeycomb.v3po.vpp.facade.write.VppWriter; -import io.fd.honeycomb.v3po.vpp.facade.write.WriteContext; +import io.fd.honeycomb.v3po.translate.impl.write.CompositeRootWriter; +import io.fd.honeycomb.v3po.translate.write.WriteContext; +import io.fd.honeycomb.v3po.translate.util.write.DelegatingWriterRegistry; +import io.fd.honeycomb.v3po.translate.write.Writer; import java.util.Collections; import java.util.List; import org.junit.Before; @@ -55,7 +54,7 @@ public class VppTest { private vppApi api; private DelegatingWriterRegistry rootRegistry; - private CompositeRootVppWriter<Vpp> vppWriter; + private CompositeRootWriter<Vpp> vppWriter; private WriteContext ctx; final byte zero = (byte) 0; @@ -70,12 +69,12 @@ public class VppTest { public void setUp() throws Exception { api = PowerMockito.mock(vppApi.class); ctx = mock(WriteContext.class); - PowerMockito.doAnswer(BD_NAME_TO_ID_ANSWER).when(api).findOrAddBridgeDomainId(anyString()); - PowerMockito.doAnswer(BD_NAME_TO_ID_ANSWER).when(api).bridgeDomainIdFromName(anyString()); + PowerMockito.doAnswer(BridgeDomainTestUtils.BD_NAME_TO_ID_ANSWER).when(api).findOrAddBridgeDomainId(anyString()); + PowerMockito.doAnswer(BridgeDomainTestUtils.BD_NAME_TO_ID_ANSWER).when(api).bridgeDomainIdFromName(anyString()); PowerMockito.doReturn(1).when(api).getRetval(anyInt(), anyInt()); vppWriter = VppUtils.getVppWriter(api); rootRegistry = new DelegatingWriterRegistry( - Collections.<VppWriter<? extends DataObject>>singletonList(vppWriter)); + Collections.<Writer<? extends DataObject>>singletonList(vppWriter)); } @Test diff --git a/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/v3po/vpp/facade/v3po/vpp/VppUtils.java b/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/v3po/translate/v3po/vpp/VppUtils.java index ccf19c81c..cb74314e3 100644 --- a/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/v3po/vpp/facade/v3po/vpp/VppUtils.java +++ b/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/v3po/translate/v3po/vpp/VppUtils.java @@ -14,15 +14,15 @@ * limitations under the License. */ -package io.fd.honeycomb.v3po.vpp.facade.v3po.vpp; - -import io.fd.honeycomb.v3po.vpp.facade.impl.util.VppRWUtils; -import io.fd.honeycomb.v3po.vpp.facade.impl.write.CompositeChildVppWriter; -import io.fd.honeycomb.v3po.vpp.facade.impl.write.CompositeListVppWriter; -import io.fd.honeycomb.v3po.vpp.facade.impl.write.CompositeRootVppWriter; -import io.fd.honeycomb.v3po.vpp.facade.impl.write.util.NoopWriterCustomizer; -import io.fd.honeycomb.v3po.vpp.facade.impl.write.util.ReflexiveChildWriterCustomizer; -import io.fd.honeycomb.v3po.vpp.facade.write.ChildVppWriter; +package io.fd.honeycomb.v3po.translate.v3po.vpp; + +import io.fd.honeycomb.v3po.translate.impl.write.CompositeChildWriter; +import io.fd.honeycomb.v3po.translate.impl.write.CompositeListWriter; +import io.fd.honeycomb.v3po.translate.impl.write.CompositeRootWriter; +import io.fd.honeycomb.v3po.translate.util.write.NoopWriterCustomizer; +import io.fd.honeycomb.v3po.translate.util.write.ReflexiveChildWriterCustomizer; +import io.fd.honeycomb.v3po.translate.write.ChildWriter; +import io.fd.honeycomb.v3po.translate.util.RWUtils; import java.util.ArrayList; import java.util.List; import javax.annotation.Nonnull; @@ -40,21 +40,21 @@ final class VppUtils { /** * Create root Vpp writer with all its children wired */ - static CompositeRootVppWriter<Vpp> getVppWriter(@Nonnull final vppApi vppApi) { + static CompositeRootWriter<Vpp> getVppWriter(@Nonnull final vppApi vppApi) { - final CompositeListVppWriter<BridgeDomain, BridgeDomainKey> bridgeDomainWriter = new CompositeListVppWriter<>( + final CompositeListWriter<BridgeDomain, BridgeDomainKey> bridgeDomainWriter = new CompositeListWriter<>( BridgeDomain.class, new BridgeDomainCustomizer(vppApi)); - final ChildVppWriter<BridgeDomains> bridgeDomainsReader = new CompositeChildVppWriter<>( + final ChildWriter<BridgeDomains> bridgeDomainsReader = new CompositeChildWriter<>( BridgeDomains.class, - VppRWUtils.singletonChildWriterList(bridgeDomainWriter), + RWUtils.singletonChildWriterList(bridgeDomainWriter), new ReflexiveChildWriterCustomizer<BridgeDomains>()); - final List<ChildVppWriter<? extends ChildOf<Vpp>>> childWriters = new ArrayList<>(); + final List<ChildWriter<? extends ChildOf<Vpp>>> childWriters = new ArrayList<>(); childWriters.add(bridgeDomainsReader); - return new CompositeRootVppWriter<>( + return new CompositeRootWriter<>( Vpp.class, childWriters, new NoopWriterCustomizer<Vpp>()); diff --git a/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/v3po/vpp/facade/v3po/vppstate/VppStateTest.java b/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/v3po/translate/v3po/vppstate/VppStateTest.java index 059c98f56..6f53f6519 100644 --- a/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/v3po/vpp/facade/v3po/vppstate/VppStateTest.java +++ b/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/v3po/translate/v3po/vppstate/VppStateTest.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.fd.honeycomb.v3po.vpp.facade.v3po.vppstate; +package io.fd.honeycomb.v3po.translate.v3po.vppstate; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; @@ -26,11 +26,11 @@ import com.google.common.base.Optional; import com.google.common.base.Predicate; import com.google.common.collect.Iterables; import com.google.common.collect.Multimap; -import io.fd.honeycomb.v3po.vpp.facade.impl.read.CompositeListVppReader; -import io.fd.honeycomb.v3po.vpp.facade.impl.read.CompositeRootVppReader; -import io.fd.honeycomb.v3po.vpp.facade.impl.read.util.DelegatingReaderRegistry; -import io.fd.honeycomb.v3po.vpp.facade.read.ReadContext; -import io.fd.honeycomb.v3po.vpp.facade.read.VppReader; +import io.fd.honeycomb.v3po.translate.impl.read.CompositeListReader; +import io.fd.honeycomb.v3po.translate.impl.read.CompositeRootReader; +import io.fd.honeycomb.v3po.translate.util.read.DelegatingReaderRegistry; +import io.fd.honeycomb.v3po.translate.read.ReadContext; +import io.fd.honeycomb.v3po.translate.read.Reader; import java.util.Collections; import java.util.List; import org.junit.Before; @@ -71,7 +71,7 @@ public class VppStateTest { public static final vppVersion VERSION = new vppVersion("test", "1", "2", "33"); private vppApi api; - private CompositeRootVppReader<VppState, VppStateBuilder> vppStateReader; + private CompositeRootReader<VppState, VppStateBuilder> vppStateReader; private DelegatingReaderRegistry readerRegistry; private vppBridgeDomainDetails bdDetails; private vppBridgeDomainDetails bdDetails2; @@ -120,7 +120,7 @@ public class VppStateTest { PowerMockito.doReturn(new int[] {1, 2}).when(api).bridgeDomainDump(Matchers.anyInt()); PowerMockito.doReturn(VERSION).when(api).getVppVersion(); vppStateReader = VppStateUtils.getVppStateReader(api); - readerRegistry = new DelegatingReaderRegistry(Collections.<VppReader<? extends DataObject>>singletonList(vppStateReader)); + readerRegistry = new DelegatingReaderRegistry(Collections.<Reader<? extends DataObject>>singletonList(vppStateReader)); } private vppL2Fib[] getL2Fibs() { @@ -210,7 +210,7 @@ public class VppStateTest { public void testReadBridgeDomainAll() throws Exception { VppState readRoot = (VppState) readerRegistry.read(InstanceIdentifier.create(VppState.class), ctx).get(); - final CompositeListVppReader<BridgeDomain, BridgeDomainKey, BridgeDomainBuilder> bridgeDomainReader = + final CompositeListReader<BridgeDomain, BridgeDomainKey, BridgeDomainBuilder> bridgeDomainReader = VppStateUtils.getBridgeDomainReader(api); final List<BridgeDomain> read = diff --git a/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/v3po/vpp/facade/v3po/vppstate/VppStateUtils.java b/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/v3po/translate/v3po/vppstate/VppStateUtils.java index 7d5441769..5c619d84d 100644 --- a/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/v3po/vpp/facade/v3po/vppstate/VppStateUtils.java +++ b/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/v3po/translate/v3po/vppstate/VppStateUtils.java @@ -14,15 +14,15 @@ * limitations under the License. */ -package io.fd.honeycomb.v3po.vpp.facade.v3po.vppstate; +package io.fd.honeycomb.v3po.translate.v3po.vppstate; -import io.fd.honeycomb.v3po.vpp.facade.impl.read.CompositeChildVppReader; -import io.fd.honeycomb.v3po.vpp.facade.impl.read.CompositeListVppReader; -import io.fd.honeycomb.v3po.vpp.facade.impl.read.CompositeRootVppReader; -import io.fd.honeycomb.v3po.vpp.facade.impl.read.util.ReflexiveChildReaderCustomizer; -import io.fd.honeycomb.v3po.vpp.facade.impl.read.util.ReflexiveRootReaderCustomizer; -import io.fd.honeycomb.v3po.vpp.facade.impl.util.VppRWUtils; -import io.fd.honeycomb.v3po.vpp.facade.read.ChildVppReader; +import io.fd.honeycomb.v3po.translate.impl.read.CompositeChildReader; +import io.fd.honeycomb.v3po.translate.impl.read.CompositeListReader; +import io.fd.honeycomb.v3po.translate.impl.read.CompositeRootReader; +import io.fd.honeycomb.v3po.translate.util.read.ReflexiveChildReaderCustomizer; +import io.fd.honeycomb.v3po.translate.util.read.ReflexiveRootReaderCustomizer; +import io.fd.honeycomb.v3po.translate.util.RWUtils; +import io.fd.honeycomb.v3po.translate.read.ChildReader; import java.util.ArrayList; import java.util.List; import javax.annotation.Nonnull; @@ -44,33 +44,33 @@ final class VppStateUtils { /** * Create root VppState reader with all its children wired */ - static CompositeRootVppReader<VppState, VppStateBuilder> getVppStateReader(@Nonnull final vppApi vppApi) { + static CompositeRootReader<VppState, VppStateBuilder> getVppStateReader(@Nonnull final vppApi vppApi) { - final ChildVppReader<Version> versionReader = new CompositeChildVppReader<>( + final ChildReader<Version> versionReader = new CompositeChildReader<>( Version.class, new VersionCustomizer(vppApi)); - final CompositeListVppReader<BridgeDomain, BridgeDomainKey, BridgeDomainBuilder> bridgeDomainReader = + final CompositeListReader<BridgeDomain, BridgeDomainKey, BridgeDomainBuilder> bridgeDomainReader = getBridgeDomainReader(vppApi); - final ChildVppReader<BridgeDomains> bridgeDomainsReader = new CompositeChildVppReader<>( + final ChildReader<BridgeDomains> bridgeDomainsReader = new CompositeChildReader<>( BridgeDomains.class, - VppRWUtils.singletonChildReaderList(bridgeDomainReader), + RWUtils.singletonChildReaderList(bridgeDomainReader), new ReflexiveChildReaderCustomizer<>(BridgeDomainsBuilder.class)); - final List<ChildVppReader<? extends ChildOf<VppState>>> childVppReaders = new ArrayList<>(); + final List<ChildReader<? extends ChildOf<VppState>>> childVppReaders = new ArrayList<>(); childVppReaders.add(versionReader); childVppReaders.add(bridgeDomainsReader); - return new CompositeRootVppReader<>( + return new CompositeRootReader<>( VppState.class, childVppReaders, - VppRWUtils.<VppState>emptyAugReaderList(), + RWUtils.<VppState>emptyAugReaderList(), new ReflexiveRootReaderCustomizer<>(VppStateBuilder.class)); } - static CompositeListVppReader<BridgeDomain, BridgeDomainKey, BridgeDomainBuilder> getBridgeDomainReader( + static CompositeListReader<BridgeDomain, BridgeDomainKey, BridgeDomainBuilder> getBridgeDomainReader( final @Nonnull vppApi vppApi) { - return new CompositeListVppReader<>( + return new CompositeListReader<>( BridgeDomain.class, new BridgeDomainCustomizer(vppApi)); } |