Conversation
️✔️AzureCLI-FullTest
|
Collaborator
|
Thank you for your contribution! We will review the pull request and get back to you soon. |
azure keyvault secret/certificate: Migrate to track2 SDK, breaking changes to service responseaz keyvault secret/certificate: Migrate to track2 SDK, breaking changes to service response
# Conflicts: # src/azure-cli-core/azure/cli/core/profiles/_shared.py # src/azure-cli/azure/cli/command_modules/keyvault/_client_factory.py # src/azure-cli/azure/cli/command_modules/keyvault/custom.py # src/azure-cli/requirements.py3.Darwin.txt # src/azure-cli/requirements.py3.Linux.txt # src/azure-cli/requirements.py3.windows.txt # src/azure-cli/setup.py
…onal property, should not manually add it, user can use `az keyvault certificate pending show` to find it.
evelyn-ys
approved these changes
May 17, 2023
necusjz
approved these changes
May 17, 2023
kairu-ms
approved these changes
May 17, 2023
wangzelin007
approved these changes
May 17, 2023
yanzhudd
approved these changes
May 17, 2023
zhoxing-ms
reviewed
May 17, 2023
|
|
||
| @ResourceGroupPreparer(name_prefix='cli_test_vm_secrets') | ||
| @KeyVaultPreparer(name_prefix='vmlinuxkv', name_len=20, additional_params='--enabled-for-deployment --enabled-for-template-deployment', key='vault') | ||
| @KeyVaultPreparer(name_prefix='vmlinuxkv', name_len=20, additional_params='--enabled-for-deployment --enabled-for-template-deployment', key='vault', skip_purge=True) |
Contributor
There was a problem hiding this comment.
Could you please help explain why do we need skip_purge=True?
Member
Author
There was a problem hiding this comment.
It is because older api versions (2016-10-01) creates the keyvault without soft-delete enabled by default. Purge after delete will raise an error.
zhoxing-ms
approved these changes
May 17, 2023
3 tasks
avgale
pushed a commit
to avgale/azure-cli
that referenced
this pull request
Aug 24, 2023
… to track2 SDK, breaking changes to service response (Azure#26242) * add track2 sdk for keyvault certificates and secrets * tested `secret list/list-deleted/list-versions`, `secret set` is partially done * `az keyvault secret set` done * `az keyvault secret set-attributes` done * `az keyvault secret show` done, reformat _params.py * `az keyvault secret show-deleted` done * `az keyvault secret delete` done * `az keyvault secret purge` done * `az keyvault secret purge` done * `az keyvault secret recover` done * `az keyvault secret download` done * `az keyvault secret backup` done * `az keyvault secret restore` done , `az keyvault secret` done, still need tests * `az keyvault secret` tests passed * `az keyvault certificate create` done * `az keyvault certificate list` done * `az keyvault certificate list-versions` done * `az keyvault certificate list-deleted` done * `az keyvault certificate show` done * `az keyvault certificate show` done * `az keyvault certificate show-deleted` done * `az keyvault certificate delete` done * `az keyvault certificate purge` done * `az keyvault certificate recover` done * `az keyvault certificate set-attributes` done * `az keyvault certificate set-attributes` done * `az keyvault certificate import` done, need to fix x509properties,basic_constraints * `az keyvault certificate import` no need for custom func * `az keyvault certificate download` done * remove basic_constraints as no longer return by track2 sdk * `az keyvault certificate get-default-policy` done * `az keyvault certificate backup` done * `az keyvault certificate restore` done * `az keyvault certificate pending merge` done, testing not finished because (Conflict) A pending object is already complete. BREAKING CHANGE: --not-before and --expires no longer supported by track2 * `az keyvault certificate pending show` done * `az keyvault certificate pending delete` done * `az keyvault certificate contact list` done * `az keyvault certificate contact add` done * `az keyvault certificate contact delete` done, BREAKING CHANGE, if delete would remove the last contact, return an empty list instead of the deleted contact. This is to be consistent where delete would return the remaining list. * `az keyvault certificate issuer create` done, BREAKING CHANGE, "zip" under "organizationDetails" is no longer returned, use 0 as default * `az keyvault certificate issuer update` done * `az keyvault certificate issuer list` done * `az keyvault certificate issuer show` done * `az keyvault certificate issuer delete` done * `az keyvault certificate issuer admin add` done, BREAKING CHANGE: returns the list after the addition instead of only the admin just added, follows `az keyvault certificate contact add` * `az keyvault certificate issuer admin list` done * `az keyvault certificate issuer admin delete` done, fix case when the admin deleted is the last * fix some tests, test_keyvault_certificate_issuers still not fully working because of sdk breaking change * lint * use sdk functions directly to bypass error where cannot set str back to "", remove breaking change for `az keyvault certificate admin add` * pylint fix * Rerun tests from instance 7. See test_results_None_latest_7.parallel.xml for details * Rerun tests from instance 1. See test_results_None_latest_1.serial.xml for details * Rerun tests from instance 2. See test_results_None_latest_2.parallel.xml for details * Rerun tests from instance 3. See test_results_None_latest_3.parallel.xml for details * pylint fix * fix validator for cert policy * fix recordings * fix recordings * Rerun tests from instance 3. See test_results_None_latest_3.parallel.xml for details * fix recordings * fix recordings * fix recordings * fix recordings * fix recordings * old api version keyvault has no soft delete * old api version keyvault mgmt plane has no soft delete * try to fix recording again * BREAKING CHANGE: pending not return by SDK anymore as it is an additional property, should not manually add it, user can use `az keyvault certificate pending show` to find it. * fix recording --------- Co-authored-by: Azure CLI Team <AzPyCLI@microsoft.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related command
Description
Migrate to azure-keyvault-certificates==4.7.0 and azure-keyvault-secrets==4.7.0
Testing Guide
History Notes
[Keyvault] BREAKING CHANGE:
az keyvault certificate show/set-attributes/import: No longer returnx509CertificateProperties.basicConstraints,pending[Keyvault] BREAKING CHANGE:
az keyvault certificate contact delete: Return an empty list instead of the deleted contact for consistency if the operation would remove the last contact[Keyvault] BREAKING CHANGE:
az keyvault certificate issuer create:organizationDetails.zipis no longer returned by serivce, use 0 as the defaultThis checklist is used to make sure that common guidelines for a pull request are followed.
The PR title and description has followed the guideline in Submitting Pull Requests.
I adhere to the Command Guidelines.
I adhere to the Error Handling Guidelines.