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();
}
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");
}
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();
}
Aggregations