use of org.openkilda.persistence.dummy.IslDirectionalReference in project open-kilda by telstra.
the class AbstractYFlowTest method before.
@Before
public void before() {
dummyFactory = new PersistenceDummyEntityFactory(persistenceManager);
FlowResourcesConfig resourceConfig = configurationProvider.getConfiguration(FlowResourcesConfig.class);
flowResourcesManager = spy(new FlowResourcesManager(persistenceManager, resourceConfig));
RuleManagerConfig ruleManagerConfig = configurationProvider.getConfiguration(RuleManagerConfig.class);
ruleManager = spy(new RuleManagerImpl(ruleManagerConfig));
alterFeatureToggles(true, true, true, true);
dummyFactory.makeSwitch(SWITCH_SHARED);
dummyFactory.makeSwitch(SWITCH_FIRST_EP);
dummyFactory.makeSwitch(SWITCH_SECOND_EP);
dummyFactory.makeSwitch(SWITCH_TRANSIT);
dummyFactory.makeSwitch(SWITCH_NEW_TRANSIT);
dummyFactory.makeSwitch(SWITCH_ALT_TRANSIT);
dummyFactory.makeSwitch(SWITCH_NEW_FIRST_EP);
dummyFactory.makeSwitch(SWITCH_NEW_SECOND_EP);
for (IslDirectionalReference reference : new IslDirectionalReference[] { islSharedToFirst, islSharedToSecond, islSharedToTransit, islTransitToFirst, islTransitToSecond, islSharedToAltTransit, islAltTransitToFirst, islAltTransitToSecond, islTransitToNewFirst, islTransitToNewSecond, islSharedToNewAltTransit, islNewAltTransitToFirst, islNewAltTransitToSecond, islSharedToNewTransit, islNewTransitToFirst, islNewTransitToSecond }) {
dummyFactory.makeIsl(reference.getSourceEndpoint(), reference.getDestEndpoint());
dummyFactory.makeIsl(reference.getDestEndpoint(), reference.getSourceEndpoint());
}
}
use of org.openkilda.persistence.dummy.IslDirectionalReference in project open-kilda by telstra.
the class FlowCacheServiceTest method createFlow.
private Flow createFlow() {
FlowEndpoint flowSource = new FlowEndpoint(SRC_SWITCH, IN_PORT);
FlowEndpoint flowDestination = new FlowEndpoint(DST_SWITCH, OUT_PORT);
IslDirectionalReference islDirectionalReference = new IslDirectionalReference(new IslEndpoint(SRC_SWITCH, ISL_SRC_PORT), new IslEndpoint(DST_SWITCH, ISL_DST_PORT));
return dummyFactory.makeFlow(flowSource, flowDestination, islDirectionalReference);
}
use of org.openkilda.persistence.dummy.IslDirectionalReference in project open-kilda by telstra.
the class AbstractFlowTest method before.
@Before
public void before() {
dummyFactory = new PersistenceDummyEntityFactory(persistenceManager);
FlowResourcesConfig resourceConfig = configurationProvider.getConfiguration(FlowResourcesConfig.class);
flowResourcesManager = spy(new FlowResourcesManager(persistenceManager, resourceConfig));
alterFeatureToggles(true, true, true);
dummyFactory.makeSwitch(SWITCH_SOURCE);
dummyFactory.makeSwitch(SWITCH_DEST);
dummyFactory.makeSwitch(SWITCH_TRANSIT);
for (IslDirectionalReference reference : new IslDirectionalReference[] { islSourceDest, islSourceDestAlt, islSourceTransit, islTransitDest }) {
dummyFactory.makeIsl(reference.getSourceEndpoint(), reference.getDestEndpoint());
dummyFactory.makeIsl(reference.getDestEndpoint(), reference.getSourceEndpoint());
}
}
Aggregations