|
15 | 15 | from .execute import log_fail, run |
16 | 16 |
|
17 | 17 | RXTXAPP_PATH = "./tests/tools/RxTxApp/build/RxTxApp" |
18 | | -json_filename = os.path.join(sys.path[0], "ip_addresses.json") |
19 | 18 | logger = logging.getLogger(__name__) |
20 | 19 |
|
21 | 20 |
|
@@ -57,29 +56,6 @@ def capture_stdout(proc, proc_name: str): |
57 | 56 | return "" |
58 | 57 |
|
59 | 58 |
|
60 | | -def read_ip_addresses_from_json(filename: str): |
61 | | - global unicast_ip_dict, multicast_ip_dict, kernel_ip_dict |
62 | | - try: |
63 | | - with open(filename, "r") as ips: |
64 | | - ip_addresses = json.load(ips) |
65 | | - try: |
66 | | - unicast_ip_dict = ip_addresses["unicast_ip_dict"] |
67 | | - multicast_ip_dict = ip_addresses["multicast_ip_dict"] |
68 | | - kernel_ip_dict = ip_addresses["kernel_ip_dict"] |
69 | | - except Exception: |
70 | | - logger.warning( |
71 | | - f"File {filename} does not contain proper input, check " |
72 | | - "ip_addresses.json.example for a schema. It might have " |
73 | | - "been loaded partially. Where not specified, " |
74 | | - "default was set." |
75 | | - ) |
76 | | - except Exception: |
77 | | - logger.warning( |
78 | | - f"File {filename} could not be loaded properly! " |
79 | | - "Default values are set for all IPs." |
80 | | - ) |
81 | | - |
82 | | - |
83 | 59 | def create_empty_config() -> dict: |
84 | 60 | return copy.deepcopy(rxtxapp_config.config_empty) |
85 | 61 |
|
@@ -1164,9 +1140,6 @@ def sanitize_filename(name: str) -> str: |
1164 | 1140 | return re.sub(r"[^A-Za-z0-9_.-]", "_", name) |
1165 | 1141 |
|
1166 | 1142 |
|
1167 | | -read_ip_addresses_from_json(json_filename) |
1168 | | - |
1169 | | - |
1170 | 1143 | def create_empty_dual_config() -> dict: |
1171 | 1144 | return { |
1172 | 1145 | "tx_config": copy.deepcopy(rxtxapp_config.config_empty_tx), |
|
0 commit comments