use of org.projectfloodlight.openflow.protocol.ver12.OFFactoryVer12 in project open-kilda by telstra.
the class PingRequestCommandAbstractTest method setUp.
@Override
@Before
public void setUp() throws Exception {
super.setUp();
moduleContext.addService(IOFSwitchService.class, switchService);
final DatapathId dpIdAlpha = DatapathId.of(0x0000fffe00000001L);
final DatapathId dpIdBeta = DatapathId.of(0x0000fffe00000002L);
final DatapathId dpIdGamma = DatapathId.of(0x0000fffe00000003L);
final DatapathId dpIdDelta = DatapathId.of(0x0000fffe00000004L);
OFFactory ofFactory = new OFFactoryVer13();
expect(switchAlpha.getId()).andReturn(dpIdAlpha).anyTimes();
expect(switchBeta.getId()).andReturn(dpIdBeta).anyTimes();
expect(switchMissing.getId()).andReturn(dpIdGamma).anyTimes();
expect(switchNotCapable.getId()).andReturn(dpIdDelta).anyTimes();
expect(switchAlpha.getOFFactory()).andReturn(ofFactory).anyTimes();
expect(switchBeta.getOFFactory()).andReturn(ofFactory).anyTimes();
expect(switchNotCapable.getOFFactory()).andReturn(new OFFactoryVer12()).anyTimes();
expect(switchService.getActiveSwitch(dpIdAlpha)).andReturn(switchAlpha).anyTimes();
expect(switchService.getActiveSwitch(dpIdBeta)).andReturn(switchBeta).anyTimes();
expect(switchService.getActiveSwitch(dpIdGamma)).andReturn(null).anyTimes();
expect(switchService.getActiveSwitch(dpIdDelta)).andReturn(switchNotCapable).anyTimes();
}
Aggregations