-
-
Notifications
You must be signed in to change notification settings - Fork 82
/
pull.py
31 lines (23 loc) · 909 Bytes
/
pull.py
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
import argparse
import os
import sys
from implementations import IMPLEMENTATIONS
print("Pulling the simulator...")
os.system("docker pull martenseemann/quic-network-simulator")
print("\nPulling the iperf endpoint...")
os.system("docker pull martenseemann/quic-interop-iperf-endpoint")
def get_args():
parser = argparse.ArgumentParser()
parser.add_argument("-i", "--implementations", help="implementations to pull")
return parser.parse_args()
implementations = {}
if get_args().implementations:
for s in get_args().implementations.split(","):
if s not in [n for n, _ in IMPLEMENTATIONS.items()]:
sys.exit("implementation " + s + " not found.")
implementations[s] = IMPLEMENTATIONS[s]
else:
implementations = IMPLEMENTATIONS
for name, value in implementations.items():
print("\nPulling " + name + "...")
os.system("docker pull " + value["image"])