本文整理汇总了Java中net.floodlightcontroller.devicemanager.IDeviceService类的典型用法代码示例。如果您正苦于以下问题:Java IDeviceService类的具体用法?Java IDeviceService怎么用?Java IDeviceService使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IDeviceService类属于net.floodlightcontroller.devicemanager包,在下文中一共展示了IDeviceService类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: init
import net.floodlightcontroller.devicemanager.IDeviceService; //导入依赖的package包/类
@Override
public void init(FloodlightModuleContext context) throws FloodlightModuleException
{
floodlightProvider = context.getServiceImpl(IFloodlightProviderService.class);
deviceService = context.getServiceImpl(IDeviceService.class);
routingService = context.getServiceImpl(IRoutingService.class);
switchService = context.getServiceImpl(IOFSwitchService.class);
linkService = context.getServiceImpl(ILinkDiscoveryService.class);
messageDamper = new OFMessageDamper(OFMESSAGE_DAMPER_CAPACITY,
EnumSet.of(OFType.FLOW_MOD),
OFMESSAGE_DAMPER_TIMEOUT);
library = new FP_LibFloodlight( LoggerFactory.getLogger( getClass() ));
}
示例2: init
import net.floodlightcontroller.devicemanager.IDeviceService; //导入依赖的package包/类
@Override
public void init(FloodlightModuleContext context)
throws FloodlightModuleException {
floodlightProviderService = context.getServiceImpl(IFloodlightProviderService.class);
restApiService = context.getServiceImpl(IRestApiService.class);
deviceService = context.getServiceImpl(IDeviceService.class);
vNetsByGuid = new ConcurrentHashMap<String, VirtualNetwork>();
nameToGuid = new ConcurrentHashMap<String, String>();
guidToGateway = new ConcurrentHashMap<String, IPv4Address>();
gatewayToGuid = new ConcurrentHashMap<IPv4Address, Set<String>>();
macToGuid = new ConcurrentHashMap<MacAddress, String>();
portToMac = new ConcurrentHashMap<String, MacAddress>();
macToGateway = new ConcurrentHashMap<MacAddress, IPv4Address>();
deviceListener = new DeviceListenerImpl();
}
示例3: getModuleDependencies
import net.floodlightcontroller.devicemanager.IDeviceService; //导入依赖的package包/类
@Override
public Collection<Class<? extends IFloodlightService>>
getModuleDependencies() {
Collection<Class<? extends IFloodlightService>> l =
new ArrayList<Class<? extends IFloodlightService>>();
l.add(IFloodlightProviderService.class);
l.add(IRestApiService.class);
l.add(IOFSwitchService.class);
l.add(IDeviceService.class);
l.add(IDebugCounterService.class);
l.add(ITopologyService.class);
l.add(IRoutingService.class);
l.add(IStaticFlowEntryPusherService.class);
return l;
}
示例4: init
import net.floodlightcontroller.devicemanager.IDeviceService; //导入依赖的package包/类
@Override
public void init(FloodlightModuleContext context)
throws FloodlightModuleException {
floodlightProviderService = context.getServiceImpl(IFloodlightProviderService.class);
restApiService = context.getServiceImpl(IRestApiService.class);
debugCounterService = context.getServiceImpl(IDebugCounterService.class);
deviceManagerService = context.getServiceImpl(IDeviceService.class);
routingEngineService = context.getServiceImpl(IRoutingService.class);
topologyService = context.getServiceImpl(ITopologyService.class);
sfpService = context.getServiceImpl(IStaticFlowEntryPusherService.class);
switchService = context.getServiceImpl(IOFSwitchService.class);
vips = new HashMap<String, LBVip>();
pools = new HashMap<String, LBPool>();
members = new HashMap<String, LBMember>();
vipIpToId = new HashMap<Integer, String>();
vipIpToMac = new HashMap<Integer, MacAddress>();
memberIpToId = new HashMap<Integer, String>();
}
示例5: testDeviceIndex
import net.floodlightcontroller.devicemanager.IDeviceService; //导入依赖的package包/类
@Test
public void testDeviceIndex() throws Exception {
EnumSet<IDeviceService.DeviceField> indexFields =
EnumSet.noneOf(IDeviceService.DeviceField.class);
indexFields.add(IDeviceService.DeviceField.IPv4);
indexFields.add(IDeviceService.DeviceField.VLAN);
deviceManager.addIndex(false, indexFields);
indexFields = EnumSet.noneOf(IDeviceService.DeviceField.class);
deviceManager.addIndex(false, indexFields);
ITopologyService mockTopology = createMock(ITopologyService.class);
deviceManager.topology = mockTopology;
expect(mockTopology.isAttachmentPointPort(DatapathId.of(anyLong()),
OFPort.of(anyShort()))).
andReturn(true).anyTimes();
expect(mockTopology.getOpenflowDomainId(DatapathId.of(EasyMock.anyLong()))).andReturn(DatapathId.of(1L)).anyTimes();
replay(mockTopology);
doTestDeviceQuery();
}
示例6: testDeviceClassIndex
import net.floodlightcontroller.devicemanager.IDeviceService; //导入依赖的package包/类
@Test
public void testDeviceClassIndex() throws Exception {
EnumSet<IDeviceService.DeviceField> indexFields =
EnumSet.noneOf(IDeviceService.DeviceField.class);
indexFields.add(IDeviceService.DeviceField.IPv4);
indexFields.add(IDeviceService.DeviceField.VLAN);
deviceManager.addIndex(true, indexFields);
ITopologyService mockTopology = createMock(ITopologyService.class);
deviceManager.topology = mockTopology;
expect(mockTopology.isAttachmentPointPort(DatapathId.of(anyLong()),
OFPort.of(anyShort()))).
andReturn(true).anyTimes();
expect(mockTopology.getOpenflowDomainId(DatapathId.of(EasyMock.anyLong()))).andReturn(DatapathId.of(1L)).anyTimes();
replay(mockTopology);
doTestDeviceClassQuery();
}
示例7: testDeviceIndex
import net.floodlightcontroller.devicemanager.IDeviceService; //导入依赖的package包/类
@Test
public void testDeviceIndex() throws Exception {
EnumSet<IDeviceService.DeviceField> indexFields =
EnumSet.noneOf(IDeviceService.DeviceField.class);
indexFields.add(IDeviceService.DeviceField.IPV4);
indexFields.add(IDeviceService.DeviceField.VLAN);
deviceManager.addIndex(false, indexFields);
indexFields = EnumSet.noneOf(IDeviceService.DeviceField.class);
deviceManager.addIndex(false, indexFields);
ITopologyService mockTopology = createMock(ITopologyService.class);
deviceManager.topology = mockTopology;
expect(mockTopology.isAttachmentPointPort(DatapathId.of(anyLong()),
OFPort.of(anyShort()))).
andReturn(true).anyTimes();
expect(mockTopology.getL2DomainId(DatapathId.of(EasyMock.anyLong()))).andReturn(DatapathId.of(1L)).anyTimes();
replay(mockTopology);
doTestDeviceQuery();
}
示例8: testDeviceClassIndex
import net.floodlightcontroller.devicemanager.IDeviceService; //导入依赖的package包/类
@Test
public void testDeviceClassIndex() throws Exception {
EnumSet<IDeviceService.DeviceField> indexFields =
EnumSet.noneOf(IDeviceService.DeviceField.class);
indexFields.add(IDeviceService.DeviceField.IPV4);
indexFields.add(IDeviceService.DeviceField.VLAN);
deviceManager.addIndex(true, indexFields);
ITopologyService mockTopology = createMock(ITopologyService.class);
deviceManager.topology = mockTopology;
expect(mockTopology.isAttachmentPointPort(DatapathId.of(anyLong()),
OFPort.of(anyShort()))).
andReturn(true).anyTimes();
expect(mockTopology.getL2DomainId(DatapathId.of(EasyMock.anyLong()))).andReturn(DatapathId.of(1L)).anyTimes();
replay(mockTopology);
doTestDeviceClassQuery();
}
示例9: init
import net.floodlightcontroller.devicemanager.IDeviceService; //导入依赖的package包/类
/**
* This is a hook for each module to do its <em>internal</em> initialization,
* e.g., call setService(context.getService("Service"))
*
* All module dependencies are resolved when this is called, but not every module
* is initialized.
*
* @param context
* @throws FloodlightModuleException
*/
@Override
public void init(FloodlightModuleContext context) throws FloodlightModuleException {
this.floodlightProvider = context.getServiceImpl(IFloodlightProviderService.class);
this.deviceManagerService = context.getServiceImpl(IDeviceService.class);
this.topologyService = context.getServiceImpl(ITopologyService.class);
this.switchService = context.getServiceImpl(IOFSwitchService.class);
this.restApiService = context.getServiceImpl(IRestApiService.class);
logger = LoggerFactory.getLogger(ARScheduler.class);
this.of13Factory = OFFactories.getFactory(OFVersion.OF_13);
this.theRM = new ResourceManager(logger);
this.scheduler = new FlowScheduler(theRM, logger);
this.floodlightTopoBuilder = new FloodlightTopologyBuilder(this);
this.flowProvisioner = new FlowProvisioner(this);
this.topoBuilder = new TopologyBuilder();
}
示例10: init
import net.floodlightcontroller.devicemanager.IDeviceService; //导入依赖的package包/类
@Override
@LogMessageDocs({
@LogMessageDoc(level="WARN",
message="Error parsing flow idle timeout, " +
"using default of {number} seconds",
explanation="The properties file contains an invalid " +
"flow idle timeout",
recommendation="Correct the idle timeout in the " +
"properties file."),
@LogMessageDoc(level="WARN",
message="Error parsing flow hard timeout, " +
"using default of {number} seconds",
explanation="The properties file contains an invalid " +
"flow hard timeout",
recommendation="Correct the hard timeout in the " +
"properties file.")
})
public void init(FloodlightModuleContext context) throws FloodlightModuleException {
super.init();
this.floodlightProvider = context.getServiceImpl(IFloodlightProviderService.class);
this.deviceManager = context.getServiceImpl(IDeviceService.class);
this.routingEngine = context.getServiceImpl(IRoutingService.class);
this.topology = context.getServiceImpl(ITopologyService.class);
this.counterStore = context.getServiceImpl(ICounterStoreService.class);
}
示例11: init
import net.floodlightcontroller.devicemanager.IDeviceService; //导入依赖的package包/类
@Override
public void init(FloodlightModuleContext context)
throws FloodlightModuleException {
floodlightProviderService = context.getServiceImpl(IFloodlightProviderService.class);
restApiService = context.getServiceImpl(IRestApiService.class);
debugCounterService = context.getServiceImpl(IDebugCounterService.class);
deviceManagerService = context.getServiceImpl(IDeviceService.class);
routingEngineService = context.getServiceImpl(IRoutingService.class);
topologyService = context.getServiceImpl(ITopologyService.class);
sfpService = context.getServiceImpl(IStaticFlowEntryPusherService.class);
switchService = context.getServiceImpl(IOFSwitchService.class);
vips = new HashMap<String, LBVip>();
pools = new HashMap<String, LBPool>();
members = new HashMap<String, LBMember>();
vipIpToId = new HashMap<Integer, String>();
vipIpToMac = new HashMap<Integer, MacAddress>();
memberIpToId = new HashMap<Integer, String>();
}
示例12: testDeviceIndex
import net.floodlightcontroller.devicemanager.IDeviceService; //导入依赖的package包/类
@Test
public void testDeviceIndex() throws Exception {
EnumSet<IDeviceService.DeviceField> indexFields =
EnumSet.noneOf(IDeviceService.DeviceField.class);
indexFields.add(IDeviceService.DeviceField.IPV4);
indexFields.add(IDeviceService.DeviceField.VLAN);
deviceManager.addIndex(false, indexFields);
indexFields = EnumSet.noneOf(IDeviceService.DeviceField.class);
deviceManager.addIndex(false, indexFields);
ITopologyService mockTopology = createMock(ITopologyService.class);
deviceManager.topology = mockTopology;
expect(mockTopology.isAttachmentPointPort(anyLong(),
anyShort())).
andReturn(true).anyTimes();
expect(mockTopology.getL2DomainId(EasyMock.anyLong())).andReturn(1L).anyTimes();
replay(mockTopology);
doTestDeviceQuery();
}
示例13: testDeviceClassIndex
import net.floodlightcontroller.devicemanager.IDeviceService; //导入依赖的package包/类
@Test
public void testDeviceClassIndex() throws Exception {
EnumSet<IDeviceService.DeviceField> indexFields =
EnumSet.noneOf(IDeviceService.DeviceField.class);
indexFields.add(IDeviceService.DeviceField.IPV4);
indexFields.add(IDeviceService.DeviceField.VLAN);
deviceManager.addIndex(true, indexFields);
ITopologyService mockTopology = createMock(ITopologyService.class);
deviceManager.topology = mockTopology;
expect(mockTopology.isAttachmentPointPort(anyLong(),
anyShort())).
andReturn(true).anyTimes();
expect(mockTopology.getL2DomainId(EasyMock.anyLong())).andReturn(1L).anyTimes();
replay(mockTopology);
doTestDeviceClassQuery();
}
示例14: getModuleDependencies
import net.floodlightcontroller.devicemanager.IDeviceService; //导入依赖的package包/类
@Override
public Collection<Class<? extends IFloodlightService>>
getModuleDependencies() {
Collection<Class<? extends IFloodlightService>> l =
new ArrayList<Class<? extends IFloodlightService>>();
l.add(IFloodlightProviderService.class);
l.add(IRestApiService.class);
l.add(IOFSwitchService.class);
l.add(IDeviceService.class);
l.add(IDebugCounterService.class);
l.add(ITopologyService.class);
l.add(IRoutingService.class);
l.add(IStaticFlowEntryPusherService.class);
return l;
}
示例15: parseAndAnnotate
import net.floodlightcontroller.devicemanager.IDeviceService; //导入依赖的package包/类
public FloodlightContext parseAndAnnotate(FloodlightContext bc,
OFMessage m,
IDevice srcDevice,
IDevice dstDevice) {
if (OFType.PACKET_IN.equals(m.getType())) {
OFPacketIn pi = (OFPacketIn)m;
Ethernet eth = new Ethernet();
eth.deserialize(pi.getPacketData(), 0, pi.getPacketData().length);
IFloodlightProviderService.bcStore.put(bc,
IFloodlightProviderService.CONTEXT_PI_PAYLOAD,
eth);
}
if (srcDevice != null) {
IDeviceService.fcStore.put(bc,
IDeviceService.CONTEXT_SRC_DEVICE,
srcDevice);
}
if (dstDevice != null) {
IDeviceService.fcStore.put(bc,
IDeviceService.CONTEXT_DST_DEVICE,
dstDevice);
}
return bc;
}