コード例 #1
0
 def __init__(self, component_class, name="ctrl", max_callbacks=0):
     Node.__init__(self, name, 0)
     ctxt = Context(self)
     self.component_object = component_class(ctxt=ctxt)
     self.connection_count = 0
     self.in_connections = {}
     self.callbacks = []
     self.start_callbacks = []
     self.max_callbacks = max_callbacks
コード例 #2
0
ファイル: nox_controller.py プロジェクト: mcanini/nice
 def __init__(self, component_class, name="ctrl", max_callbacks=0):
     Node.__init__(self, name, 0)
     ctxt = Context(self)
     self.component_object = component_class(ctxt=ctxt)
     self.connection_count = 0
     self.in_connections = {}
     self.callbacks = []
     self.start_callbacks = []
     self.max_callbacks = max_callbacks
コード例 #3
0
ファイル: of_switch.py プロジェクト: mcanini/nice
 def __init__(self, name, port_count, of_id, expire_entries=False):
     Node.__init__(self, name, port_count)
     self.log = logging.getLogger("nice.mc.%s" % self.name)
     self.flow_table_object = []
     self.openflow_id = of_id
     self.buffers = []
     self.next_buffer_id = 0
     self.packet_store = {}
     self.command_queue = []
     self.fault_injection_count = 0
     self.state_cnt = 0
     self.expire_entries = expire_entries
     self.ports_to_fail = []
     self.this_switch_is_offline = False
コード例 #4
0
 def __init__(self, name, port_count, of_id, expire_entries=False):
     Node.__init__(self, name, port_count)
     self.log = logging.getLogger("nice.mc.%s" % self.name)
     self.flow_table_object = []
     self.openflow_id = of_id
     self.buffers = []
     self.next_buffer_id = 0
     self.packet_store = {}
     self.command_queue = []
     self.fault_injection_count = 0
     self.state_cnt = 0
     self.expire_entries = expire_entries
     self.ports_to_fail = []
     self.this_switch_is_offline = False
コード例 #5
0
ファイル: host.py プロジェクト: mcanini/nice
 def __init__(self, name, mymac, myip):
     Node.__init__(self, name, 1)
     self.mymac = MacAddress(mymac)
     self.myip = IpAddress(myip)
     self.arp_table = {}
コード例 #6
0
ファイル: host.py プロジェクト: wxdublin/nice
 def __init__(self, name, mymac, myip):
     Node.__init__(self, name, 1)
     self.mymac = MacAddress(mymac)
     self.myip = IpAddress(myip)
     self.arp_table = {}