Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[KeyVault] Add Status Methods to Query Backup and Restore Operations #14158

Merged
merged 5 commits into from
Oct 2, 2020

Conversation

mccoyp
Copy link
Member

@mccoyp mccoyp commented Oct 1, 2020

Closes #13718.

Adds methods to KeyVaultBackupClient for checking backup and restore operation status. We may want to create a new polling class to make getting job IDs (that are necessary for these methods) easier to obtain.

@mccoyp mccoyp added KeyVault Client This issue points to a problem in the data-plane of the library. labels Oct 1, 2020
@mccoyp mccoyp added this to the [2020] October milestone Oct 1, 2020
@@ -61,14 +75,28 @@ def test_selective_key_restore(self, container_uri, sas_token):
# backup the vault
backup_client = KeyVaultBackupClient(self.managed_hsm["url"], self.credential)
backup_poller = backup_client.begin_full_backup(container_uri, sas_token)

# check backup status and result
job_id = backup_poller.polling_method().resource().id
Copy link
Contributor

Choose a reason for hiding this comment

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

#14169 tracks improving this

return await self._client.restore_status(
vault_base_url=self._vault_url,
job_id=job_id,
cls=RestoreOperation._wrap_generated,
Copy link
Contributor

Choose a reason for hiding this comment

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

Just a general comment with no action for this PR: interestingly, we can't learn whether the operation is selective from the job ID or the service's status response. We therefore can't know whether to choose RestoreOperation or SelectiveKeyRestoreOperation here. Further reason to merge those classes, I suppose.

README.md Outdated Show resolved Hide resolved
@mccoyp mccoyp requested a review from chlowell October 2, 2020 17:03
@mccoyp mccoyp merged commit 51049f5 into Azure:master Oct 2, 2020
@mccoyp mccoyp deleted the backuprestore branch October 2, 2020 18:57
iscai-msft added a commit that referenced this pull request Oct 7, 2020
…into fr-business-cards

* 'master' of https://github.com/Azure/azure-sdk-for-python: (71 commits)
  move the environment prep above the tooling that needs it (#14246)
  Increment version for appconfiguration releases (#14245)
  Azure Communication Service - Phone Number Administration (#14237)
  [text analytics] fix query param in cli call to get endpoint (#14243)
  Resolve Failing Documentation Build for azure-mgmt-core (#14239)
  Add code reviewers (#14229)
  [ServiceBus] make amqp_message properties read-only (#14095)
  [ServiceBus]remove topic parameter object settability (#14116)
  app config owner (#12986)
  [KeyVault] Handle Role Definition UUID Name Internally (#14218)
  Increment version for storage releases (#14224)
  Update Key Vault changelogs for October release (#14226)
  [ServiceBus] CI Test hotfixes (#14195)
  [text analytics] regen TA with GA autorest (#14215)
  [Storage][STG74]ChangeLog (#14192)
  fixes python 2.7 issue with unicode and strings again! (#14216)
  Feature/storage stg74 (#14175)
  Update communication pacakges to version b2 (#14209)
  [KeyVault] Add Status Methods to Query Backup and Restore Operations (#14158)
  Update buffered sender (#13851)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Client This issue points to a problem in the data-plane of the library. KeyVault
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow status of backup and restore operations to be queried
3 participants