-
-
Notifications
You must be signed in to change notification settings - Fork 102
Expand file tree
/
Copy pathpull.py
More file actions
45 lines (37 loc) · 1.27 KB
/
pull.py
File metadata and controls
45 lines (37 loc) · 1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
import argparse
import os
import sys
from implementations import get_quic_implementations, get_webtransport_implementations
def get_args():
parser = argparse.ArgumentParser()
parser.add_argument(
"-p",
"--protocol",
default="quic",
help="quic / webtransport",
)
parser.add_argument("-i", "--implementations", help="implementations to pull")
return parser.parse_args()
args = get_args()
if args.protocol == "quic":
impls = get_quic_implementations()
elif args.protocol == "webtransport":
impls = get_webtransport_implementations()
else:
sys.exit("Unknown protocol: " + args.protocol)
implementations = {}
if args.implementations:
for s in args.implementations.split(","):
if s not in [n for n, _ in impls.items()]:
sys.exit("implementation " + s + " not found.")
implementations[s] = impls[s]
else:
implementations = impls
print("Pulling the simulator...")
os.system("docker pull martenseemann/quic-network-simulator")
if args.protocol == "quic":
print("\nPulling the iperf endpoint...")
os.system("docker pull martenseemann/quic-interop-iperf-endpoint")
for name, value in implementations.items():
print("\nPulling " + name + "...")
os.system("docker pull " + value["image"])