Exemplo n.º 1
0
  @Override
  public void init(FloodlightModuleContext context) throws FloodlightModuleException {
    logger = LoggerFactory.getLogger(FailureDiscovery.class);
    topologyService = context.getServiceImpl(ITopologyService.class);
    this.massivefailurerecoveryservice =
        context.getServiceImpl(IMassiveFailureRecoveryService.class);

    // We create this here because there is no ordering guarantee
    failureDiscoveryListeners = new ArrayList<IFailureDiscoveryListener>();
  }
Exemplo n.º 2
0
 @Override
 public void init(FloodlightModuleContext context) throws FloodlightModuleException {
   // 模块初始化自身内容
   restApi = context.getServiceImpl(IRestApiService.class);
   floodlightProvider = context.getServiceImpl(IFloodlightProviderService.class);
   deviceService = context.getServiceImpl(IDeviceService.class);
   linkService = context.getServiceImpl(ILinkDiscoveryService.class);
   topologyService = context.getServiceImpl(ITopologyService.class);
   logger = LoggerFactory.getLogger(DebugModule.class);
 }
Exemplo n.º 3
0
  @Override
  public void init(FloodlightModuleContext context) throws FloodlightModuleException {
    floodlightProvider = context.getServiceImpl(IFloodlightProviderService.class);
    topologyservice = context.getServiceImpl(ITopologyService.class);

    log = LoggerFactory.getLogger(VideoFilter.class);
    messageDamper =
        new OFMessageDamper(
            OFMESSAGE_DAMPER_CAPACITY, EnumSet.of(OFType.FLOW_MOD), OFMESSAGE_DAMPER_TIMEOUT);
    topology = context.getServiceImpl(ITopologyService.class);
    counterStore = context.getServiceImpl(ICounterStoreService.class);
  }
  /** Loads dependencies and initializes data structures. */
  @Override
  public void init(FloodlightModuleContext context) throws FloodlightModuleException {
    log.info(String.format("Initializing %s...", MODULE_NAME));
    Map<String, String> config = context.getConfigParams(this);
    table = Byte.parseByte(config.get("table"));

    this.floodlightProv = context.getServiceImpl(IFloodlightProviderService.class);
    this.linkDiscProv = context.getServiceImpl(ILinkDiscoveryService.class);
    this.deviceProv = context.getServiceImpl(IDeviceService.class);

    this.knownHosts = new ConcurrentHashMap<IDevice, Host>();
  }
  @Override
  public void init(FloodlightModuleContext context) throws FloodlightModuleException {
    linkDiscovery = context.getServiceImpl(ILinkDiscoveryService.class);
    threadPool = context.getServiceImpl(IThreadPoolService.class);
    floodlightProvider = context.getServiceImpl(IFloodlightProviderService.class);
    restApi = context.getServiceImpl(IRestApiService.class);

    switchPorts = new HashMap<Long, Set<Short>>();
    switchPortLinks = new HashMap<NodePortTuple, Set<Link>>();
    directLinks = new HashMap<NodePortTuple, Set<Link>>();
    portBroadcastDomainLinks = new HashMap<NodePortTuple, Set<Link>>();
    tunnelLinks = new HashMap<NodePortTuple, Set<Link>>();
    topologyAware = new ArrayList<ITopologyListener>();
    ldUpdates = new LinkedBlockingQueue<LDUpdate>();
    appliedUpdates = new ArrayList<LDUpdate>();
    clearCurrentTopology();
  }
Exemplo n.º 6
0
  @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);

    // read our config options
    Map<String, String> configOptions = context.getConfigParams(this);
    try {
      String idleTimeout = configOptions.get("idletimeout");
      if (idleTimeout != null) {
        FLOWMOD_DEFAULT_IDLE_TIMEOUT = Short.parseShort(idleTimeout);
      }
    } catch (NumberFormatException e) {
      log.warn(
          "Error parsing flow idle timeout, " + "using default of {} seconds",
          FLOWMOD_DEFAULT_IDLE_TIMEOUT);
    }
    try {
      String hardTimeout = configOptions.get("hardtimeout");
      if (hardTimeout != null) {
        FLOWMOD_DEFAULT_HARD_TIMEOUT = Short.parseShort(hardTimeout);
      }
    } catch (NumberFormatException e) {
      log.warn(
          "Error parsing flow hard timeout, " + "using default of {} seconds",
          FLOWMOD_DEFAULT_HARD_TIMEOUT);
    }
    log.debug("FlowMod idle timeout set to {} seconds", FLOWMOD_DEFAULT_IDLE_TIMEOUT);
    log.debug("FlowMod hard timeout set to {} seconds", FLOWMOD_DEFAULT_HARD_TIMEOUT);
  }
Exemplo n.º 7
0
 @Override
 public void init(FloodlightModuleContext context) throws FloodlightModuleException {
   floodlightProvider = context.getServiceImpl(IFloodlightProviderService.class);
   restApi = context.getServiceImpl(IRestApiService.class);
 }
 @Override
 public void init(FloodlightModuleContext context) throws FloodlightModuleException {
   floodlightProvider = context.getServiceImpl(IFloodlightProviderService.class);
   log = LoggerFactory.getLogger(DHCPServer.class);
   sfp = context.getServiceImpl(IStaticFlowEntryPusherService.class);
 }