-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Last Access Time Feature (#13433)
* converted BlobItemInternal to BlobProperties and added the attribute in model's BlobProperties * removed none default * added unit test for get properties with lat * more unit tests * fixed failing test * added docstrings and addeed extra test * Update sdk/storage/azure-storage-blob/azure/storage/blob/_models.py Co-authored-by: Xiaoxi Fu <49707495+xiafu-msft@users.noreply.github.com> Co-authored-by: Xiaoxi Fu <49707495+xiafu-msft@users.noreply.github.com>
- Loading branch information
1 parent
a0a2be8
commit 64a3f14
Showing
7 changed files
with
633 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
346 changes: 346 additions & 0 deletions
346
...ob/tests/recordings/test_blob_access_conditions.test_get_properties_last_access_time.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,346 @@ | ||
interactions: | ||
- request: | ||
body: null | ||
headers: | ||
Accept: | ||
- '*/*' | ||
Accept-Encoding: | ||
- gzip, deflate | ||
Connection: | ||
- keep-alive | ||
Content-Length: | ||
- '0' | ||
User-Agent: | ||
- azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) | ||
x-ms-date: | ||
- Fri, 04 Sep 2020 20:06:53 GMT | ||
x-ms-version: | ||
- '2020-02-10' | ||
method: PUT | ||
uri: https://storagename.blob.core.windows.net/utcontainer56131a54?restype=container | ||
response: | ||
body: | ||
string: '' | ||
headers: | ||
content-length: | ||
- '0' | ||
date: | ||
- Fri, 04 Sep 2020 20:06:53 GMT | ||
etag: | ||
- '"0x8D8510E11772436"' | ||
last-modified: | ||
- Fri, 04 Sep 2020 20:06:53 GMT | ||
server: | ||
- Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 | ||
x-ms-version: | ||
- '2020-02-10' | ||
status: | ||
code: 201 | ||
message: Created | ||
- request: | ||
body: hello world | ||
headers: | ||
Accept: | ||
- '*/*' | ||
Accept-Encoding: | ||
- gzip, deflate | ||
Connection: | ||
- keep-alive | ||
Content-Length: | ||
- '11' | ||
Content-Type: | ||
- application/octet-stream | ||
If-None-Match: | ||
- '*' | ||
User-Agent: | ||
- azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) | ||
x-ms-blob-type: | ||
- BlockBlob | ||
x-ms-date: | ||
- Fri, 04 Sep 2020 20:06:54 GMT | ||
x-ms-version: | ||
- '2020-02-10' | ||
method: PUT | ||
uri: https://storagename.blob.core.windows.net/utcontainer56131a54/blob1 | ||
response: | ||
body: | ||
string: '' | ||
headers: | ||
content-length: | ||
- '0' | ||
content-md5: | ||
- XrY7u+Ae7tCTyyK7j1rNww== | ||
date: | ||
- Fri, 04 Sep 2020 20:06:53 GMT | ||
etag: | ||
- '"0x8D8510E118A992E"' | ||
last-modified: | ||
- Fri, 04 Sep 2020 20:06:53 GMT | ||
server: | ||
- Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 | ||
x-ms-content-crc64: | ||
- vo7q9sPVKY0= | ||
x-ms-request-server-encrypted: | ||
- 'true' | ||
x-ms-version: | ||
- '2020-02-10' | ||
status: | ||
code: 201 | ||
message: Created | ||
- request: | ||
body: null | ||
headers: | ||
Accept: | ||
- '*/*' | ||
Accept-Encoding: | ||
- gzip, deflate | ||
Connection: | ||
- keep-alive | ||
User-Agent: | ||
- azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) | ||
x-ms-date: | ||
- Fri, 04 Sep 2020 20:06:54 GMT | ||
x-ms-version: | ||
- '2020-02-10' | ||
method: HEAD | ||
uri: https://storagename.blob.core.windows.net/utcontainer56131a54/blob1 | ||
response: | ||
body: | ||
string: '' | ||
headers: | ||
accept-ranges: | ||
- bytes | ||
content-length: | ||
- '11' | ||
content-md5: | ||
- XrY7u+Ae7tCTyyK7j1rNww== | ||
content-type: | ||
- application/octet-stream | ||
date: | ||
- Fri, 04 Sep 2020 20:06:53 GMT | ||
etag: | ||
- '"0x8D8510E118A992E"' | ||
last-modified: | ||
- Fri, 04 Sep 2020 20:06:53 GMT | ||
server: | ||
- Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 | ||
x-ms-access-tier: | ||
- Hot | ||
x-ms-access-tier-inferred: | ||
- 'true' | ||
x-ms-blob-type: | ||
- BlockBlob | ||
x-ms-creation-time: | ||
- Fri, 04 Sep 2020 20:06:53 GMT | ||
x-ms-last-access-time: | ||
- Fri, 04 Sep 2020 20:06:53 GMT | ||
x-ms-lease-state: | ||
- available | ||
x-ms-lease-status: | ||
- unlocked | ||
x-ms-server-encrypted: | ||
- 'true' | ||
x-ms-version: | ||
- '2020-02-10' | ||
status: | ||
code: 200 | ||
message: OK | ||
- request: | ||
body: this is test content | ||
headers: | ||
Accept: | ||
- '*/*' | ||
Accept-Encoding: | ||
- gzip, deflate | ||
Connection: | ||
- keep-alive | ||
Content-Length: | ||
- '20' | ||
Content-Type: | ||
- application/octet-stream | ||
User-Agent: | ||
- azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) | ||
x-ms-date: | ||
- Fri, 04 Sep 2020 20:08:03 GMT | ||
x-ms-version: | ||
- '2020-02-10' | ||
method: PUT | ||
uri: https://storagename.blob.core.windows.net/utcontainer56131a54/blob1?blockid=MQ%3D%3D&comp=block | ||
response: | ||
body: | ||
string: '' | ||
headers: | ||
content-length: | ||
- '0' | ||
date: | ||
- Fri, 04 Sep 2020 20:08:02 GMT | ||
server: | ||
- Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 | ||
x-ms-content-crc64: | ||
- wae/Ns62JRA= | ||
x-ms-request-server-encrypted: | ||
- 'true' | ||
x-ms-version: | ||
- '2020-02-10' | ||
status: | ||
code: 201 | ||
message: Created | ||
- request: | ||
body: '<?xml version=''1.0'' encoding=''utf-8''?> | ||
<BlockList><Latest>MQ==</Latest></BlockList>' | ||
headers: | ||
Accept: | ||
- '*/*' | ||
Accept-Encoding: | ||
- gzip, deflate | ||
Connection: | ||
- keep-alive | ||
Content-Length: | ||
- '83' | ||
Content-Type: | ||
- application/xml; charset=utf-8 | ||
User-Agent: | ||
- azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) | ||
x-ms-date: | ||
- Fri, 04 Sep 2020 20:08:04 GMT | ||
x-ms-version: | ||
- '2020-02-10' | ||
method: PUT | ||
uri: https://storagename.blob.core.windows.net/utcontainer56131a54/blob1?comp=blocklist | ||
response: | ||
body: | ||
string: '' | ||
headers: | ||
content-length: | ||
- '0' | ||
date: | ||
- Fri, 04 Sep 2020 20:08:03 GMT | ||
etag: | ||
- '"0x8D8510E3B9B72BB"' | ||
last-modified: | ||
- Fri, 04 Sep 2020 20:08:04 GMT | ||
server: | ||
- Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 | ||
x-ms-content-crc64: | ||
- iEgKfcNWGmY= | ||
x-ms-request-server-encrypted: | ||
- 'true' | ||
x-ms-version: | ||
- '2020-02-10' | ||
status: | ||
code: 201 | ||
message: Created | ||
- request: | ||
body: null | ||
headers: | ||
Accept: | ||
- '*/*' | ||
Accept-Encoding: | ||
- gzip, deflate | ||
Connection: | ||
- keep-alive | ||
User-Agent: | ||
- azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) | ||
x-ms-date: | ||
- Fri, 04 Sep 2020 20:08:08 GMT | ||
x-ms-version: | ||
- '2020-02-10' | ||
method: HEAD | ||
uri: https://storagename.blob.core.windows.net/utcontainer56131a54/blob1 | ||
response: | ||
body: | ||
string: '' | ||
headers: | ||
accept-ranges: | ||
- bytes | ||
content-length: | ||
- '20' | ||
content-type: | ||
- application/octet-stream | ||
date: | ||
- Fri, 04 Sep 2020 20:08:07 GMT | ||
etag: | ||
- '"0x8D8510E3B9B72BB"' | ||
last-modified: | ||
- Fri, 04 Sep 2020 20:08:04 GMT | ||
server: | ||
- Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 | ||
x-ms-access-tier: | ||
- Hot | ||
x-ms-access-tier-inferred: | ||
- 'true' | ||
x-ms-blob-type: | ||
- BlockBlob | ||
x-ms-creation-time: | ||
- Fri, 04 Sep 2020 20:06:53 GMT | ||
x-ms-last-access-time: | ||
- Fri, 04 Sep 2020 20:08:04 GMT | ||
x-ms-lease-state: | ||
- available | ||
x-ms-lease-status: | ||
- unlocked | ||
x-ms-server-encrypted: | ||
- 'true' | ||
x-ms-version: | ||
- '2020-02-10' | ||
status: | ||
code: 200 | ||
message: OK | ||
- request: | ||
body: null | ||
headers: | ||
Accept: | ||
- application/xml | ||
Accept-Encoding: | ||
- gzip, deflate | ||
Connection: | ||
- keep-alive | ||
User-Agent: | ||
- azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) | ||
x-ms-date: | ||
- Fri, 04 Sep 2020 20:08:20 GMT | ||
x-ms-range: | ||
- bytes=0-33554431 | ||
x-ms-version: | ||
- '2020-02-10' | ||
method: GET | ||
uri: https://storagename.blob.core.windows.net/utcontainer56131a54/blob1 | ||
response: | ||
body: | ||
string: this is test content | ||
headers: | ||
accept-ranges: | ||
- bytes | ||
content-length: | ||
- '20' | ||
content-range: | ||
- bytes 0-19/20 | ||
content-type: | ||
- application/octet-stream | ||
date: | ||
- Fri, 04 Sep 2020 20:08:19 GMT | ||
etag: | ||
- '"0x8D8510E3B9B72BB"' | ||
last-modified: | ||
- Fri, 04 Sep 2020 20:08:04 GMT | ||
server: | ||
- Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 | ||
x-ms-blob-type: | ||
- BlockBlob | ||
x-ms-creation-time: | ||
- Fri, 04 Sep 2020 20:06:53 GMT | ||
x-ms-last-access-time: | ||
- Fri, 04 Sep 2020 20:08:04 GMT | ||
x-ms-lease-state: | ||
- available | ||
x-ms-lease-status: | ||
- unlocked | ||
x-ms-server-encrypted: | ||
- 'true' | ||
x-ms-version: | ||
- '2020-02-10' | ||
status: | ||
code: 206 | ||
message: Partial Content | ||
version: 1 |
Oops, something went wrong.