Search in sources :

Example 1 with IslDirectionalReference

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());
    }
}
Also used : FlowResourcesConfig(org.openkilda.wfm.share.flow.resources.FlowResourcesConfig) RuleManagerConfig(org.openkilda.rulemanager.RuleManagerConfig) PersistenceDummyEntityFactory(org.openkilda.persistence.dummy.PersistenceDummyEntityFactory) IslDirectionalReference(org.openkilda.persistence.dummy.IslDirectionalReference) FlowResourcesManager(org.openkilda.wfm.share.flow.resources.FlowResourcesManager) RuleManagerImpl(org.openkilda.rulemanager.RuleManagerImpl) Before(org.junit.Before)

Example 2 with IslDirectionalReference

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);
}
Also used : IslEndpoint(org.openkilda.model.IslEndpoint) FlowEndpoint(org.openkilda.model.FlowEndpoint) IslDirectionalReference(org.openkilda.persistence.dummy.IslDirectionalReference)

Example 3 with 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());
    }
}
Also used : FlowResourcesConfig(org.openkilda.wfm.share.flow.resources.FlowResourcesConfig) PersistenceDummyEntityFactory(org.openkilda.persistence.dummy.PersistenceDummyEntityFactory) IslDirectionalReference(org.openkilda.persistence.dummy.IslDirectionalReference) FlowResourcesManager(org.openkilda.wfm.share.flow.resources.FlowResourcesManager) Before(org.junit.Before)

Aggregations

IslDirectionalReference (org.openkilda.persistence.dummy.IslDirectionalReference)3 Before (org.junit.Before)2 PersistenceDummyEntityFactory (org.openkilda.persistence.dummy.PersistenceDummyEntityFactory)2 FlowResourcesConfig (org.openkilda.wfm.share.flow.resources.FlowResourcesConfig)2 FlowResourcesManager (org.openkilda.wfm.share.flow.resources.FlowResourcesManager)2 FlowEndpoint (org.openkilda.model.FlowEndpoint)1 IslEndpoint (org.openkilda.model.IslEndpoint)1 RuleManagerConfig (org.openkilda.rulemanager.RuleManagerConfig)1 RuleManagerImpl (org.openkilda.rulemanager.RuleManagerImpl)1