def __init__(self, svr, instance, instance_com): self.server = svr self.instance = instance self.instance_com = instance_com self.iroutes = {} self.iroutes_thread = {} self.iroutes_lock = threading.RLock() self.iroutes_index = collections.defaultdict(set) self.call_queue = callqueue.CallQueue(self.instance.is_sock_interrupt, 512) self.clients_call_queue = callqueue.CallQueue( self.instance.is_sock_interrupt) self.obj_cache = objcache.ObjCache() self.client_routes = set() self.clients = docdb.DocDb( 'user_id', 'mac_addr', 'virt_address', ) self.clients_queue = collections.deque() self.ip_pool = [] self.ip_network = ipaddress.IPv4Network(self.server.network) for ip_addr in self.ip_network.iterhosts(): self.ip_pool.append(ip_addr)
def __init__(self, server, instance, instance_com): self.server = server self.instance = instance self.instance_com = instance_com self.clients = docdb.DocDb( 'user_id', 'device_id', 'virt_address', ) self.clients_queue = collections.deque() self.ip_pool = [] self.ip_network = ipaddress.IPv4Network(self.server.network) for ip_addr in self.ip_network.iterhosts(): self.ip_pool.append(ip_addr)