Search in sources :

Example 11 with FloodlightModuleConfigurationProvider

use of org.openkilda.floodlight.config.provider.FloodlightModuleConfigurationProvider in project open-kilda by telstra.

the class PingServiceTest method setUp.

@Before
public void setUp() {
    injectMocks(this);
    KildaCore kildaCore = EasyMock.createMock(KildaCore.class);
    FloodlightModuleConfigurationProvider provider = FloodlightModuleConfigurationProvider.of(moduleContext, KildaCore.class);
    KildaCoreConfig coreConfig = provider.getConfiguration(KildaCoreConfig.class);
    expect(kildaCore.getConfig()).andStubReturn(coreConfig);
    EasyMock.replay(kildaCore);
    moduleContext.addService(KildaCore.class, kildaCore);
    moduleContext.addService(IOFSwitchService.class, createMock(IOFSwitchService.class));
    moduleContext.addService(InputService.class, createMock(InputService.class));
    moduleContext.addService(ISwitchManager.class, createMock(ISwitchManager.class));
    moduleContext.addConfigParam(pathVerificationService, "hmac256-secret", "secret");
}
Also used : FloodlightModuleConfigurationProvider(org.openkilda.floodlight.config.provider.FloodlightModuleConfigurationProvider) InputService(org.openkilda.floodlight.service.of.InputService) ISwitchManager(org.openkilda.floodlight.switchmanager.ISwitchManager) IOFSwitchService(net.floodlightcontroller.core.internal.IOFSwitchService) KildaCoreConfig(org.openkilda.floodlight.KildaCoreConfig) KildaCore(org.openkilda.floodlight.KildaCore) Before(org.junit.Before)

Aggregations

FloodlightModuleConfigurationProvider (org.openkilda.floodlight.config.provider.FloodlightModuleConfigurationProvider)11 FeatureDetectorService (org.openkilda.floodlight.service.FeatureDetectorService)4 IOFSwitchService (net.floodlightcontroller.core.internal.IOFSwitchService)3 Before (org.junit.Before)3 KildaCoreConfig (org.openkilda.floodlight.KildaCoreConfig)3 KafkaChannel (org.openkilda.floodlight.KafkaChannel)2 KildaCore (org.openkilda.floodlight.KildaCore)2 KafkaUtilityService (org.openkilda.floodlight.service.kafka.KafkaUtilityService)2 SwitchManagerConfig (org.openkilda.floodlight.switchmanager.SwitchManagerConfig)2 SwitchFlowFactory (org.openkilda.floodlight.switchmanager.factory.SwitchFlowFactory)2 VisibleForTesting (com.google.common.annotations.VisibleForTesting)1 JdkProxyStaticConfigurationFactory (com.sabre.oss.conf4j.factory.jdkproxy.JdkProxyStaticConfigurationFactory)1 MapConfigurationSource (com.sabre.oss.conf4j.source.MapConfigurationSource)1 ExecutionException (java.util.concurrent.ExecutionException)1 TimeoutException (java.util.concurrent.TimeoutException)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