Exemple #1
0
def launch(topo, ip, servers):
    """
    Launch Hedera Controller

    topo is in format toponame,arg1,arg2,...
    """
    # Boot up ARP Responder
    from proto.arp_responder import launch as arp_launch
    arp_launch(eat_packets=False, **{str(ip): True})
    import logging
    logging.getLogger("proto.arp_responder").setLevel(logging.WARN)

    # Instantiate a topo object from the passed-in file.
    if not topo:
        raise Exception("please specify topo and args on cmd line")
    else:
        t = buildTopo(topo, topos)
        r = getRouting('hashed', t)
        servers = servers.replace(",", " ").split()
        servers = [IPAddr(x) for x in servers]
        ip = IPAddr(ip)
    log.info("Load Balancer Ready.")
    core.registerNew(HederaController, t, r, IPAddr(ip), servers)

    log.info("Hedera running with topo=%s." % topo)
Exemple #2
0
def launch(topo=None, routing=None):
    if not topo:
        raise Exception("Please specify the topology")
    else:
        t = buildTopo(topo)
    r = getRouting(routing, t)

    core.registerNew(DCController, t, r)
    log.info("*** Controller is running")
Exemple #3
0
def launch(topo = None, routing = None, bw = None, ratio = None):
    if not topo:
        raise Exception ("Please specify the topology")
    else:
        t = buildTopo(topo)
    r = getRouting(routing, t)

    core.registerNew(DCController, t, r)
    log.info("*** Controller is running")
Exemple #4
0
def launch(topo=None, routing=None, mode=None):
    """
  Args in format toponame,arg1,arg2,...
  """
    if not mode:
        mode = DEF_MODE
    # Instantiate a topo object from the passed-in file.
    if not topo:
        raise Exception("please specify topo and args on cmd line")

    if not routing:
        t = buildTopo(topo, topos)
        r = getRouting(routing, t, {})

    else:
        t = buildTopo(topo, topos)
        routing, paths = routing.split(",", 2)
        r = getRouting(routing, t, paths)

    core.registerNew(RipLController, t, r, mode)

    log.info("RipL-POX running with topo=%s." % topo)
Exemple #5
0
def launch(topo=None, routing=None, bw=None):
    #print topo
    if not topo:
        raise Exception("Please specify the topology")
    else:
        t = buildTopo(topo)
    r = getRouting(routing, t)
    if bw == None:
        bw = 10.0  #Mb/s
        bw = float(bw / 1000)  #Gb/s
    else:
        bw = float(bw) / 1000
    core.registerNew(HController, t, r, bw)
    log.info("** HController is running")
Exemple #6
0
def launch(topo=None):

    if not topo:
        raise Exception("please specify topo and args on cmd line")
    else:
        t = buildTopo(topo, topos)

    core.registerNew(DHRController, t)

    # timer set to excute every ten seconds to get the feedback
    # from the routers.
    # Timer(10, _timer_func, recurring = True)

    log.info("DHR-POX running with topo=%s." % topo)
Exemple #7
0
def launch(topo=None, routing=None):
    """
  Args in format toponame,arg1,arg2,...
  """
    # Instantiate a topo object from the passed-in file.
    if not topo:
        raise Exception("please specify topo and args on cmd line")
    else:
        t = buildTopo(topo, topos)
        r = getRouting(routing, t)

    core.registerNew(RipLController, t, r)

    log.info("RipL-POX running with topo=%s." % topo)
Exemple #8
0
def launch(topo = None):

    if not topo:
        raise Exception("please specify topo and args on cmd line")
    else:
        t = buildTopo(topo,topos)

    core.registerNew(DHRController, t)

    # timer set to excute every ten seconds to get the feedback 
    # from the routers.
    # Timer(10, _timer_func, recurring = True)

    log.info("DHR-POX running with topo=%s." % topo)
def launch(topo = None, routing = None):
  """
  Args in format toponame,arg1,arg2,...
  """
  # Instantiate a topo object from the passed-in file.
  if not topo:
    raise Exception("please specify topo and args on cmd line")
  else:
    t = buildTopo(topo, topos)
    r = getRouting(routing, t)

  core.registerNew(RipLController, t, r)

  log.info("RipL-POX running with topo=%s." % topo)
Exemple #10
0
def launch(topo = None, routing = None, bw = None ):
    #print topo
    if not topo:
        raise Exception ("Please specify the topology")
    else: 
        t = buildTopo(topo)
    r = getRouting(routing, t)
    if bw == None:
        bw = 10.0 #Mb/s
        bw = float(bw/1000) #Gb/s
    else:
        bw = float(bw)/1000
    core.registerNew(HController, t, r, bw)
    log.info("** HController is running")
Exemple #11
0
def launch(topo=None):
    """
  Launch Hedera Controller

  topo is in format toponame,arg1,arg2,...
  """

    # Instantiate a topo object from the passed-in file.
    if not topo:
        raise Exception("please specify topo and args on cmd line")
    else:
        t = buildTopo(topo, topos)
        r = getRouting('hashed', t)

    core.registerNew(HederaController, t, r)

    log.info("Hedera running with topo=%s." % topo)
Exemple #12
0
def launch(topo = None):
  """
  Launch Hedera Controller

  topo is in format toponame,arg1,arg2,...
  """

  # Instantiate a topo object from the passed-in file.
  if not topo:
    raise Exception("please specify topo and args on cmd line")
  else:
    t = buildTopo(topo, topos)
    r = getRouting('hashed', t)

  core.registerNew(HederaController, t, r)

  log.info("Hedera running with topo=%s." % topo)
Exemple #13
0
def launch(topo=None, routing=None, bw=None):
    """
  Args in format toponame,arg1,arg2,...
  """
    # Instantiate a topo object from the passed-in file.
    if not topo:
        raise Exception("please specify topo and args on cmd line")
    else:
        t = buildTopo(topo, topos)
        r = getRouting(routing, t)
        if bw is None:
            bw = 0.0  # Default 10 Mbps link
        else:
            bw = float(bw)
        bwGbps = bw / 1000

    core.registerNew(RipLController, t, r, bwGbps)

    log.info("RipL-POX running with topo=%s." % topo)
Exemple #14
0
def launch(topo = None, routing = None, mode = None):
  """
  Args in format toponame,arg1,arg2,...
  """
  print("mininet_stuffs")

  if not mode:
    mode = DEF_MODE
  # Instantiate a topo object from the passed-in file.
  if not topo:
    raise Exception("please specify topo and args on cmd line")
  else:
    t = buildTopo(topo, topos)
    r = getRouting(routing, t)

  core.registerNew(RipLController, t, r, mode)

  lg.setLogLevel('info')
  log.info("RipL-POX running with topo=%s." % topo)
Exemple #15
0
def launch(topo = None, routing = None, mode = None):
  """
  Launch RipL-POX

  topo is in format toponame,arg1,arg2,...
  routing is a routing type (e.g., st, random, hashed)
  mode is a controller mode (e.g., proactive, reactive, hybrid)
  """
  if not mode:
    mode = DEF_MODE
  # Instantiate a topo object from the passed-in file.
  if not topo:
    raise Exception("please specify topo and args on cmd line")
  else:
    t = buildTopo(topo, topos)
    r = getRouting(routing, t)

  core.registerNew(RipLController, t, r, mode)

  log.info("RipL-POX running with topo=%s." % topo)
Exemple #16
0
def launch(topo=None, routing=None, mode=None):
    """
  Launch RipL-POX

  topo is in format toponame,arg1,arg2,...
  routing is a routing type (e.g., st, random, hashed)
  mode is a controller mode (e.g., proactive, reactive, hybrid)
  """
    if not mode:
        mode = DEF_MODE
    # Instantiate a topo object from the passed-in file.
    if not topo:
        raise Exception("please specify topo and args on cmd line")
    else:
        t = buildTopo(topo, topos)
        r = getRouting(routing, t)

    core.registerNew(RipLController, t, r, mode)

    log.info("RipL-POX running with topo=%s." % topo)