Search in sources :

Example 6 with KildaCoreConfig

use of org.openkilda.floodlight.KildaCoreConfig in project open-kilda by telstra.

the class AbstractSpeakerCommandTest method setUp.

@Before
public void setUp() throws Exception {
    injectMocks(this);
    moduleContext.addService(SessionService.class, sessionService);
    moduleContext.addService(IOFSwitchService.class, ofSwitchManager);
    expect(commandProcessor.getModuleContext()).andReturn(moduleContext).anyTimes();
    // sw
    prepareSwitch(sw, dpId);
    prepareSwitch(swNext, dpIdNext);
    Properties configProps = new Properties();
    PropertiesBasedConfigurationProvider provider = new PropertiesBasedConfigurationProvider(configProps);
    KildaCoreConfig config = provider.getConfiguration(KildaCoreConfig.class);
    expect(kildaCore.getConfig()).andReturn(config).anyTimes();
    moduleContext.addService(KildaCore.class, kildaCore);
    moduleContext.addService(FeatureDetectorService.class, featureDetectorService);
    prepareSessionService();
    switchSessionProducePlan.put(dpId, ImmutableList.of(session).iterator());
    switchSessionProducePlan.put(dpIdNext, ImmutableList.of(session).iterator());
}
Also used : PropertiesBasedConfigurationProvider(org.openkilda.config.provider.PropertiesBasedConfigurationProvider) KildaCoreConfig(org.openkilda.floodlight.KildaCoreConfig) Properties(java.util.Properties) Before(org.junit.Before)

Aggregations

KildaCoreConfig (org.openkilda.floodlight.KildaCoreConfig)6 Before (org.junit.Before)4 KildaCore (org.openkilda.floodlight.KildaCore)3 FloodlightModuleConfigurationProvider (org.openkilda.floodlight.config.provider.FloodlightModuleConfigurationProvider)3 IOFSwitchService (net.floodlightcontroller.core.internal.IOFSwitchService)2 InputService (org.openkilda.floodlight.service.of.InputService)2 JdkProxyStaticConfigurationFactory (com.sabre.oss.conf4j.factory.jdkproxy.JdkProxyStaticConfigurationFactory)1 MapConfigurationSource (com.sabre.oss.conf4j.source.MapConfigurationSource)1 Properties (java.util.Properties)1 ArrayBlockingQueue (java.util.concurrent.ArrayBlockingQueue)1 ThreadPoolExecutor (java.util.concurrent.ThreadPoolExecutor)1 IFloodlightProviderService (net.floodlightcontroller.core.IFloodlightProviderService)1 IOFSwitch (net.floodlightcontroller.core.IOFSwitch)1 SwitchDescription (net.floodlightcontroller.core.SwitchDescription)1 FloodlightModuleException (net.floodlightcontroller.core.module.FloodlightModuleException)1 IRestApiService (net.floodlightcontroller.restserver.IRestApiService)1 PropertiesBasedConfigurationProvider (org.openkilda.config.provider.PropertiesBasedConfigurationProvider)1 KafkaChannel (org.openkilda.floodlight.KafkaChannel)1 InvalidSignatureConfigurationException (org.openkilda.floodlight.error.InvalidSignatureConfigurationException)1 IPathVerificationService (org.openkilda.floodlight.pathverification.IPathVerificationService)1