Skip to content

Commit 272d558

Browse files
[Storage] [STG 97] GA API Views Feedback (Azure#39891)
1 parent c29eabb commit 272d558

File tree

5 files changed

+23
-23
lines changed

5 files changed

+23
-23
lines changed

sdk/storage/azure-storage-file-share/assets.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
"AssetsRepo": "Azure/azure-sdk-assets",
33
"AssetsRepoPrefixPath": "python",
44
"TagPrefix": "python/storage/azure-storage-file-share",
5-
"Tag": "python/storage/azure-storage-file-share_28d3d8db00"
5+
"Tag": "python/storage/azure-storage-file-share_adb38dd356"
66
}

sdk/storage/azure-storage-file-share/azure/storage/fileshare/_file_client.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -725,13 +725,13 @@ def start_copy_from_url(self, source_url: str, **kwargs: Any) -> Dict[str, Any]:
725725
NFS only. The owning group of the file.
726726
:keyword str file_mode:
727727
NFS only. The file mode of the file.
728-
:keyword mode_copy_mode:
728+
:keyword file_mode_copy_mode:
729729
NFS only. Applicable only when the copy source is a File. Determines the copy behavior
730730
of the mode bits of the file. Possible values are:
731731
732732
source - The mode on the destination file is copied from the source file.
733733
override - The mode on the destination file is determined via the file_mode keyword.
734-
:paramtype mode_copy_mode: Literal['source', 'override']
734+
:paramtype file_mode_copy_mode: Literal['source', 'override']
735735
:keyword owner_copy_mode:
736736
NFS only. Applicable only when the copy source is a File. Determines the copy behavior
737737
of the owner and group of the file. Possible values are:
@@ -763,7 +763,7 @@ def start_copy_from_url(self, source_url: str, **kwargs: Any) -> Dict[str, Any]:
763763
owner = kwargs.pop('owner', None)
764764
group = kwargs.pop('group', None)
765765
file_mode = kwargs.pop('file_mode', None)
766-
file_mode_copy_mode = kwargs.pop('mode_copy_mode', None)
766+
file_mode_copy_mode = kwargs.pop('file_mode_copy_mode', None)
767767
file_owner_copy_mode = kwargs.pop('owner_copy_mode', None)
768768
headers = kwargs.pop('headers', {})
769769
headers.update(add_metadata_headers(metadata))
@@ -1701,14 +1701,14 @@ def close_all_handles(self, **kwargs: Any) -> Dict[str, int]:
17011701
}
17021702

17031703
@distributed_trace
1704-
def create_hard_link(
1704+
def create_hardlink(
17051705
self, target: str,
17061706
*,
17071707
lease: Optional[Union[ShareLeaseClient, str]] = None,
17081708
timeout: Optional[int] = None,
17091709
**kwargs: Any
17101710
) -> Dict[str, Any]:
1711-
"""NFS only. Create a hard link to the file specified by path.
1711+
"""NFS only. Creates a hard link to the file specified by path.
17121712
17131713
:param str target:
17141714
Specifies the path of the target file to which the link will be created, up to 2 KiB in length.

sdk/storage/azure-storage-file-share/azure/storage/fileshare/aio/_file_client_async.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -720,13 +720,13 @@ async def start_copy_from_url(self, source_url: str, **kwargs: Any) -> Dict[str,
720720
NFS only. The owning group of the file.
721721
:keyword str file_mode:
722722
NFS only. The file mode of the file.
723-
:keyword mode_copy_mode:
723+
:keyword file_mode_copy_mode:
724724
NFS only. Applicable only when the copy source is a File. Determines the copy behavior
725725
of the mode bits of the file. Possible values are:
726726
727727
source - The mode on the destination file is copied from the source file.
728728
override - The mode on the destination file is determined via the file_mode keyword.
729-
:paramtype mode_copy_mode: Literal['source', 'override']
729+
:paramtype file_mode_copy_mode: Literal['source', 'override']
730730
:keyword owner_copy_mode:
731731
NFS only. Applicable only when the copy source is a File. Determines the copy behavior
732732
of the owner and group of the file. Possible values are:
@@ -758,7 +758,7 @@ async def start_copy_from_url(self, source_url: str, **kwargs: Any) -> Dict[str,
758758
owner = kwargs.pop('owner', None)
759759
group = kwargs.pop('group', None)
760760
file_mode = kwargs.pop('file_mode', None)
761-
file_mode_copy_mode = kwargs.pop('mode_copy_mode', None)
761+
file_mode_copy_mode = kwargs.pop('file_mode_copy_mode', None)
762762
file_owner_copy_mode = kwargs.pop('owner_copy_mode', None)
763763
headers = kwargs.pop("headers", {})
764764
headers.update(add_metadata_headers(metadata))
@@ -1702,14 +1702,14 @@ async def close_all_handles(self, **kwargs: Any) -> Dict[str, int]:
17021702
}
17031703

17041704
@distributed_trace_async
1705-
async def create_hard_link(
1705+
async def create_hardlink(
17061706
self, target: str,
17071707
*,
17081708
lease: Optional[Union[ShareLeaseClient, str]] = None,
17091709
timeout: Optional[int] = None,
17101710
**kwargs: Any
17111711
) -> Dict[str, Any]:
1712-
"""NFS only. Create a hard link to the file specified by path.
1712+
"""NFS only. Creates a hard link to the file specified by path.
17131713
17141714
:param str target:
17151715
Specifies the path of the target file to which the link will be created, up to 2 KiB in length.

sdk/storage/azure-storage-file-share/tests/test_nfs.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ def test_download_and_copy_file(self, **kwargs: Any):
181181
)
182182
copy = new_client_source_copy.start_copy_from_url(
183183
file_client.url,
184-
mode_copy_mode='source',
184+
file_mode_copy_mode='source',
185185
owner_copy_mode='source'
186186
)
187187
self._assert_copy(copy)
@@ -212,7 +212,7 @@ def test_download_and_copy_file(self, **kwargs: Any):
212212
owner=override_owner,
213213
group=override_group,
214214
file_mode=override_file_mode,
215-
mode_copy_mode='override',
215+
file_mode_copy_mode='override',
216216
owner_copy_mode='override'
217217
)
218218
self._assert_copy(copy)
@@ -221,7 +221,7 @@ def test_download_and_copy_file(self, **kwargs: Any):
221221

222222
@FileSharePreparer()
223223
@recorded_by_proxy
224-
def test_create_hard_link(self, **kwargs: Any):
224+
def test_create_hardlink(self, **kwargs: Any):
225225
premium_storage_file_account_name = kwargs.pop("premium_storage_file_account_name")
226226

227227
self._setup(premium_storage_file_account_name)
@@ -235,7 +235,7 @@ def test_create_hard_link(self, **kwargs: Any):
235235
hard_link_file_name = self._get_file_name('file2')
236236
hard_link_file_client = directory_client.get_file_client(hard_link_file_name)
237237

238-
resp = hard_link_file_client.create_hard_link(target=f"{directory_name}/{source_file_name}")
238+
resp = hard_link_file_client.create_hardlink(target=f"{directory_name}/{source_file_name}")
239239

240240
assert resp is not None
241241
assert resp['file_file_type'] == 'Regular'
@@ -255,7 +255,7 @@ def test_create_hard_link(self, **kwargs: Any):
255255

256256
@FileSharePreparer()
257257
@recorded_by_proxy
258-
def test_create_hard_link_error(self, **kwargs: Any):
258+
def test_create_hardlink_error(self, **kwargs: Any):
259259
premium_storage_file_account_name = kwargs.pop("premium_storage_file_account_name")
260260

261261
self._setup(premium_storage_file_account_name)
@@ -269,6 +269,6 @@ def test_create_hard_link_error(self, **kwargs: Any):
269269
hard_link_file_client = directory_client.get_file_client(hard_link_file_name)
270270

271271
with pytest.raises(ResourceNotFoundError) as e:
272-
hard_link_file_client.create_hard_link(target=f"{directory_name}/{source_file_name}")
272+
hard_link_file_client.create_hardlink(target=f"{directory_name}/{source_file_name}")
273273

274274
assert 'ParentNotFound' in e.value.args[0]

sdk/storage/azure-storage-file-share/tests/test_nfs_async.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ async def test_download_and_copy_file(self, **kwargs: Any):
193193
)
194194
copy = await new_client_source_copy.start_copy_from_url(
195195
file_client.url,
196-
mode_copy_mode='source',
196+
file_mode_copy_mode='source',
197197
owner_copy_mode='source'
198198
)
199199
self._assert_copy(copy)
@@ -224,7 +224,7 @@ async def test_download_and_copy_file(self, **kwargs: Any):
224224
owner=override_owner,
225225
group=override_group,
226226
file_mode=override_file_mode,
227-
mode_copy_mode='override',
227+
file_mode_copy_mode='override',
228228
owner_copy_mode='override'
229229
)
230230
self._assert_copy(copy)
@@ -233,7 +233,7 @@ async def test_download_and_copy_file(self, **kwargs: Any):
233233

234234
@FileSharePreparer()
235235
@recorded_by_proxy_async
236-
async def test_create_hard_link(self, **kwargs: Any):
236+
async def test_create_hardlink(self, **kwargs: Any):
237237
premium_storage_file_account_name = kwargs.pop("premium_storage_file_account_name")
238238

239239
await self._setup(premium_storage_file_account_name)
@@ -247,7 +247,7 @@ async def test_create_hard_link(self, **kwargs: Any):
247247
hard_link_file_name = self._get_file_name('file2')
248248
hard_link_file_client = directory_client.get_file_client(hard_link_file_name)
249249

250-
resp = await hard_link_file_client.create_hard_link(target=f"{directory_name}/{source_file_name}")
250+
resp = await hard_link_file_client.create_hardlink(target=f"{directory_name}/{source_file_name}")
251251

252252
assert resp is not None
253253
assert resp['file_file_type'] == 'Regular'
@@ -267,7 +267,7 @@ async def test_create_hard_link(self, **kwargs: Any):
267267

268268
@FileSharePreparer()
269269
@recorded_by_proxy_async
270-
async def test_create_hard_link_error(self, **kwargs: Any):
270+
async def test_create_hardlink_error(self, **kwargs: Any):
271271
premium_storage_file_account_name = kwargs.pop("premium_storage_file_account_name")
272272

273273
await self._setup(premium_storage_file_account_name)
@@ -281,6 +281,6 @@ async def test_create_hard_link_error(self, **kwargs: Any):
281281
hard_link_file_client = directory_client.get_file_client(hard_link_file_name)
282282

283283
with pytest.raises(ResourceNotFoundError) as e:
284-
await hard_link_file_client.create_hard_link(target=f"{directory_name}/{source_file_name}")
284+
await hard_link_file_client.create_hardlink(target=f"{directory_name}/{source_file_name}")
285285

286286
assert 'ParentNotFound' in e.value.args[0]

0 commit comments

Comments
 (0)