MCPcopy Create free account
hub / github.com/SpaceNetLab/StarryNet / cleanup

Function cleanup

starrynet/clean.py:10–24  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

8
9
10def cleanup():
11 print("Deleting all native bridges and containers...")
12 #os.system("FOR /f \"tokens=*\" %i IN ('docker ps -q') DO docker stop %i")
13 os.system("docker service rm constellation-test")
14 with os.popen(
15 "docker rm -f $(docker ps | grep \"lwsen/starlab_node:1.0\" | awk '{ print $1 }')"
16 ) as f:
17 f.readlines()
18 with os.popen("docker network ls") as f:
19 all_br_info = f.readlines()
20 for line in all_br_info:
21 if "La" in line or "Le" or "GS" in line:
22 network_name = line.split()[1]
23 print('docker network rm ' + network_name)
24 os.system('docker network rm ' + network_name)
25
26
27if __name__ == "__main__":

Callers 1

clean.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected