Skip to content

Commit 430bf1e

Browse files
committed
vdk-control-cli: upgrade python client
Signed-off-by: murphp15 <murphp15@tcd.ie>
1 parent b0fa3c6 commit 430bf1e

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

projects/vdk-control-cli/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,4 @@ tabulate
2727
urllib3>=1.26.5
2828
vdk-control-api-auth
2929

30-
vdk-control-service-api==1.0.9
30+
vdk-control-service-api==1.0.10

projects/vdk-control-cli/setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ install_requires =
5151
requests>=2.25
5252
setuptools>=47.0
5353
pluggy
54-
vdk-control-service-api==1.0.9
54+
vdk-control-service-api==1.0.10
5555
tabulate
5656
requests_oauthlib>=1.0
5757
urllib3>=1.26.5

projects/vdk-control-cli/src/vdk/internal/control/command_groups/job/download_job.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
import click
77
import click_spinner
8-
from urllib3 import HTTPResponse
8+
from taurus_datajob_api import ApiResponse
99
from vdk.internal.control.configuration.defaults_config import load_default_team_name
1010
from vdk.internal.control.exception.vdk_exception import VDKException
1111
from vdk.internal.control.job.job_archive import JobArchive
@@ -29,7 +29,7 @@ def download(self, team: str, name: str, path: str):
2929
try:
3030
log.info(f"Downloading data job {name} in {path}/{name} ...")
3131
with click_spinner.spinner():
32-
response: HTTPResponse = self.sources_api.data_job_sources_download(
32+
response = self.sources_api.data_job_sources_download_with_http_info(
3333
team_name=team, job_name=name, _preload_content=False
3434
)
3535
self.__write_response_to_archive(job_archive_path, response)
@@ -42,10 +42,10 @@ def download(self, team: str, name: str, path: str):
4242
self.__cleanup_archive(job_archive_path)
4343

4444
@staticmethod
45-
def __write_response_to_archive(job_archive_path: str, response: HTTPResponse):
45+
def __write_response_to_archive(job_archive_path: str, response: ApiResponse):
4646
log.debug(f"Write data job source to {job_archive_path}")
4747
with open(job_archive_path, "wb") as w:
48-
w.write(response.data)
48+
w.write(response.raw_data)
4949

5050
@staticmethod
5151
def __validate_job_path(path: str, name: str):

projects/vdk-control-cli/src/vdk/internal/control/command_groups/job/download_key.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ def __init__(self, rest_api_url: str):
2020
@ApiClientErrorDecorator()
2121
def download(self, team: str, name: str, path: str):
2222
keytab_file_path = os.path.join(path, f"{name}.keytab")
23-
response: HTTPResponse = self.jobs_api.data_job_keytab_download(
23+
response = self.jobs_api.data_job_keytab_download_with_http_info(
2424
team_name=team, job_name=name, _preload_content=False
2525
)
2626
with open(keytab_file_path, "wb") as w:
27-
w.write(response.data)
27+
w.write(response.raw_data)
2828
log.info(f"Saved keytab in {keytab_file_path}")
2929

3030

projects/vdk-control-cli/src/vdk/internal/control/command_groups/job/execute.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,12 +83,12 @@ def start(
8383
args=self.__validate_and_parse_args(arguments),
8484
)
8585
log.debug(f"Starting job with request {execution_request}")
86-
_, _, headers = self.__execution_api.data_job_execution_start_with_http_info(
86+
headers = self.__execution_api.data_job_execution_start_with_http_info(
8787
team_name=team,
8888
job_name=name,
8989
deployment_id="production", # TODO
9090
data_job_execution_request=execution_request,
91-
)
91+
).headers
9292
log.debug(f"Received headers: {headers}")
9393

9494
location = headers["Location"]

0 commit comments

Comments
 (0)