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
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
def __init__(self, name, mymac, myip): Node.__init__(self, name, 1) self.mymac = MacAddress(mymac) self.myip = IpAddress(myip) self.arp_table = {}