vswmc-cli 2.2.1.dev357__tar.gz → 2.2.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {vswmc_cli-2.2.1.dev357/vswmc_cli.egg-info → vswmc_cli-2.2.3}/PKG-INFO +1 -1
- {vswmc_cli-2.2.1.dev357 → vswmc_cli-2.2.3}/setup.py +1 -1
- {vswmc_cli-2.2.1.dev357 → vswmc_cli-2.2.3}/vswmc/cli/cp.py +1 -1
- {vswmc_cli-2.2.1.dev357 → vswmc_cli-2.2.3}/vswmc/cli/ls.py +3 -21
- {vswmc_cli-2.2.1.dev357 → vswmc_cli-2.2.3}/vswmc/cli/save.py +8 -7
- {vswmc_cli-2.2.1.dev357 → vswmc_cli-2.2.3}/vswmc/client.py +9 -9
- {vswmc_cli-2.2.1.dev357 → vswmc_cli-2.2.3/vswmc_cli.egg-info}/PKG-INFO +1 -1
- {vswmc_cli-2.2.1.dev357 → vswmc_cli-2.2.3}/LICENSE +0 -0
- {vswmc_cli-2.2.1.dev357 → vswmc_cli-2.2.3}/MANIFEST.in +0 -0
- {vswmc_cli-2.2.1.dev357 → vswmc_cli-2.2.3}/README.md +0 -0
- {vswmc_cli-2.2.1.dev357 → vswmc_cli-2.2.3}/pyproject.toml +0 -0
- {vswmc_cli-2.2.1.dev357 → vswmc_cli-2.2.3}/setup.cfg +0 -0
- {vswmc_cli-2.2.1.dev357 → vswmc_cli-2.2.3}/vswmc/__init__.py +0 -0
- {vswmc_cli-2.2.1.dev357 → vswmc_cli-2.2.3}/vswmc/cli/__init__.py +0 -0
- {vswmc_cli-2.2.1.dev357 → vswmc_cli-2.2.3}/vswmc/cli/__main__.py +0 -0
- {vswmc_cli-2.2.1.dev357 → vswmc_cli-2.2.3}/vswmc/cli/logs.py +0 -0
- {vswmc_cli-2.2.1.dev357 → vswmc_cli-2.2.3}/vswmc/cli/models.py +0 -0
- {vswmc_cli-2.2.1.dev357 → vswmc_cli-2.2.3}/vswmc/cli/products.py +0 -0
- {vswmc_cli-2.2.1.dev357 → vswmc_cli-2.2.3}/vswmc/cli/ps.py +0 -0
- {vswmc_cli-2.2.1.dev357 → vswmc_cli-2.2.3}/vswmc/cli/rm.py +0 -0
- {vswmc_cli-2.2.1.dev357 → vswmc_cli-2.2.3}/vswmc/cli/run.py +0 -0
- {vswmc_cli-2.2.1.dev357 → vswmc_cli-2.2.3}/vswmc/cli/simulations.py +0 -0
- {vswmc_cli-2.2.1.dev357 → vswmc_cli-2.2.3}/vswmc/cli/stop.py +0 -0
- {vswmc_cli-2.2.1.dev357 → vswmc_cli-2.2.3}/vswmc/cli/utils.py +0 -0
- {vswmc_cli-2.2.1.dev357 → vswmc_cli-2.2.3}/vswmc/core/__init__.py +0 -0
- {vswmc_cli-2.2.1.dev357 → vswmc_cli-2.2.3}/vswmc/core/auth.py +0 -0
- {vswmc_cli-2.2.1.dev357 → vswmc_cli-2.2.3}/vswmc/core/exceptions.py +0 -0
- {vswmc_cli-2.2.1.dev357 → vswmc_cli-2.2.3}/vswmc/core/helpers.py +0 -0
- {vswmc_cli-2.2.1.dev357 → vswmc_cli-2.2.3}/vswmc/sockjs.py +0 -0
- {vswmc_cli-2.2.1.dev357 → vswmc_cli-2.2.3}/vswmc_cli.egg-info/SOURCES.txt +0 -0
- {vswmc_cli-2.2.1.dev357 → vswmc_cli-2.2.3}/vswmc_cli.egg-info/dependency_links.txt +0 -0
- {vswmc_cli-2.2.1.dev357 → vswmc_cli-2.2.3}/vswmc_cli.egg-info/entry_points.txt +0 -0
- {vswmc_cli-2.2.1.dev357 → vswmc_cli-2.2.3}/vswmc_cli.egg-info/not-zip-safe +0 -0
- {vswmc_cli-2.2.1.dev357 → vswmc_cli-2.2.3}/vswmc_cli.egg-info/requires.txt +0 -0
- {vswmc_cli-2.2.1.dev357 → vswmc_cli-2.2.3}/vswmc_cli.egg-info/top_level.txt +0 -0
|
@@ -26,7 +26,7 @@ def do_cp(args):
|
|
|
26
26
|
def do_cp_new(args):
|
|
27
27
|
client = utils.create_client(args)
|
|
28
28
|
run, src_file = args.src.split(":")
|
|
29
|
-
content = client.
|
|
29
|
+
content = client.get_run_result_presign_content(run, src_file)
|
|
30
30
|
_, src_filename = os.path.split(src_file)
|
|
31
31
|
|
|
32
32
|
if os.path.isdir(args.dst):
|
|
@@ -5,27 +5,9 @@ from vswmc.cli import utils
|
|
|
5
5
|
|
|
6
6
|
def do_ls(args):
|
|
7
7
|
client = utils.create_client(args)
|
|
8
|
-
|
|
8
|
+
results = client.list_run_results(args.run)
|
|
9
9
|
rows = []
|
|
10
|
-
for result in
|
|
11
|
-
if args.l:
|
|
12
|
-
rows.append(
|
|
13
|
-
[
|
|
14
|
-
str(result["size"]),
|
|
15
|
-
result["updated"],
|
|
16
|
-
result["path"],
|
|
17
|
-
]
|
|
18
|
-
)
|
|
19
|
-
else:
|
|
20
|
-
rows.append([result["path"]])
|
|
21
|
-
utils.print_table(rows)
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
def do_ls_new(args):
|
|
25
|
-
client = utils.create_client(args)
|
|
26
|
-
outputs = client.list_run_outputs(args.run)
|
|
27
|
-
rows = []
|
|
28
|
-
for result in outputs:
|
|
10
|
+
for result in results:
|
|
29
11
|
if args.l:
|
|
30
12
|
rows.append(
|
|
31
13
|
[
|
|
@@ -39,6 +21,6 @@ def do_ls_new(args):
|
|
|
39
21
|
|
|
40
22
|
|
|
41
23
|
def configure_parser(parser):
|
|
42
|
-
parser.set_defaults(func=
|
|
24
|
+
parser.set_defaults(func=do_ls)
|
|
43
25
|
parser.add_argument("run", metavar="RUN", help="The run to query")
|
|
44
26
|
parser.add_argument("-l", action="store_true", help="Print long listing")
|
|
@@ -17,14 +17,15 @@ def do_save(args):
|
|
|
17
17
|
|
|
18
18
|
def do_save_new(args):
|
|
19
19
|
client = utils.create_client(args)
|
|
20
|
-
|
|
21
|
-
if not
|
|
22
|
-
print("No
|
|
20
|
+
results = client.list_run_results(args.run)
|
|
21
|
+
if not results:
|
|
22
|
+
print("No results available for run {}".format(args.run))
|
|
23
23
|
return
|
|
24
|
-
os.
|
|
25
|
-
for
|
|
26
|
-
content = client.
|
|
27
|
-
target_file = os.path.join(args.run,
|
|
24
|
+
os.makedirs(args.run, exist_ok=True)
|
|
25
|
+
for result in results:
|
|
26
|
+
content = client.get_run_result_presign_content(args.run, result["path"])
|
|
27
|
+
target_file = os.path.join(args.run, result["path"])
|
|
28
|
+
os.makedirs(os.path.dirname(target_file), exist_ok=True)
|
|
28
29
|
print("Saving {}".format(target_file))
|
|
29
30
|
with open(target_file, "wb") as f:
|
|
30
31
|
f.write(content)
|
|
@@ -97,20 +97,20 @@ class VswmcClient(object):
|
|
|
97
97
|
path = "{}/runs/{}".format(self.api_root, run)
|
|
98
98
|
return self._request("get", path=path).json()
|
|
99
99
|
|
|
100
|
-
def
|
|
101
|
-
path = "{}/runs/{}/
|
|
100
|
+
def list_run_results(self, run):
|
|
101
|
+
path = "{}/runs/{}/results".format(self.api_root, run)
|
|
102
102
|
return self._request("get", path=path).json()
|
|
103
103
|
|
|
104
|
-
def
|
|
105
|
-
path = "{}/runs/{}/
|
|
104
|
+
def get_run_result(self, run, name):
|
|
105
|
+
path = "{}/runs/{}/results/{}".format(self.api_root, run, name)
|
|
106
106
|
return self._request("get", path=path).content
|
|
107
107
|
|
|
108
|
-
def
|
|
109
|
-
path = "{}/runs/{}/
|
|
108
|
+
def get_run_result_presign_url(self, run, name):
|
|
109
|
+
path = "{}/runs/{}/results/{}/presign".format(self.api_root, run, name)
|
|
110
110
|
return self._request("get", path=path).json()
|
|
111
111
|
|
|
112
|
-
def
|
|
113
|
-
presign = self.
|
|
112
|
+
def get_run_result_presign_content(self, run, name):
|
|
113
|
+
presign = self.get_run_result_presign_url(run, name)
|
|
114
114
|
return requests.get(url=presign["url"]).content
|
|
115
115
|
|
|
116
116
|
def download_logs(self, run):
|
|
@@ -122,7 +122,7 @@ class VswmcClient(object):
|
|
|
122
122
|
return self._request("get", path=path).content
|
|
123
123
|
|
|
124
124
|
def download_results(self, run):
|
|
125
|
-
path = "{}/runs/{}/results".format(self.api_root, run)
|
|
125
|
+
path = "{}/runs/{}/results/archive".format(self.api_root, run)
|
|
126
126
|
return self._request("get", path=path).content
|
|
127
127
|
|
|
128
128
|
def follow_logs(self, run, on_data):
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|