Search in sources :

Example 6 with KildaCore

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

the class SwitchFlowFactory method setup.

@Override
public void setup(FloodlightModuleContext context) {
    ISwitchManager switchManager = context.getServiceImpl(ISwitchManager.class);
    config = switchManager.getSwitchManagerConfig();
    featureDetectorService = context.getServiceImpl(FeatureDetectorService.class);
    kildaCore = context.getServiceImpl(KildaCore.class);
    verificationBcastPacketDst = context.getServiceImpl(IPathVerificationService.class).getConfig().getVerificationBcastPacketDst();
}
Also used : ISwitchManager(org.openkilda.floodlight.switchmanager.ISwitchManager) IPathVerificationService(org.openkilda.floodlight.pathverification.IPathVerificationService) FeatureDetectorService(org.openkilda.floodlight.service.FeatureDetectorService) KildaCore(org.openkilda.floodlight.KildaCore)

Example 7 with KildaCore

use of org.openkilda.floodlight.KildaCore 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)

Example 8 with KildaCore

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

the class FlowSegmentCommand method setup.

@Override
protected void setup(FloodlightModuleContext moduleContext) throws Exception {
    super.setup(moduleContext);
    FeatureDetectorService featureDetectorService = moduleContext.getServiceImpl(FeatureDetectorService.class);
    switchFeatures = featureDetectorService.detectSwitch(getSw());
    KildaCore kildaCore = moduleContext.getServiceImpl(KildaCore.class);
    kildaCoreConfig = kildaCore.getConfig();
}
Also used : FeatureDetectorService(org.openkilda.floodlight.service.FeatureDetectorService) KildaCore(org.openkilda.floodlight.KildaCore)

Aggregations

KildaCore (org.openkilda.floodlight.KildaCore)8 FeatureDetectorService (org.openkilda.floodlight.service.FeatureDetectorService)5 IOFSwitchService (net.floodlightcontroller.core.internal.IOFSwitchService)4 FloodlightModuleContext (net.floodlightcontroller.core.module.FloodlightModuleContext)3 Before (org.junit.Before)3 Properties (java.util.Properties)2 PropertiesBasedConfigurationProvider (org.openkilda.config.provider.PropertiesBasedConfigurationProvider)2 KildaCoreConfig (org.openkilda.floodlight.KildaCoreConfig)2 FloodlightModuleConfigurationProvider (org.openkilda.floodlight.config.provider.FloodlightModuleConfigurationProvider)2 FlowSegmentMetadata (org.openkilda.floodlight.model.FlowSegmentMetadata)2 IPathVerificationService (org.openkilda.floodlight.pathverification.IPathVerificationService)2 ISwitchManager (org.openkilda.floodlight.switchmanager.ISwitchManager)2 MessageContext (org.openkilda.messaging.MessageContext)2 JdkProxyStaticConfigurationFactory (com.sabre.oss.conf4j.factory.jdkproxy.JdkProxyStaticConfigurationFactory)1 MapConfigurationSource (com.sabre.oss.conf4j.source.MapConfigurationSource)1 InetSocketAddress (java.net.InetSocketAddress)1 FloodlightContext (net.floodlightcontroller.core.FloodlightContext)1 IFloodlightProviderService (net.floodlightcontroller.core.IFloodlightProviderService)1 IOFSwitch (net.floodlightcontroller.core.IOFSwitch)1 SwitchDescription (net.floodlightcontroller.core.SwitchDescription)1