use of org.projectfloodlight.openflow.protocol.OFDescStatsReply in project open-kilda by telstra.
the class PathVerificationCommonTests method setUp.
@Before
public void setUp() throws Exception {
super.setUp();
FloodlightModuleContext fmc = new FloodlightModuleContext();
fmc.addService(IFloodlightProviderService.class, mockFloodlightProvider);
fmc.addService(FeatureDetectorService.class, featureDetectorService);
fmc.addService(IOFSwitchService.class, getMockSwitchService());
pvs = new PathVerificationService();
pvs.initAlgorithm("secret");
fmc.addConfigParam(pvs, "isl_bandwidth_quotient", "0.0");
fmc.addConfigParam(pvs, "hmac256-secret", "secret");
fmc.addConfigParam(pvs, "bootstrap-servers", "");
pvs.init(fmc);
InetSocketAddress srcIpTarget = new InetSocketAddress("192.168.10.1", 200);
long switchId = 0x112233445566L;
OFPortDesc portDescription = EasyMock.createMock(OFPortDesc.class);
OFDescStatsReply swDescription = factory.buildDescStatsReply().build();
sw = buildMockIoFSwitch(switchId, portDescription, factory, swDescription, srcIpTarget);
replay(sw);
}
use of org.projectfloodlight.openflow.protocol.OFDescStatsReply in project open-kilda by telstra.
the class PathVerificationPacketOutTest method setUp.
@Before
public void setUp() throws Exception {
super.setUp();
FloodlightModuleContext fmc = new FloodlightModuleContext();
fmc.addService(IFloodlightProviderService.class, mockFloodlightProvider);
fmc.addService(IOFSwitchService.class, getMockSwitchService());
fmc.addService(FeatureDetectorService.class, featureDetectorService);
OFDescStatsReply swDescription = factory.buildDescStatsReply().build();
PathVerificationServiceConfig config = EasyMock.createMock(PathVerificationServiceConfig.class);
expect(config.getVerificationBcastPacketDst()).andReturn(VERIFICATION_BCAST_PACKET_DST).anyTimes();
replay(config);
pvs = new PathVerificationService();
pvs.setConfig(config);
pvs.initAlgorithm("secret");
fmc.addConfigParam(pvs, "isl_bandwidth_quotient", "0.0");
fmc.addConfigParam(pvs, "hmac256-secret", "secret");
fmc.addConfigParam(pvs, "bootstrap-servers", "");
pvs.init(fmc);
srcIpTarget = new InetSocketAddress("192.168.10.1", 200);
dstIpTarget = new InetSocketAddress("192.168.10.101", 100);
long sw1HwAddrTarget = 0x112233445566L;
long sw2HwAddrTarget = 0xAABBCCDDEEFFL;
OFPortDesc sw1Port1 = EasyMock.createMock(OFPortDesc.class);
OFPortDesc sw2Port1 = EasyMock.createMock(OFPortDesc.class);
expect(sw2Port1.getHwAddr()).andReturn(MacAddress.of(sw2HwAddrTarget)).anyTimes();
replay(sw2Port1);
sw1 = buildMockIoFSwitch(sw1HwAddrTarget, sw1Port1, factory, swDescription, srcIpTarget);
sw2 = buildMockIoFSwitch(sw2HwAddrTarget, sw2Port1, factory, swDescription, dstIpTarget);
replay(sw1);
replay(sw2);
}
Aggregations