Skip to content

Commit aa1d5c5

Browse files
committed
update names
1 parent 5e0b299 commit aa1d5c5

8 files changed

Lines changed: 32 additions & 26 deletions

File tree

sdk/batch/azure-batch/apiview-properties.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -277,8 +277,8 @@
277277
"azure.batch.aio.BatchClient.reactivate_task": "Client.BatchClient.reactivateTask",
278278
"azure.batch.BatchClient.delete_task_file": "Client.BatchClient.deleteTaskFile",
279279
"azure.batch.aio.BatchClient.delete_task_file": "Client.BatchClient.deleteTaskFile",
280-
"azure.batch.BatchClient.get_task_file": "Client.BatchClient.getTaskFile",
281-
"azure.batch.aio.BatchClient.get_task_file": "Client.BatchClient.getTaskFile",
280+
"azure.batch.BatchClient.download_task_file": "Client.BatchClient.getTaskFile",
281+
"azure.batch.aio.BatchClient.download_task_file": "Client.BatchClient.getTaskFile",
282282
"azure.batch.BatchClient.list_task_files": "Client.BatchClient.listTaskFiles",
283283
"azure.batch.aio.BatchClient.list_task_files": "Client.BatchClient.listTaskFiles",
284284
"azure.batch.BatchClient.create_node_user": "Client.BatchClient.createNodeUser",
@@ -305,8 +305,8 @@
305305
"azure.batch.aio.BatchClient.list_node_extensions": "Client.BatchClient.listNodeExtensions",
306306
"azure.batch.BatchClient.delete_node_file": "Client.BatchClient.deleteNodeFile",
307307
"azure.batch.aio.BatchClient.delete_node_file": "Client.BatchClient.deleteNodeFile",
308-
"azure.batch.BatchClient.get_node_file": "Client.BatchClient.getNodeFile",
309-
"azure.batch.aio.BatchClient.get_node_file": "Client.BatchClient.getNodeFile",
308+
"azure.batch.BatchClient.download_node_file": "Client.BatchClient.getNodeFile",
309+
"azure.batch.aio.BatchClient.download_node_file": "Client.BatchClient.getNodeFile",
310310
"azure.batch.BatchClient.list_node_files": "Client.BatchClient.listNodeFiles",
311311
"azure.batch.aio.BatchClient.list_node_files": "Client.BatchClient.listNodeFiles"
312312
}

sdk/batch/azure-batch/azure/batch/_model_base.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -821,16 +821,22 @@ def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-retur
821821

822822
# is it optional?
823823
try:
824-
if any(a for a in annotation.__args__ if a == type(None)): # pyright: ignore # pylint: disable=unidiomatic-typecheck
824+
if any(
825+
a for a in annotation.__args__ if a == type(None)
826+
): # pyright: ignore # pylint: disable=unidiomatic-typecheck
825827
if len(annotation.__args__) <= 2: # pyright: ignore
826828
if_obj_deserializer = _get_deserialize_callable_from_annotation(
827-
next(a for a in annotation.__args__ if a != type(None)), module, rf # pyright: ignore # pylint: disable=unidiomatic-typecheck
829+
next(a for a in annotation.__args__ if a != type(None)),
830+
module,
831+
rf, # pyright: ignore # pylint: disable=unidiomatic-typecheck
828832
)
829833

830834
return functools.partial(_deserialize_with_optional, if_obj_deserializer)
831835
# the type is Optional[Union[...]], we need to remove the None type from the Union
832836
annotation_copy = copy.copy(annotation)
833-
annotation_copy.__args__ = [a for a in annotation_copy.__args__ if a != type(None)] # pyright: ignore # pylint: disable=unidiomatic-typecheck
837+
annotation_copy.__args__ = [
838+
a for a in annotation_copy.__args__ if a != type(None)
839+
] # pyright: ignore # pylint: disable=unidiomatic-typecheck
834840
return _get_deserialize_callable_from_annotation(annotation_copy, module, rf)
835841
except AttributeError:
836842
pass

sdk/batch/azure-batch/azure/batch/_operations/_operations.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2139,7 +2139,7 @@ def build_batch_delete_task_file_request(
21392139
return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs)
21402140

21412141

2142-
def build_batch_get_task_file_request(
2142+
def build_batch_download_task_file_request(
21432143
job_id: str,
21442144
task_id: str,
21452145
file_path: str,
@@ -2862,7 +2862,7 @@ def build_batch_delete_node_file_request(
28622862
return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs)
28632863

28642864

2865-
def build_batch_get_node_file_request(
2865+
def build_batch_download_node_file_request(
28662866
pool_id: str,
28672867
node_id: str,
28682868
file_path: str,
@@ -8684,7 +8684,7 @@ def delete_task_file( # pylint: disable=inconsistent-return-statements
86848684
return cls(pipeline_response, None, response_headers) # type: ignore
86858685

86868686
@distributed_trace
8687-
def get_task_file(
8687+
def download_task_file(
86888688
self,
86898689
job_id: str,
86908690
task_id: str,
@@ -8744,7 +8744,7 @@ def get_task_file(
87448744

87458745
cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
87468746

8747-
_request = build_batch_get_task_file_request(
8747+
_request = build_batch_download_task_file_request(
87488748
job_id=job_id,
87498749
task_id=task_id,
87508750
file_path=file_path,
@@ -10631,7 +10631,7 @@ def delete_node_file( # pylint: disable=inconsistent-return-statements
1063110631
return cls(pipeline_response, None, response_headers) # type: ignore
1063210632

1063310633
@distributed_trace
10634-
def get_node_file(
10634+
def download_node_file(
1063510635
self,
1063610636
pool_id: str,
1063710637
node_id: str,
@@ -10691,7 +10691,7 @@ def get_node_file(
1069110691

1069210692
cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
1069310693

10694-
_request = build_batch_get_node_file_request(
10694+
_request = build_batch_download_node_file_request(
1069510695
pool_id=pool_id,
1069610696
node_id=node_id,
1069710697
file_path=file_path,

sdk/batch/azure-batch/azure/batch/_operations/_patch.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1385,7 +1385,7 @@ def cls(_pipeline_response, _json_response, headers):
13851385
return get_response
13861386

13871387
@distributed_trace
1388-
def get_task_file(
1388+
def download_task_file(
13891389
self,
13901390
job_id: str,
13911391
task_id: str,
@@ -1443,7 +1443,7 @@ def get_task_file(
14431443
}
14441444
)
14451445
kwargs["stream"] = True
1446-
return super().get_task_file(*args, **kwargs)
1446+
return super().download_task_file(*args, **kwargs)
14471447

14481448

14491449
def patch_sdk():

sdk/batch/azure-batch/azure/batch/aio/_operations/_operations.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@
5151
build_batch_disable_job_schedule_request,
5252
build_batch_disable_node_scheduling_request,
5353
build_batch_disable_pool_auto_scale_request,
54+
build_batch_download_node_file_request,
55+
build_batch_download_task_file_request,
5456
build_batch_enable_job_internal_request,
5557
build_batch_enable_job_schedule_request,
5658
build_batch_enable_node_scheduling_request,
@@ -62,12 +64,10 @@
6264
build_batch_get_job_task_counts_request,
6365
build_batch_get_node_extension_request,
6466
build_batch_get_node_file_properties_internal_request,
65-
build_batch_get_node_file_request,
6667
build_batch_get_node_remote_login_settings_request,
6768
build_batch_get_node_request,
6869
build_batch_get_pool_request,
6970
build_batch_get_task_file_properties_internal_request,
70-
build_batch_get_task_file_request,
7171
build_batch_get_task_request,
7272
build_batch_job_schedule_exists_request,
7373
build_batch_list_applications_request,
@@ -5803,7 +5803,7 @@ async def delete_task_file(
58035803
return cls(pipeline_response, None, response_headers) # type: ignore
58045804

58055805
@distributed_trace_async
5806-
async def get_task_file(
5806+
async def download_task_file(
58075807
self,
58085808
job_id: str,
58095809
task_id: str,
@@ -5863,7 +5863,7 @@ async def get_task_file(
58635863

58645864
cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None)
58655865

5866-
_request = build_batch_get_task_file_request(
5866+
_request = build_batch_download_task_file_request(
58675867
job_id=job_id,
58685868
task_id=task_id,
58695869
file_path=file_path,
@@ -7750,7 +7750,7 @@ async def delete_node_file(
77507750
return cls(pipeline_response, None, response_headers) # type: ignore
77517751

77527752
@distributed_trace_async
7753-
async def get_node_file(
7753+
async def download_node_file(
77547754
self,
77557755
pool_id: str,
77567756
node_id: str,
@@ -7810,7 +7810,7 @@ async def get_node_file(
78107810

78117811
cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None)
78127812

7813-
_request = build_batch_get_node_file_request(
7813+
_request = build_batch_download_node_file_request(
78147814
pool_id=pool_id,
78157815
node_id=node_id,
78167816
file_path=file_path,

sdk/batch/azure-batch/azure/batch/aio/_operations/_patch.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1177,7 +1177,7 @@ async def create_tasks(
11771177
return _models.BatchCreateTaskCollectionResult(result_values=submitted_tasks)
11781178

11791179
@distributed_trace
1180-
async def get_node_file(
1180+
async def download_node_file(
11811181
self,
11821182
pool_id: str,
11831183
node_id: str,
@@ -1234,7 +1234,7 @@ async def get_node_file(
12341234
}
12351235
)
12361236
kwargs["stream"] = True
1237-
return await super().get_node_file(*args, **kwargs)
1237+
return await super().download_node_file(*args, **kwargs)
12381238

12391239
@distributed_trace
12401240
async def get_node_file_properties(

sdk/batch/azure-batch/tests/test_batch.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1032,7 +1032,7 @@ async def test_batch_files(self, client: BatchClient, **kwargs):
10321032
# Test Get File from Batch Node
10331033
file_length = 0
10341034
with io.BytesIO() as file_handle:
1035-
response = await wrap_file_result(client.get_node_file(batch_pool.name, node, only_files[1].name))
1035+
response = await wrap_file_result(client.download_node_file(batch_pool.name, node, only_files[1].name))
10361036
for data in response:
10371037
file_length += len(data)
10381038
assert file_length == props.content_length
@@ -1061,7 +1061,7 @@ async def test_batch_files(self, client: BatchClient, **kwargs):
10611061
# Test Get File from Task
10621062
file_length = 0
10631063
with io.BytesIO() as file_handle:
1064-
response = await wrap_file_result(client.get_task_file(batch_job.id, task_id, only_files[0].name))
1064+
response = await wrap_file_result(client.download_task_file(batch_job.id, task_id, only_files[0].name))
10651065
for data in response:
10661066
file_length += len(data)
10671067
assert file_length == props.content_length
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
directory: specification/batch/data-plane/Batch
2-
commit: 9520b62048c33dc6d9299914830d12ee47e8c209
2+
commit: 1a0316a4c6c6c7caee666fa8023dc12c4ad37f55
33
repo: Azure/azure-rest-api-specs
44
additionalDirectories:

0 commit comments

Comments
 (0)