(
damaged_satellite,
container_id_list,
sat_loss,
)
| 444 | |
| 445 | |
| 446 | def sn_recover_link( |
| 447 | damaged_satellite, |
| 448 | container_id_list, |
| 449 | sat_loss, |
| 450 | ): |
| 451 | with os.popen( |
| 452 | "docker exec -it " + str(container_id_list[damaged_satellite]) + |
| 453 | " ifconfig | sed 's/[ \t].*//;/^\(eth0\|\)\(lo\|\)$/d'") as f: |
| 454 | ifconfig_output = f.readlines() |
| 455 | for i in range(0, len(ifconfig_output), 2): |
| 456 | os.system("docker exec -d " + |
| 457 | str(container_id_list[damaged_satellite]) + |
| 458 | " tc qdisc change dev " + ifconfig_output[i][:-1] + |
| 459 | " root netem loss " + str(sat_loss) + "%") |
| 460 | print("docker exec -d " + |
| 461 | str(container_id_list[damaged_satellite]) + |
| 462 | " tc qdisc change dev " + ifconfig_output[i][:-1] + |
| 463 | " root netem loss " + str(sat_loss) + "%") |
| 464 | |
| 465 | |
| 466 | def sn_del_network(network_name): |
nothing calls this directly
no outgoing calls
no test coverage detected