add missing super().__init__()

- app/event_dumper
- controller/dispatcher
- controller/mac_to_network
- controller/mac_to_port
- app/simple_switch

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
This commit is contained in:
Isaku Yamahata 2012-04-04 18:37:44 +09:00 committed by FUJITA Tomonori
parent a7b72545a8
commit d486967bed
5 changed files with 6 additions and 0 deletions

View File

@ -32,6 +32,7 @@ gflags.DEFINE_multistring('dump_dispatcher', [],
class EventDumper(object):
def __init__(self, *_args, **_kwargs):
super(EventDumper, self).__init__()
# EventDispatcher can be created and cloned before us.
# So register it explicitly
for ev_q in dispatcher.EventQueue.all_instances():

View File

@ -36,6 +36,7 @@ LOG = logging.getLogger('ryu.app.simple_switch')
class SimpleSwitch(object):
def __init__(self, *_args, **_kwargs):
super(SimpleSwitch, self).__init__()
self.mac2port = mac_to_port.MacToPortTable()
@set_ev_cls(ofp_event.EventOFPPacketIn, MAIN_DISPATCHER)

View File

@ -43,6 +43,7 @@ class EventQueue(TrackInstances):
ev_q.queue(ev)
def __init__(self, name, dispatcher, aux=None):
super(EventQueue, self).__init__()
self.name = name
self._dispatcher = dispatcher.clone()
self.is_dispatching = False
@ -113,6 +114,7 @@ class EventQueue(TrackInstances):
class EventDispatcher(TrackInstances):
def __init__(self, name):
super(EventDispatcher, self).__init__()
self.parent = None
self.children = set()
self.name = name

View File

@ -24,6 +24,7 @@ LOG = logging.getLogger('ryu.controller.mac_to_network')
class MacToNetwork(object):
def __init__(self, nw):
super(MacToNetwork, self).__init__()
self.mac_to_net = {}
self.dpid = {}
self.nw = nw

View File

@ -24,6 +24,7 @@ class MacToPortTable(object):
"""MAC addr <-> (dpid, port name)"""
def __init__(self):
super(MacToPortTable, self).__init__()
self.mac_to_port = {}
def dpid_add(self, dpid):