Skip to content

Commit 726b1b0

Browse files
authored
rebuild storagev2 (#25)
* rebuild storagev2 * upgrade version
1 parent d3a3d08 commit 726b1b0

19 files changed

+54
-122
lines changed

README.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ Handles multi-API versions of Azure Storage Data Plane originally from https://g
1717

1818
Change Log
1919
----------
20+
0.3.2
21+
+++++
22+
* Fix package issue
23+
2024
0.3.1
2125
+++++
2226
* Fix package issue

azure/multiapi/storagev2/blob/v2019_07_07/_blob_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ def _format_url(self, hostname):
168168
self.scheme,
169169
hostname,
170170
quote(container_name),
171-
quote(self.blob_name, safe='~'),
171+
quote(self.blob_name, safe='~/'),
172172
self._query_str)
173173

174174
@classmethod

azure/multiapi/storagev2/blob/v2019_07_07/_models.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -468,6 +468,15 @@ class BlobProperties(DictMixin):
468468
Indicates when the blob was created, in UTC.
469469
:ivar str archive_status:
470470
Archive status of blob.
471+
:ivar str encryption_key_sha256:
472+
The SHA-256 hash of the provided encryption key.
473+
:ivar str encryption_scope:
474+
A predefined encryption scope used to encrypt the data on the service. An encryption
475+
scope can be created using the Management API and referenced here by name. If a default
476+
encryption scope has been defined at the container, this value will override it if the
477+
container-level scope is configured to allow overrides. Otherwise an error will be raised.
478+
:ivar bool request_server_encrypted:
479+
Whether this blob is encrypted.
471480
"""
472481

473482
def __init__(self, **kwargs):

azure/multiapi/storagev2/blob/v2019_07_07/_shared/base_client.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,8 @@ def _batch_send(
268268
policies=[
269269
StorageHeadersPolicy(),
270270
self._credential_policy
271-
]
271+
],
272+
enforce_https=False
272273
)
273274

274275
pipeline_response = self._pipeline.run(

azure/multiapi/storagev2/blob/v2019_07_07/_shared/base_client_async.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,8 @@ async def _batch_send(
124124
policies=[
125125
StorageHeadersPolicy(),
126126
self._credential_policy
127-
]
127+
],
128+
enforce_https=False
128129
)
129130

130131
pipeline_response = await self._pipeline.run(

azure/multiapi/storagev2/blob/v2019_07_07/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
# license information.
55
# --------------------------------------------------------------------------
66

7-
VERSION = "12.3.0"
7+
VERSION = "12.3.1"

azure/multiapi/storagev2/filedatalake/v2018_11_09/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
FileSystemProperties,
1717
FileSystemPropertiesPaged,
1818
DirectoryProperties,
19+
FileProperties,
1920
PathProperties,
2021
PathPropertiesPaged,
2122
LeaseProperties,
@@ -54,6 +55,7 @@
5455
'FileSystemProperties',
5556
'FileSystemPropertiesPaged',
5657
'DirectoryProperties',
58+
'FileProperties',
5759
'PathProperties',
5860
'PathPropertiesPaged',
5961
'LeaseProperties',

azure/multiapi/storagev2/filedatalake/v2018_11_09/_data_lake_directory_client.py

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -247,28 +247,10 @@ def rename_directory(self, new_name, # type: str
247247
the source path must have an active lease and the leaase ID must
248248
match.
249249
:paramtype source_lease: ~azure.storage.filedatalake.DataLakeLeaseClient or str
250-
:keyword ~azure.storage.filedatalake.ContentSettings content_settings:
251-
ContentSettings object used to set path properties.
252250
:keyword lease:
253251
Required if the file/directory has an active lease. Value can be a LeaseClient object
254252
or the lease ID as a string.
255253
:paramtype lease: ~azure.storage.filedatalake.DataLakeLeaseClient or str
256-
:keyword str umask:
257-
Optional and only valid if Hierarchical Namespace is enabled for the account.
258-
When creating a file or directory and the parent folder does not have a default ACL,
259-
the umask restricts the permissions of the file or directory to be created.
260-
The resulting permission is given by p & ^u, where p is the permission and u is the umask.
261-
For example, if p is 0777 and u is 0057, then the resulting permission is 0720.
262-
The default permission is 0777 for a directory and 0666 for a file. The default umask is 0027.
263-
The umask must be specified in 4-digit octal notation (e.g. 0766).
264-
:keyword permissions:
265-
Optional and only valid if Hierarchical Namespace
266-
is enabled for the account. Sets POSIX access permissions for the file
267-
owner, the file owning group, and others. Each class may be granted
268-
read, write, or execute permission. The sticky bit is also supported.
269-
Both symbolic (rwxrw-rw-) and 4-digit octal notation (e.g. 0766) are
270-
supported.
271-
:type permissions: str
272254
:keyword ~datetime.datetime if_modified_since:
273255
A DateTime value. Azure expects the date value passed in to be UTC.
274256
If timezone is included, any non-UTC datetimes will be converted to UTC.

azure/multiapi/storagev2/filedatalake/v2018_11_09/_data_lake_file_client.py

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ def upload_data(self, data, # type: Union[AnyStr, Iterable[AnyStr], IO[AnyStr]]
305305
:keyword ~azure.storage.filedatalake.DataLakeLeaseClient or str lease:
306306
Required if the blob has an active lease. Value can be a DataLakeLeaseClient object
307307
or the lease ID as a string.
308-
:keyword str umaskoverwrite: Optional and only valid if Hierarchical Namespace is enabled for the account.
308+
:keyword str umask: Optional and only valid if Hierarchical Namespace is enabled for the account.
309309
When creating a file or directory and the parent folder does not have a default ACL,
310310
the umask restricts the permissions of the file or directory to be created.
311311
The resulting permission is given by p & ^u, where p is the permission and u is the umask.
@@ -567,32 +567,16 @@ def rename_file(self, new_name, # type: str
567567
568568
:param str new_name: the new file name the user want to rename to.
569569
The value must have the following format: "{filesystem}/{directory}/{subdirectory}/{file}".
570+
:keyword ~azure.storage.filedatalake.ContentSettings content_settings:
571+
ContentSettings object used to set path properties.
570572
:keyword source_lease: A lease ID for the source path. If specified,
571573
the source path must have an active lease and the leaase ID must
572574
match.
573575
:paramtype source_lease: ~azure.storage.filedatalake.DataLakeLeaseClient or str
574-
:keyword ~azure.storage.filedatalake.ContentSettings content_settings:
575-
ContentSettings object used to set path properties.
576576
:keyword lease:
577577
Required if the file/directory has an active lease. Value can be a LeaseClient object
578578
or the lease ID as a string.
579579
:type lease: ~azure.storage.filedatalake.DataLakeLeaseClient or str
580-
:keyword str umask:
581-
Optional and only valid if Hierarchical Namespace is enabled for the account.
582-
When creating a file or directory and the parent folder does not have a default ACL,
583-
the umask restricts the permissions of the file or directory to be created.
584-
The resulting permission is given by p & ^u, where p is the permission and u is the umask.
585-
For example, if p is 0777 and u is 0057, then the resulting permission is 0720.
586-
The default permission is 0777 for a directory and 0666 for a file. The default umask is 0027.
587-
The umask must be specified in 4-digit octal notation (e.g. 0766).
588-
:keyword permissions:
589-
Optional and only valid if Hierarchical Namespace
590-
is enabled for the account. Sets POSIX access permissions for the file
591-
owner, the file owning group, and others. Each class may be granted
592-
read, write, or execute permission. The sticky bit is also supported.
593-
Both symbolic (rwxrw-rw-) and 4-digit octal notation (e.g. 0766) are
594-
supported.
595-
:type permissions: str
596580
:keyword ~datetime.datetime if_modified_since:
597581
A DateTime value. Azure expects the date value passed in to be UTC.
598582
If timezone is included, any non-UTC datetimes will be converted to UTC.

azure/multiapi/storagev2/filedatalake/v2018_11_09/_path_client.py

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,8 @@ def _rename_path_options(self, rename_source, content_settings=None, metadata=No
396396
# type: (Optional[ContentSettings], Optional[Dict[str, str]], **Any) -> Dict[str, Any]
397397
if self.require_encryption or (self.key_encryption_key is not None):
398398
raise ValueError(_ERROR_UNSUPPORTED_METHOD_FOR_ENCRYPTION)
399+
if metadata or kwargs.pop('permissions', None) or kwargs.pop('umask', None):
400+
raise ValueError("metadata, permissions, umask is not supported for this operation")
399401

400402
access_conditions = get_access_conditions(kwargs.pop('lease', None))
401403
source_lease_id = get_lease_id(kwargs.pop('source_lease', None))
@@ -408,9 +410,9 @@ def _rename_path_options(self, rename_source, content_settings=None, metadata=No
408410

409411
options = {
410412
'rename_source': rename_source,
411-
'properties': add_metadata_headers(metadata),
412-
'permissions': kwargs.pop('permissions', None),
413-
'umask': kwargs.pop('umask', None),
413+
'properties': None,
414+
'permissions': None,
415+
'umask': None,
414416
'path_http_headers': path_http_headers,
415417
'lease_access_conditions': access_conditions,
416418
'source_lease_id': source_lease_id,
@@ -431,31 +433,17 @@ def _rename_path(self, rename_source,
431433
:param rename_source:
432434
The value must have the following format: "/{filesystem}/{path}".
433435
:type rename_source: str
436+
:keyword ~azure.storage.filedatalake.ContentSettings content_settings:
437+
ContentSettings object used to set path properties.
434438
:keyword source_lease:
435439
A lease ID for the source path. If specified,
436440
the source path must have an active lease and the leaase ID must
437441
match.
438442
:paramtype source_lease: ~azure.storage.filedatalake.DataLakeLeaseClient or str
439-
:keyword ~azure.storage.filedatalake.ContentSettings content_settings:
440-
ContentSettings object used to set path properties.
441443
:keyword lease:
442444
Required if the file/directory has an active lease. Value can be a LeaseClient object
443445
or the lease ID as a string.
444446
:paramtype lease: ~azure.storage.filedatalake.DataLakeLeaseClient or str
445-
:keyword str umask: Optional and only valid if Hierarchical Namespace is enabled for the account.
446-
When creating a file or directory and the parent folder does not have a default ACL,
447-
the umask restricts the permissions of the file or directory to be created.
448-
The resulting permission is given by p & ^u, where p is the permission and u is the umask.
449-
For example, if p is 0777 and u is 0057, then the resulting permission is 0720.
450-
The default permission is 0777 for a directory and 0666 for a file. The default umask is 0027.
451-
The umask must be specified in 4-digit octal notation (e.g. 0766).
452-
:keyword permissions: Optional and only valid if Hierarchical Namespace
453-
is enabled for the account. Sets POSIX access permissions for the file
454-
owner, the file owning group, and others. Each class may be granted
455-
read, write, or execute permission. The sticky bit is also supported.
456-
Both symbolic (rwxrw-rw-) and 4-digit octal notation (e.g. 0766) are
457-
supported.
458-
:type permissions: str
459447
:keyword ~datetime.datetime if_modified_since:
460448
A DateTime value. Azure expects the date value passed in to be UTC.
461449
If timezone is included, any non-UTC datetimes will be converted to UTC.

0 commit comments

Comments
 (0)