Skip to content

KV moved paging return type to ItemPaged #6558

Merged
lmazuel merged 2 commits intomasterfrom
kv_paging_cls
Jul 31, 2019
Merged

KV moved paging return type to ItemPaged #6558
lmazuel merged 2 commits intomasterfrom
kv_paging_cls

Conversation

@lmazuel
Copy link
Member

@lmazuel lmazuel commented Jul 30, 2019

The gives KV the support for "by_page()" and "continuation_token", while keeping the same type.

Based a regeneration based on this autorest PR:
Azure/autorest.python#106

Do not merge this one until the autorest one is approved and merged.

@lmazuel lmazuel requested review from chlowell and johanste July 30, 2019 21:59
@AutorestCI
Copy link
Contributor

AutorestCI commented Jul 30, 2019

(message created by the CI based on PR content)

Installation instruction

Package azure-keyvault-secrets

You can install the package azure-keyvault-secrets of this PR using the following command:
pip install "git+https://github.com/Azure/azure-sdk-for-python@kv_paging_cls#egg=azure-keyvault-secrets&subdirectory=azure-keyvault-secrets"

You can build a wheel to distribute for test using the following command:
pip wheel --no-deps "git+https://github.com/Azure/azure-sdk-for-python@kv_paging_cls#egg=azure-keyvault-secrets&subdirectory=azure-keyvault-secrets"

If you have a local clone of this repository, you can also do:

  • git checkout kv_paging_cls
  • pip install -e ./azure-keyvault-secrets

Or build a wheel file to distribute for testing:

  • git checkout kv_paging_cls
  • pip wheel --no-deps ./azure-keyvault-secrets

Package azure-keyvault-keys

You can install the package azure-keyvault-keys of this PR using the following command:
pip install "git+https://github.com/Azure/azure-sdk-for-python@kv_paging_cls#egg=azure-keyvault-keys&subdirectory=azure-keyvault-keys"

You can build a wheel to distribute for test using the following command:
pip wheel --no-deps "git+https://github.com/Azure/azure-sdk-for-python@kv_paging_cls#egg=azure-keyvault-keys&subdirectory=azure-keyvault-keys"

If you have a local clone of this repository, you can also do:

  • git checkout kv_paging_cls
  • pip install -e ./azure-keyvault-keys

Or build a wheel file to distribute for testing:

  • git checkout kv_paging_cls
  • pip wheel --no-deps ./azure-keyvault-keys

Direct download

Your files can be directly downloaded here:

return self._client.get_deleted_keys(
self._vault_url,
maxresults=max_page_size,
cls=lambda objs: [DeletedKey._from_deleted_key_item(x) for x in objs],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume objs is a single page already received, so the comprehension doesn't entail additional I/O?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

correct, objs is a real list already in memory, from a single JSON

@chlowell chlowell self-requested a review July 31, 2019 17:25
@lmazuel lmazuel merged commit 02e17b7 into master Jul 31, 2019
@lmazuel lmazuel deleted the kv_paging_cls branch July 31, 2019 17:32
This was referenced Jul 31, 2019
rakshith91 pushed a commit to rakshith91/azure-sdk-for-python that referenced this pull request Aug 2, 2019
* KV with latest autorest

* Make KV return ItemPaged from azure-core
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants