| 393 | |
| 394 | |
| 395 | def sn_copy_run_conf_to_each_container(container_id_list, sat_node_number, |
| 396 | fac_node_number, path): |
| 397 | print( |
| 398 | "Copy bird configuration file to each container and run routing process." |
| 399 | ) |
| 400 | total = len(container_id_list) |
| 401 | copy_threads = [] |
| 402 | for current in range(0, total): |
| 403 | copy_thread = threading.Thread( |
| 404 | target=sn_copy_run_conf, |
| 405 | args=(container_id_list[current], path + "/conf/bird-" + |
| 406 | str(sat_node_number) + "-" + str(fac_node_number), current, |
| 407 | total)) |
| 408 | copy_threads.append(copy_thread) |
| 409 | for copy_thread in copy_threads: |
| 410 | copy_thread.start() |
| 411 | for copy_thread in copy_threads: |
| 412 | copy_thread.join() |
| 413 | print("Initializing routing...") |
| 414 | sleep(120) |
| 415 | print("Routing initialized!") |
| 416 | |
| 417 | |
| 418 | def sn_damage_link(sat_index, container_id_list): |