| 670 | |
| 671 | |
| 672 | def sn_recover(damage_list, sat_loss, remote_ssh, remote_ftp, file_path, |
| 673 | configuration_file_path): |
| 674 | print("Recovering damaged links...\n") |
| 675 | cumulated_damage_list = damage_list |
| 676 | numpy.savetxt( |
| 677 | configuration_file_path + "/" + file_path + |
| 678 | '/mid_files/damage_list.txt', cumulated_damage_list) |
| 679 | remote_ftp.put(os.path.join(os.getcwd(), "starrynet/sn_orchestrater.py"), |
| 680 | file_path + "/sn_orchestrater.py") |
| 681 | remote_ftp.put( |
| 682 | configuration_file_path + "/" + file_path + |
| 683 | '/mid_files/damage_list.txt', file_path + "/damage_list.txt") |
| 684 | sn_remote_cmd( |
| 685 | remote_ssh, "python3 " + file_path + "/sn_orchestrater.py " + |
| 686 | file_path + " " + str(sat_loss)) |
| 687 | cumulated_damage_list.clear() |
| 688 | print("Link recover done.\n") |
| 689 | |
| 690 | |
| 691 | def sn_sr(src, des, target, container_id_list, remote_ssh): |