Java 类net.floodlightcontroller.core.internal.IOFSwitchService 实例源码

项目:open-kilda    文件:ReplaceInstallFlowTest.java   
@Before
public void setUp() throws FloodlightModuleException {
    final SwitchManager switchManager = new SwitchManager();
    final PathVerificationService pathVerificationService = new PathVerificationService();

    ofSwitchService = createMock(IOFSwitchService.class);
    producer = createMock(KafkaMessageProducer.class);

    context.addService(IOFSwitchService.class, ofSwitchService);
    context.addService(IRestApiService.class, null);
    context.addService(SwitchEventCollector.class, null);
    context.addService(KafkaMessageProducer.class, producer);
    context.addService(IPathVerificationService.class, pathVerificationService);
    context.addService(ISwitchManager.class, switchManager);

    switchManager.init(context);

    collector = new KafkaMessageCollector();
    context.addConfigParam(collector, "topic", "");
    context.addConfigParam(collector, "bootstrap-servers", "");
    collector.init(context);

    initScheme();
}
项目:fresco_floodlight    文件:FP_FloodlightRTE.java   
@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() ));

}
项目:fresco_floodlight    文件:LoadBalancer.java   
@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;
}
项目:fresco_floodlight    文件:LoadBalancer.java   
@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>();
}
项目:fresco_floodlight    文件:TopologyManager.java   
@Override
public void init(FloodlightModuleContext context)
        throws FloodlightModuleException {
    linkDiscoveryService = context.getServiceImpl(ILinkDiscoveryService.class);
    threadPoolService = context.getServiceImpl(IThreadPoolService.class);
    floodlightProviderService = context.getServiceImpl(IFloodlightProviderService.class);
    switchService = context.getServiceImpl(IOFSwitchService.class);
    restApiService = context.getServiceImpl(IRestApiService.class);
    debugCounterService = context.getServiceImpl(IDebugCounterService.class);
    debugEventService = context.getServiceImpl(IDebugEventService.class);

    switchPorts = new HashMap<DatapathId, Set<OFPort>>();
    switchPortLinks = new HashMap<NodePortTuple, Set<Link>>();
    directLinks = new HashMap<NodePortTuple, Set<Link>>();
    portBroadcastDomainLinks = new HashMap<NodePortTuple, Set<Link>>();
    tunnelPorts = new HashSet<NodePortTuple>();
    topologyAware = new ArrayList<ITopologyListener>();
    ldUpdates = new LinkedBlockingQueue<LDUpdate>();
    haListener = new HAListenerDelegate();
    registerTopologyDebugCounters();
    registerTopologyDebugEvents();
}
项目:fresco_floodlight    文件:SwitchResourceBase.java   
protected OFFeaturesReply getSwitchFeaturesReply(DatapathId switchId) {
    IOFSwitchService switchService =
            (IOFSwitchService) getContext().getAttributes().
            get(IOFSwitchService.class.getCanonicalName());

    IOFSwitch sw = switchService.getSwitch(switchId);
    Future<OFFeaturesReply> future;
    OFFeaturesReply featuresReply = null;
    OFFeaturesRequest featuresRequest = sw.getOFFactory().buildFeaturesRequest().build();
    if (sw != null) {
        try {
            future = sw.writeRequest(featuresRequest);
            featuresReply = future.get(10, TimeUnit.SECONDS);
        } catch (Exception e) {
            log.error("Failure getting features reply from switch" + sw, e);
        }
    }

    return featuresReply;
}
项目:fresco_floodlight    文件:FloodlightProvider.java   
@Override
public void init(FloodlightModuleContext context) throws FloodlightModuleException {
   controller.setStorageSourceService(
       context.getServiceImpl(IStorageSourceService.class));
   controller.setPktInProcessingService(
       context.getServiceImpl(IPktInProcessingTimeService.class));
   controller.setDebugCounter(
       context.getServiceImpl(IDebugCounterService.class));
   controller.setDebugEvent(
       context.getServiceImpl(IDebugEventService.class));
   controller.setRestApiService(
       context.getServiceImpl(IRestApiService.class));
   controller.setThreadPoolService(
       context.getServiceImpl(IThreadPoolService.class));
   controller.setSyncService(
       context.getServiceImpl(ISyncService.class));
   controller.setSwitchService(
       context.getServiceImpl(IOFSwitchService.class));
   controller.init(context.getConfigParams(this));
}
项目:fresco_floodlight    文件:TopologyInstanceTest.java   
@Before 
public void SetUp() throws Exception {
    fmc = new FloodlightModuleContext();
    linkDiscovery = EasyMock.createMock(ILinkDiscoveryService.class);
    mockFloodlightProvider = new MockFloodlightProvider();
    fmc.addService(IFloodlightProviderService.class, mockFloodlightProvider);
    fmc.addService(IOFSwitchService.class, new MockSwitchManager());
    fmc.addService(ILinkDiscoveryService.class, linkDiscovery);
    fmc.addService(IDebugCounterService.class, new MockDebugCounterService());
    fmc.addService(IDebugEventService.class, new MockDebugEventService());
    MockThreadPoolService tp = new MockThreadPoolService();
    topologyManager = new TopologyManager();
    fmc.addService(IThreadPoolService.class, tp);
    topologyManager.init(fmc);
    tp.init(fmc);
    tp.startUp(fmc);
}
项目:iTAP-controller    文件:LoadBalancer.java   
@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;
}
项目:iTAP-controller    文件:LoadBalancer.java   
@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>();
}
项目:iTAP-controller    文件:TopologyManager.java   
@Override
public void init(FloodlightModuleContext context)
        throws FloodlightModuleException {
    linkDiscoveryService = context.getServiceImpl(ILinkDiscoveryService.class);
    threadPoolService = context.getServiceImpl(IThreadPoolService.class);
    floodlightProviderService = context.getServiceImpl(IFloodlightProviderService.class);
    switchService = context.getServiceImpl(IOFSwitchService.class);
    restApiService = context.getServiceImpl(IRestApiService.class);
    debugCounterService = context.getServiceImpl(IDebugCounterService.class);
    debugEventService = context.getServiceImpl(IDebugEventService.class);

    switchPorts = new HashMap<DatapathId, Set<OFPort>>();
    switchPortLinks = new HashMap<NodePortTuple, Set<Link>>();
    directLinks = new HashMap<NodePortTuple, Set<Link>>();
    portBroadcastDomainLinks = new HashMap<NodePortTuple, Set<Link>>();
    tunnelPorts = new HashSet<NodePortTuple>();
    topologyAware = new ArrayList<ITopologyListener>();
    ldUpdates = new LinkedBlockingQueue<LDUpdate>();
    haListener = new HAListenerDelegate();
    registerTopologyDebugCounters();
    registerTopologyDebugEvents();
}
项目:iTAP-controller    文件:SwitchResourceBase.java   
protected OFFeaturesReply getSwitchFeaturesReply(DatapathId switchId) {
    IOFSwitchService switchService =
            (IOFSwitchService) getContext().getAttributes().
            get(IOFSwitchService.class.getCanonicalName());

    IOFSwitch sw = switchService.getSwitch(switchId);
    Future<OFFeaturesReply> future;
    OFFeaturesReply featuresReply = null;
    OFFeaturesRequest featuresRequest = sw.getOFFactory().buildFeaturesRequest().build();
    if (sw != null) {
        try {
            future = sw.writeRequest(featuresRequest);
            featuresReply = future.get(10, TimeUnit.SECONDS);
        } catch (Exception e) {
            log.error("Failure getting features reply from switch" + sw, e);
        }
    }

    return featuresReply;
}
项目:iTAP-controller    文件:FloodlightProvider.java   
@Override
public void init(FloodlightModuleContext context) throws FloodlightModuleException {
   controller.setStorageSourceService(
       context.getServiceImpl(IStorageSourceService.class));
   controller.setPktInProcessingService(
       context.getServiceImpl(IPktInProcessingTimeService.class));
   controller.setDebugCounter(
       context.getServiceImpl(IDebugCounterService.class));
   controller.setDebugEvent(
       context.getServiceImpl(IDebugEventService.class));
   controller.setRestApiService(
       context.getServiceImpl(IRestApiService.class));
   controller.setThreadPoolService(
       context.getServiceImpl(IThreadPoolService.class));
   controller.setSyncService(
       context.getServiceImpl(ISyncService.class));
   controller.setSwitchService(
       context.getServiceImpl(IOFSwitchService.class));
   controller.init(context.getConfigParams(this));
}
项目:SDN-Multicast    文件:LoadBalancer.java   
@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;
}
项目:SDN-Multicast    文件:LoadBalancer.java   
@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>();
}
项目:SDN-Multicast    文件:MulticastController.java   
@Override
public void init(FloodlightModuleContext context)
        throws FloodlightModuleException {
    floodlightProvider = context.getServiceImpl(IFloodlightProviderService.class);
    logger = LoggerFactory.getLogger(MulticastController.class);
    lds = context.getServiceImpl(ILinkDiscoveryService.class);
    routingService = context.getServiceImpl(IRoutingService.class);
    flowPusher = context.getServiceImpl(IStaticFlowEntryPusherService.class);
    switchService = context.getServiceImpl(IOFSwitchService.class);
    statisticsService = context.getServiceImpl(IStatisticsService.class);
    groupDB = new MulticastGroupStore(this);
    Map<String, String> configOptions = context.getConfigParams(this);
    String topologyFile = configOptions.get("topologyFile");
    String ipBandwidthQoSFile = configOptions.get("ipBandwidthQoSFile");
    if (topologyFile != null) {
        topologyHelper = new TopologyHelper(topologyFile);
    } else {
        logger.error("topologyFile not provided");
    }

    logger.info(" QOS file : " + ipBandwidthQoSFile);
    flowQoSDemandHelper = new FlowQoSDemandHelper(ipBandwidthQoSFile);
    if (statisticsService.getBandwidthConsumption() == null)
        statisticsService.collectStatistics(false);
}
项目:floodlight-hardware    文件:TopologyManager.java   
@Override
public void init(FloodlightModuleContext context)
        throws FloodlightModuleException {
    linkDiscoveryService = context.getServiceImpl(ILinkDiscoveryService.class);
    threadPoolService = context.getServiceImpl(IThreadPoolService.class);
    floodlightProviderService = context.getServiceImpl(IFloodlightProviderService.class);
    switchService = context.getServiceImpl(IOFSwitchService.class);
    restApiService = context.getServiceImpl(IRestApiService.class);
    debugCounterService = context.getServiceImpl(IDebugCounterService.class);
    debugEventService = context.getServiceImpl(IDebugEventService.class);

    switchPorts = new HashMap<DatapathId, Set<OFPort>>();
    switchPortLinks = new HashMap<NodePortTuple, Set<Link>>();
    directLinks = new HashMap<NodePortTuple, Set<Link>>();
    portBroadcastDomainLinks = new HashMap<NodePortTuple, Set<Link>>();
    tunnelPorts = new HashSet<NodePortTuple>();
    topologyAware = new ArrayList<ITopologyListener>();
    ldUpdates = new LinkedBlockingQueue<LDUpdate>();
    haListener = new HAListenerDelegate();
    registerTopologyDebugCounters();
    registerTopologyDebugEvents();
}
项目:ACAMPController    文件:FloodlightProvider.java   
@Override
public void init(FloodlightModuleContext context) throws FloodlightModuleException {
   controller.setStorageSourceService(
       context.getServiceImpl(IStorageSourceService.class));
   controller.setPktInProcessingService(
       context.getServiceImpl(IPktInProcessingTimeService.class));
   controller.setDebugCounter(
       context.getServiceImpl(IDebugCounterService.class));
   controller.setDebugEvent(
       context.getServiceImpl(IDebugEventService.class));
   controller.setRestApiService(
       context.getServiceImpl(IRestApiService.class));
   controller.setThreadPoolService(
       context.getServiceImpl(IThreadPoolService.class));
   controller.setSyncService(
       context.getServiceImpl(ISyncService.class));
   controller.setSwitchService(
       context.getServiceImpl(IOFSwitchService.class));
   controller.init(context.getConfigParams(this));
}
项目:SDN-Multicast    文件:FloodlightProvider.java   
@Override
public void init(FloodlightModuleContext context) throws FloodlightModuleException {
   controller.setStorageSourceService(
       context.getServiceImpl(IStorageSourceService.class));
   controller.setPktInProcessingService(
       context.getServiceImpl(IPktInProcessingTimeService.class));
   controller.setDebugCounter(
       context.getServiceImpl(IDebugCounterService.class));
   controller.setDebugEvent(
       context.getServiceImpl(IDebugEventService.class));
   controller.setRestApiService(
       context.getServiceImpl(IRestApiService.class));
   controller.setThreadPoolService(
       context.getServiceImpl(IThreadPoolService.class));
   controller.setSyncService(
       context.getServiceImpl(ISyncService.class));
   controller.setSwitchService(
       context.getServiceImpl(IOFSwitchService.class));
   controller.init(context.getConfigParams(this));
}
项目:SDN-Multicast    文件:TopologyInstanceTest.java   
@Before 
public void SetUp() throws Exception {
    fmc = new FloodlightModuleContext();
    linkDiscovery = EasyMock.createMock(ILinkDiscoveryService.class);
    mockFloodlightProvider = new MockFloodlightProvider();
    fmc.addService(IFloodlightProviderService.class, mockFloodlightProvider);
    fmc.addService(IOFSwitchService.class, new MockSwitchManager());
    fmc.addService(ILinkDiscoveryService.class, linkDiscovery);
    fmc.addService(IDebugCounterService.class, new MockDebugCounterService());
    fmc.addService(IDebugEventService.class, new MockDebugEventService());
    MockThreadPoolService tp = new MockThreadPoolService();
    topologyManager = new TopologyManager();
    fmc.addService(IThreadPoolService.class, tp);
    topologyManager.init(fmc);
    tp.init(fmc);
    tp.startUp(fmc);
}
项目:ACAMPController    文件:LoadBalancer.java   
@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>();
}
项目:arscheduler    文件:LoadBalancer.java   
@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;
}
项目:arscheduler    文件:LoadBalancer.java   
@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>();
}
项目:ACAMPController    文件:TopologyManager.java   
@Override
public void init(FloodlightModuleContext context)
        throws FloodlightModuleException {
    linkDiscoveryService = context.getServiceImpl(ILinkDiscoveryService.class);
    threadPoolService = context.getServiceImpl(IThreadPoolService.class);
    floodlightProviderService = context.getServiceImpl(IFloodlightProviderService.class);
    switchService = context.getServiceImpl(IOFSwitchService.class);
    restApiService = context.getServiceImpl(IRestApiService.class);
    debugCounterService = context.getServiceImpl(IDebugCounterService.class);
    debugEventService = context.getServiceImpl(IDebugEventService.class);

    switchPorts = new HashMap<DatapathId, Set<OFPort>>();
    switchPortLinks = new HashMap<NodePortTuple, Set<Link>>();
    directLinks = new HashMap<NodePortTuple, Set<Link>>();
    portBroadcastDomainLinks = new HashMap<NodePortTuple, Set<Link>>();
    tunnelPorts = new HashSet<NodePortTuple>();
    topologyAware = new ArrayList<ITopologyListener>();
    ldUpdates = new LinkedBlockingQueue<LDUpdate>();
    haListener = new HAListenerDelegate();
    registerTopologyDebugCounters();
    registerTopologyDebugEvents();
}
项目:ACAMPController    文件:LoadBalancer.java   
@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;
}
项目:arscheduler    文件:SwitchResourceBase.java   
protected OFFeaturesReply getSwitchFeaturesReply(DatapathId switchId) {
    IOFSwitchService switchService =
            (IOFSwitchService) getContext().getAttributes().
            get(IOFSwitchService.class.getCanonicalName());

    IOFSwitch sw = switchService.getSwitch(switchId);
    Future<OFFeaturesReply> future;
    OFFeaturesReply featuresReply = null;
    OFFeaturesRequest featuresRequest = sw.getOFFactory().buildFeaturesRequest().build();
    if (sw != null) {
        try {
            future = sw.writeRequest(featuresRequest);
            featuresReply = future.get(10, TimeUnit.SECONDS);
        } catch (Exception e) {
            log.error("Failure getting features reply from switch" + sw, e);
        }
    }

    return featuresReply;
}
项目:ACAMPController    文件:TopologyInstanceTest.java   
@Before 
public void SetUp() throws Exception {
    fmc = new FloodlightModuleContext();
    linkDiscovery = EasyMock.createMock(ILinkDiscoveryService.class);
    mockFloodlightProvider = new MockFloodlightProvider();
    fmc.addService(IFloodlightProviderService.class, mockFloodlightProvider);
    fmc.addService(IOFSwitchService.class, new MockSwitchManager());
    fmc.addService(ILinkDiscoveryService.class, linkDiscovery);
    fmc.addService(IDebugCounterService.class, new MockDebugCounterService());
    fmc.addService(IDebugEventService.class, new MockDebugEventService());
    MockThreadPoolService tp = new MockThreadPoolService();
    topologyManager = new TopologyManager();
    fmc.addService(IThreadPoolService.class, tp);
    topologyManager.init(fmc);
    tp.init(fmc);
    tp.startUp(fmc);
}
项目:arscheduler    文件:FloodlightProvider.java   
@Override
public void init(FloodlightModuleContext context) throws FloodlightModuleException {
   controller.setStorageSourceService(
       context.getServiceImpl(IStorageSourceService.class));
   controller.setPktInProcessingService(
       context.getServiceImpl(IPktInProcessingTimeService.class));
   controller.setDebugCounter(
       context.getServiceImpl(IDebugCounterService.class));
   controller.setDebugEvent(
       context.getServiceImpl(IDebugEventService.class));
   controller.setRestApiService(
       context.getServiceImpl(IRestApiService.class));
   controller.setThreadPoolService(
       context.getServiceImpl(IThreadPoolService.class));
   controller.setSyncService(
       context.getServiceImpl(ISyncService.class));
   controller.setSwitchService(
       context.getServiceImpl(IOFSwitchService.class));
   controller.init(context.getConfigParams(this));
}
项目:arscheduler    文件:TopologyInstanceTest.java   
@Before 
public void SetUp() throws Exception {
    fmc = new FloodlightModuleContext();
    linkDiscovery = EasyMock.createMock(ILinkDiscoveryService.class);
    mockFloodlightProvider = new MockFloodlightProvider();
    fmc.addService(IFloodlightProviderService.class, mockFloodlightProvider);
    fmc.addService(IOFSwitchService.class, new MockSwitchManager());
    fmc.addService(ILinkDiscoveryService.class, linkDiscovery);
    fmc.addService(IDebugCounterService.class, new MockDebugCounterService());
    fmc.addService(IDebugEventService.class, new MockDebugEventService());
    MockThreadPoolService tp = new MockThreadPoolService();
    topologyManager = new TopologyManager();
    fmc.addService(IThreadPoolService.class, tp);
    topologyManager.init(fmc);
    tp.init(fmc);
    tp.startUp(fmc);
}
项目:floodlight1.2-delay    文件:LoadBalancer.java   
@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;
}
项目:floodlight1.2-delay    文件:LoadBalancer.java   
@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>();
}
项目:floodlight-hardware    文件:FloodlightProvider.java   
@Override
public void init(FloodlightModuleContext context) throws FloodlightModuleException {
   controller.setStorageSourceService(
       context.getServiceImpl(IStorageSourceService.class));
   controller.setPktInProcessingService(
       context.getServiceImpl(IPktInProcessingTimeService.class));
   controller.setDebugCounter(
       context.getServiceImpl(IDebugCounterService.class));
   controller.setDebugEvent(
       context.getServiceImpl(IDebugEventService.class));
   controller.setRestApiService(
       context.getServiceImpl(IRestApiService.class));
   controller.setThreadPoolService(
       context.getServiceImpl(IThreadPoolService.class));
   controller.setSyncService(
       context.getServiceImpl(ISyncService.class));
   controller.setSwitchService(
       context.getServiceImpl(IOFSwitchService.class));
   controller.init(context.getConfigParams(this));
}
项目:floodlight1.2-delay    文件:TopologyManager.java   
@Override
public void init(FloodlightModuleContext context)
        throws FloodlightModuleException {
    linkDiscoveryService = context.getServiceImpl(ILinkDiscoveryService.class);
    threadPoolService = context.getServiceImpl(IThreadPoolService.class);
    floodlightProviderService = context.getServiceImpl(IFloodlightProviderService.class);
    switchService = context.getServiceImpl(IOFSwitchService.class);
    restApiService = context.getServiceImpl(IRestApiService.class);
    debugCounterService = context.getServiceImpl(IDebugCounterService.class);
    debugEventService = context.getServiceImpl(IDebugEventService.class);

    switchPorts = new HashMap<DatapathId, Set<OFPort>>();
    switchPortLinks = new HashMap<NodePortTuple, Set<Link>>();
    directLinks = new HashMap<NodePortTuple, Set<Link>>();
    portBroadcastDomainLinks = new HashMap<NodePortTuple, Set<Link>>();
    tunnelPorts = new HashSet<NodePortTuple>();
    topologyAware = new ArrayList<ITopologyListener>();
    ldUpdates = new LinkedBlockingQueue<LDUpdate>();
    haListener = new HAListenerDelegate();
    registerTopologyDebugCounters();
    registerTopologyDebugEvents();
}
项目:floodlight-hardware    文件:TopologyInstanceTest.java   
@Before 
public void SetUp() throws Exception {
    fmc = new FloodlightModuleContext();
    linkDiscovery = EasyMock.createMock(ILinkDiscoveryService.class);
    mockFloodlightProvider = new MockFloodlightProvider();
    fmc.addService(IFloodlightProviderService.class, mockFloodlightProvider);
    fmc.addService(IOFSwitchService.class, new MockSwitchManager());
    fmc.addService(ILinkDiscoveryService.class, linkDiscovery);
    fmc.addService(IDebugCounterService.class, new MockDebugCounterService());
    fmc.addService(IDebugEventService.class, new MockDebugEventService());
    MockThreadPoolService tp = new MockThreadPoolService();
    topologyManager = new TopologyManager();
    fmc.addService(IThreadPoolService.class, tp);
    topologyManager.init(fmc);
    tp.init(fmc);
    tp.startUp(fmc);
}
项目:floodlight1.2-delay    文件:TopologyInstanceTest.java   
@Before 
public void SetUp() throws Exception {
    fmc = new FloodlightModuleContext();
    linkDiscovery = EasyMock.createMock(ILinkDiscoveryService.class);
    mockFloodlightProvider = new MockFloodlightProvider();
    fmc.addService(IFloodlightProviderService.class, mockFloodlightProvider);
    fmc.addService(IOFSwitchService.class, new MockSwitchManager());
    fmc.addService(ILinkDiscoveryService.class, linkDiscovery);
    fmc.addService(IDebugCounterService.class, new MockDebugCounterService());
    fmc.addService(IDebugEventService.class, new MockDebugEventService());
    MockThreadPoolService tp = new MockThreadPoolService();
    topologyManager = new TopologyManager();
    fmc.addService(IThreadPoolService.class, tp);
    topologyManager.init(fmc);
    tp.init(fmc);
    tp.startUp(fmc);
}
项目:floodlight-hardware    文件:LoadBalancer.java   
@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;
}
项目:floodlight-hardware    文件:LoadBalancer.java   
@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>();
}
项目:open-kilda    文件:SwitchManager.java   
/**
 * {@inheritDoc}
 */
@Override
public Collection<Class<? extends IFloodlightService>> getModuleDependencies() {
    Collection<Class<? extends IFloodlightService>> services = new ArrayList<>(3);
    services.add(IFloodlightProviderService.class);
    services.add(IOFSwitchService.class);
    services.add(IRestApiService.class);
    return services;
}
项目:open-kilda    文件:SwitchManager.java   
/**
 * {@inheritDoc}
 */
@Override
public void init(FloodlightModuleContext context) throws FloodlightModuleException {
    floodlightProvider = context.getServiceImpl(IFloodlightProviderService.class);
    ofSwitchService = context.getServiceImpl(IOFSwitchService.class);
    restApiService = context.getServiceImpl(IRestApiService.class);
    kafkaProducer = context.getServiceImpl(KafkaMessageProducer.class);
    // TODO: Ensure Kafka Topics are created..
}
项目:open-kilda    文件:SwitchEventCollector.java   
/**
 * {@inheritDoc}
 */
@Override
public Collection<Class<? extends IFloodlightService>> getModuleDependencies() {
    Collection<Class<? extends IFloodlightService>> services = new ArrayList<>(3);
    services.add(IOFSwitchService.class);
    services.add(KafkaMessageProducer.class);
    services.add(ISwitchManager.class);
    return services;
}