def setUpClass(cls): # Check and clean up wpantund process if any left over process_cleanup.ps_cleanup() cls.hardware_select() cls.add_test_device(cls.scanner) for leader_node in cls.leader_list: cls.add_test_device(leader_node) for device in cls.device_list: device.set_logger(cls.logger) device.set_up() total_networks = len(cls.device_list) cls.network_data_list = [] for _ in range(total_networks): cls.network_data_list.append( WpanCredentials( network_name="SILK-{0:04X}".format( random.randint(0, 0xffff)), psk="00112233445566778899aabbccdd{0:04x}".format( random.randint(0, 0xffff)), channel=random.randint(11, 25), fabric_id="{0:06x}dead".format(random.randint(0, 0xffffff)))) cls.thread_sniffer_init(cls.network_data_list[0].channel)
def setUpClass(cls): # Check and clean up wpantund process if any left over process_cleanup.ps_cleanup() cls.hardware_select() for device in cls.all_nodes: device.set_logger(cls.logger) cls.add_test_device(device) device.set_up() cls.network_data = WpanCredentials(network_name="SILK-{0:04X}".format(random.randint(0, 0xffff)), psk="00112233445566778899aabbccdd{0:04x}".format(random.randint(0, 0xffff)), channel=random.randint(11, 25), fabric_id="{0:06x}dead".format(random.randint(0, 0xffffff))) cls.thread_sniffer_init(cls.network_data.channel)