Skip to content

Commit 03bfd33

Browse files
committed
Added support for directory operations
1 parent 2b50f5c commit 03bfd33

12 files changed

+1539
-1
lines changed

azure-storage-blob/ChangeLog.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,16 @@
22

33
> See [BreakingChanges](BreakingChanges.md) for a detailed list of API breaks.
44
5+
## Version XX.XX.XX
6+
7+
- Added support for directory operations: create, rename, and delete.
8+
59
## Version 2.0.1:
10+
611
- Updated dependency on azure-storage-common.
712

813
## Version 2.0.0:
14+
915
- Support for 2018-11-09 REST version. Please see our REST API documentation and blog for information about the related added features.
1016
- Added support for append block from URL(synchronously) for append blobs.
1117
- Added support for update page from URL(synchronously) for page blobs.

azure-storage-blob/azure/storage/blob/_constants.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,6 @@
1212

1313
# internal configurations, should not be changed
1414
_LARGE_BLOB_UPLOAD_MAX_READ_BUFFER_SIZE = 4 * 1024 * 1024
15+
16+
_BLOB_SERVICE_PUBLIC_CLOUD_HOST = 'blob.core.windows.net'
17+
_DFS_SERVICE_PUBLIC_CLOUD_HOST = 'dfs.core.windows.net'

azure-storage-blob/azure/storage/blob/_deserialization.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -554,3 +554,8 @@ def _convert_xml_to_user_delegation_key(response):
554554
delegation_key.value = key_element.findtext('Value')
555555

556556
return delegation_key
557+
558+
559+
def _parse_continuation_token(response):
560+
marker = response.headers.get('x-ms-continuation')
561+
return marker if marker is not '' else None

azure-storage-blob/azure/storage/blob/_serialization.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,3 +151,12 @@ def _convert_delegation_key_info_to_xml(start_time, expiry_time):
151151

152152
# return xml value
153153
return output
154+
155+
156+
# TODO to be removed after service update
157+
def _add_file_or_directory_properties_header(properties_dict, request):
158+
if properties_dict:
159+
if not request.headers:
160+
request.headers = {}
161+
request.headers['x-ms-properties'] = \
162+
",".join(["{}={}".format(str(name), _encode_base64(value)) for name, value in properties_dict.items()])

azure-storage-blob/azure/storage/blob/baseblobservice.py

Lines changed: 269 additions & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)