def get_worker_info(self): interfaces_list = list() for interface in self.__interfaces_list: iface_info = InterfaceInformation(interface.get_name(), interface.get_protocol(), interface.get_channels()[:], interface.get_channel(), interface.get_status(), interface.get_monitors()) interfaces_list.append(iface_info) return WorkerInformation(self.__mac, interfaces_list)
def get_interface(self, iface_name): for interface in self.__interfaces_list: if interface.get_name() == iface_name: return interface return None