| 869 | |
| 870 | |
| 871 | def sn_del_link(first_index, second_index, container_id_list, remote_ssh): |
| 872 | sn_remote_cmd( |
| 873 | remote_ssh, "docker exec -d " + |
| 874 | str(container_id_list[second_index - 1]) + " ip link set dev B" + |
| 875 | str(second_index) + "-eth" + str(first_index) + " down") |
| 876 | sn_remote_cmd( |
| 877 | remote_ssh, "docker exec -d " + |
| 878 | str(container_id_list[first_index - 1]) + " ip link set dev B" + |
| 879 | str(first_index) + "-eth" + str(second_index) + " down") |
| 880 | GSL_name = "GSL_" + str(first_index) + "-" + str(second_index) |
| 881 | sn_remote_cmd( |
| 882 | remote_ssh, 'docker network disconnect ' + GSL_name + " " + |
| 883 | str(container_id_list[first_index - 1])) |
| 884 | sn_remote_cmd( |
| 885 | remote_ssh, 'docker network disconnect ' + GSL_name + " " + |
| 886 | str(container_id_list[second_index - 1])) |
| 887 | sn_remote_cmd(remote_ssh, 'docker network rm ' + GSL_name) |
| 888 | |
| 889 | |
| 890 | # A thread designed for stopping the emulation. |