def launch(): if "openflow_discovery" not in core.components: import pox.openflow.discovery as discovery core.registerNew(discovery.Discovery) core.registerNew(l2_multi)
def launch (timeout=ARP_TIMEOUT, no_flow=False, eat_packets=True, no_learn=False, **kw): global ARP_TIMEOUT, _install_flow, _eat_packets, _learn ARP_TIMEOUT = timeout _install_flow = not no_flow _eat_packets = str_to_bool(eat_packets) _learn = not no_learn core.Interactive.variables['arp'] = _arp_table #Static ARP entries for avoiding ARP query in network with loops _arp_table[IPAddr("10.0.0.255")] = Entry("00:00:00:00:00:00", static=True) #for dts _arp_table[IPAddr("10.0.0.1")] = Entry("00:00:00:01:00:01", static=True) #for p _arp_table[IPAddr("10.0.0.2")] = Entry("00:00:00:01:00:02", static=True) #for c _arp_table[IPAddr("10.0.0.111")] = Entry("00:00:00:00:11:01", static=True) #for d _arp_table[IPAddr("10.0.0.11")] = Entry("00:00:00:00:01:01", static=True) #for t11 _arp_table[IPAddr("10.0.0.12")] = Entry("00:00:00:00:01:02", static=True) #for t12 _arp_table[IPAddr("10.0.0.13")] = Entry("00:00:00:00:01:03", static=True) #for t13 _arp_table[IPAddr("10.0.0.21")] = Entry("00:00:00:00:02:01", static=True) #for t21 _arp_table[IPAddr("10.0.0.22")] = Entry("00:00:00:00:02:02", static=True) #for t22 _arp_table[IPAddr("10.0.0.23")] = Entry("00:00:00:00:02:03", static=True) #for t23 _arp_table[IPAddr("10.0.0.31")] = Entry("00:00:00:00:03:01", static=True) #for t31 _arp_table[IPAddr("10.0.0.32")] = Entry("00:00:00:00:03:02", static=True) #for t32 _arp_table[IPAddr("10.0.0.33")] = Entry("00:00:00:00:03:03", static=True) #for t33 _arp_table[IPAddr("10.0.0.41")] = Entry("00:00:00:00:04:01", static=True) #for t41 _arp_table[IPAddr("10.0.0.42")] = Entry("00:00:00:00:04:02", static=True) #for t42 _arp_table[IPAddr("10.0.0.43")] = Entry("00:00:00:00:04:03", static=True) #for t43 # for k,v in kw.iteritems(): _arp_table[IPAddr(k)] = Entry(v, static=True) core.registerNew(ARPResponder)
def launch(): import boot core.registerNew(Tk) boot.set_main_function(core.tk.run) """
def launch (proactive_install=True, deneme_flow=False): global _install_schrules_proactively, _install_deneme_flow _install_schrules_proactively = str_to_bool(proactive_install) _install_deneme_flow = str_to_bool(deneme_flow) # core.registerNew(Actuator)
def start_launch (): core.registerNew(l2_multi) core.openflow.addListenerByName("SwitchDescReceived", handle_switch_desc) core.openflow.addListenerByName("QueueStatsReceived", handle_QueueStatsReceived) print "Proto-x" log.debug("Latency monitor running") GetTopologyParams()
def launch(no_flow=False, explicit_drop=True, link_timeout=None): explicit_drop = str_to_bool(explicit_drop) install_flow = not str_to_bool(no_flow) if link_timeout: link_timeout = int(link_timeout) core.registerNew(Discovery, explicit_drop=explicit_drop, install_flow=install_flow, link_timeout=link_timeout)
def launch(): # Run spanning tree so that we can deal with topologies with loops pox.openflow.discovery.launch() pox.openflow.spanning_tree.launch() # ''' Starting the Video Slicing module ''' core.registerNew(FiveLayer)
def launch (transparent=False, hold_down=_flood_delay, rule = "cs589.firewall"): """ Starts an L2 switch. """ try: global _flood_delay _flood_delay = int(str(hold_down), 10) assert _flood_delay >= 0 except: raise RuntimeError("Expected hold-down to be a number") #import pdb; pdb.set_trace() # Check the firewall file exists locally and not empty log.info("*** Firewall file : %s", (rule)) if os.path.isfile(rule) == False: #log.debug("*** Firewall file %s not found!",(rule)) raise RuntimeError(" Firewall rules %s not found!" % (rule)) else: if os.stat(rule).st_size == 0: #raise RuntimeError(" Firewall rules %s empty!" % (rule)) log.info("*** Warning: empty firewall rules!") log.info("*** Firewall file: %s found!" % (rule)) # LID: Register l2_learning class with the core core.registerNew(l2_learning, str_to_bool(transparent), rule)
def launch(topo=None): if not topo: raise Exception("please specify topo and args on cmd line") log.info("Shortest Path running with topo=%s." % topo) topo = buildTopo(topo, topos) core.registerNew(Updates, topo)
def launch (default_arbiter=True): from pox.core import core if core.hasComponent("openflow"): return if default_arbiter: core.registerNew(OpenFlowConnectionArbiter) # register a class core.register("openflow", OpenFlowNexus()) # register an instance of class 'OpenFlowNexus' as 'openflow'
def launch (): ''' Starting the Firewall module ''' pox.openflow.discovery.launch() pox.openflow.spanning_tree.launch() core.registerNew(Firewall)
def launch (): core.registerNew(l2_multi) timeout = min(max(PATH_SETUP_TIME, 5) * 2, 15) Timer(timeout, WaitingPath.expire_waiting_paths, recurring=True) pox.openflow.discovery.launch()
def launch(): core.registerNew(ScnTopology) from scn.scnOFTopology import launch launch()
def launch(objective=default_objective, preinstall="{}"): try: p = eval(preinstall) # HORRIBLE HORRIBLE except TypeError: pass core.registerNew(Multicommodity, objective=objective, preinstall=p)
def launch(): log.debug("Registering CCNxPlugin") core.registerNew(CCNxPlugin) log.debug("Registered CCNxPlugin")
def launch (): core.registerNew(flow_stats) # attach handsers to listners core.openflow.addListenerByName("FlowStatsReceived", _handle_flowstats_received) core.openflow.addListenerByName("PortStatsReceived", _handle_portstats_received)
def launch (default_arbiter=True): from pox.core import core if core.hasComponent("openflow"): return if default_arbiter: core.registerNew(OpenFlowConnectionArbiter) core.register("openflow", OpenFlowNexus())
def launch (): """ Starts an L2 learning switch. """ import dumb_l2_switch from pox.core import core core.registerNew(dumb_l2_switch.dumb_l2_switch)
def launch (): core.registerNew(sdn_firewall) #core.openflow.addListenerByName("PacketIn", _handle_PacketIn) #core.openflow.addListenerByName("ConnectionUp", _handle_ConnectionUp) log.info("FireWall component is running!") log.info("Waiting for OpenVSwitch connection up event...") #cli = sdn_firewall() core.Interactive.variables['cli'] = core.sdn_firewall
def launch(): """ Args in format toponame,arg1,arg2,... """ core.registerNew(DCellController) log.info("DCell running")
def launch (): from pox.lib.recoco import Timer core.openflow.addListenerByName("FlowStatsReceived", _handle_flowstats_received) core.openflow.addListenerByName("PortStatsReceived", _handle_portstats_received) Timer(5, _timer_func, recurring=True) core.registerNew(Test)
def launch(): import pox.messenger.messenger as messenger # TODO: don't assume localhost:7790 for emulation messenger.launch() from pox.core import core core.registerNew(NomServer)
def launch (): """ Main Function to Lanuch The Module """ core.registerNew(StatisticsMonitor) Timer(5, timer_function, recurring=True)
def launch(): #clear some unimportant message core.getLogger("packet").setLevel(logging.ERROR) core.registerNew(Discovery,explicit_drop=False,install_flow = False) core.registerNew(Link_Learning) #update flow Timer(120,Install_All_Flow,recurring=True,args=["All Path------------------"])
def launch (convert_packet_in = False): _init_handler() _init_unpacker() core.registerNew(NX) if convert_packet_in: core.NX.convert_packet_in = True
def launch (): #Timer(50, prune_tainted_list, recurring = True) Timer(.5, taint_msg_listener, recurring = False) import pox.openflow.discovery pox.openflow.discovery.launch() import pox.openflow.spanning_tree pox.openflow.spanning_tree.launch() core.registerNew(Launcher)
def launch(objective=None, preinstall="{}"): discovery.launch() spanning_tree.launch(no_flood=True, hold_down=True) statistics.launch() topology.launch() multicommodity.launch(objective=objective, preinstall=preinstall) core.registerNew(Controller)
def launch (fakeways="", arp_for_unknowns=None): fakeways = fakeways.replace(","," ").split() fakeways = [IPAddr(x) for x in fakeways] if arp_for_unknowns is None: arp_for_unknowns = len(fakeways) > 0 else: arp_for_unknowns = str_to_bool(arp_for_unknowns) core.registerNew(l3_switch, fakeways, arp_for_unknowns)
def launch(ip_prefix): """ Register the component to core """ color.launch() log.launch(format="%(asctime)s - %(name)s - %(levelname)s - " "%(threadName)s - %(message)s") core.registerNew(Inception, ip_prefix) LOGGER.info("InceptionArp is started...")
def launch(): # Run spanning tree so that we can deal with topologies with loops pox.openflow.discovery.launch() pox.openflow.spanning_tree.launch() ''' Starting the Dionysus current rules module ''' core.registerNew(DTTargetRules)
def launch(): print("launch topo") core.registerNew(topo)
def launch(transparent=False): """ Starts an L2 learning switch. """ core.registerNew(l2_learning, str_to_bool(transparent))
def launch(): core.registerNew(Firewall)
def launch(): ''' Starting the Firewall module ''' core.registerNew(Firewall)
def launch(): core.registerNew(l2_multi) timeout = min(max(PATH_SETUP_TIME, 5) * 2, 15) Timer(timeout, WaitingPath.expire_waiting_paths, recurring=True)
def launch(): """ Starts an L2 learning switch. """ core.registerNew(CentralComponent)
def launch(): log.debug("Started") core.registerNew(controller)
def launch(): core.registerNew(flow_modify) core.openflow.addListenerByName("BarrierIn", _handle_BarrierIn)
def launch(): core.registerNew(SchController)
def launch(prepop=1, bcount=1, bps=1, bpn=1, nwb=1): """ 'prepop' is the number of rules with which a switch table should be prepopulated. 'bcount' is the number of batches of rule updates to be applied, each batch having one rule deletion and one rule addition. 'bps' is number of batches to be generated per second. 'bpn' is base port number - in order to keep rules unique, the destination port number is incremented for each rule added. 'nwb' is a flag to direct us to not wait for barrier replies to come back before sending the next batch. Call this component as, e.g.: ./pox.py flowmodgen --prepop=300 --bcount=500 --bps=50 --bpn=44000 --nwb=1 """ # Arguments passed from the commandline are ordinarily string type, # so we need to validate and convert to integer. try: global _prepop _prepop = int(str(prepop), 10) assert _prepop >= 0 except: raise RuntimeError("Expected prepop to be a number") try: global _bcount _bcount = int(str(bcount), 10) assert _bcount >= 0 except: raise RuntimeError("Expected bcount to be a number") try: global _bps _bps = int(str(bps), 10) assert _bps >= 0 except: raise RuntimeError("Expected bps to be a number") try: global _bpn _bpn = int(str(bpn), 10) assert _bpn >= 0 except: raise RuntimeError("Expected bps to be a number") try: global _nwb _nwb = int(str(nwb), 10) assert _nwb >= 0 except: raise RuntimeError("Expected nwb to be a number") global _num_switches _num_switches = 0 global _outfile filename = "fmgresults-" + time.strftime("%Y-%m-%d-%H%M%S" + ".txt") _outfile = open(filename, 'w') _outfile.write('Parameters:\nprepop\tbcount\tbps\tbpn\tnwb\n') _outfile.write('{}\t{}\t{}\t{}\t{}\n\n'.format(_prepop, _bcount, _bps, _bpn, _nwb)) _outfile.write('Time\tXid\tSent/Received\n') core.registerNew(SendFlowMods) core.registerNew(SwitchHandler)
def launch(): core.registerNew(PortSecurity)
def launch(): core.registerNew(gui_to_pofmanager)
def launch (): core.registerNew(MyComponent, "spam") core.MyComponent.foo() core.MyComponent.ip()
def launch(): core.registerNew(controller_picker)
def launch(debug=False): core.registerNew(topo_addressing) from misc.arp_helper import launch launch(eat_packets=False) if not debug: core.getLogger("misc.arp_helper").setLevel(99)
def launch (): core.registerNew(cbench)
def launch(): core.registerNew(SelfLearingMethods)
def launch(): #clear some unimportant message core.getLogger("packet").setLevel(logging.ERROR) core.registerNew(Discovery, explicit_drop=False, install_flow=False) core.registerNew(Link_Learning)
def launch(): # 注册Monitoring组件 core.registerNew(Monitoring)
def launch(): ''' Starting the Dijkstra module ''' core.registerNew(Dijkstra)
def launch(): core.registerNew(Test)
def launch(): log.debug("Starting the controller") core.registerNew(Controller)
def launch(ip, servers): log.info("Loading Simple Load Balancer module") server_ips = servers.replace(",", " ").split() server_ips = [IPAddr(x) for x in server_ips] service_ip = IPAddr(ip) core.registerNew(SimpleLoadBalancer, service_ip, server_ips)
def launch(mode=None): core.registerNew(SpanningForest, mode=mode)
def launch(): core.registerNew(router)
def launch(): core.registerNew(eventPublisher)
def launch(): core.registerNew(l2_multi) timeout = min(max(PATH_SETUP_TIME, 5) * 2, 15) Timer(timeout, WaitingPath.expire_waiting_paths, recurring=True) thread.start_new_thread(generate_channel, ()) ###get channel thread
def launch (): core.registerNew(FlowTable)
def launch(): core.registerNew(PofManager)
def launch(a=None): a = str_to_bool(a) core.registerNew(router, a)