-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[Backup] Add IaasVM ALR/OLR support #21643
Conversation
Backup |
if not restore_as_unmanaged_disks and target_resource_group is None: | ||
logger.warning( | ||
if restore_as_unmanaged_disks and target_resource_group is not None: | ||
raise CLIError( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we use the specific error type instead of CLIError
?
if schedule_run_frequency == 'Hourly': | ||
raise InvalidArgumentValueError( | ||
""" | ||
Hourly IaasVM backups are not allowed from CLI currently. Please try using portal experience for the same. | ||
""") | ||
|
||
# Validating range of days input | ||
if schedule_run_frequency == 'Weekly' and retention_range_in_days != 5: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if schedule_run_frequency == 'Hourly':
if schedule_run_frequency == 'Weekly'
Could we define enumerations or constants for the values of these variables to facilitate reuse?
self.check("length(@)", 2) | ||
self.check("length(@)", 1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is it modified here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed a redundant test case from the test. So had to change it.
@akshayneema Are these what you want to write into the history notes? If so, please put the content you want to write into history notes under |
Description
az backup restore restore-disks
: Added support for Original Location Restore and Alternate Location Restore (creating new VM)az backup policy create/set/list
: Added support for creating and selectively listing Enhanced policiesaz backup protection enable-for-vm
: Added support for Trusted VM configure protection with Enhanced policiesTesting Guide
IaasVM OLR -
az backup restore restore-disks -g {rg} -v {vault} -c {vm} -i {vm} -r {rp} --storage-account {sa} --restore-mode OriginalLocation
IaasVM ALR -
az backup restore restore-disks -g {rg} -v {vault} -c {vm} -i {vm} -r {rp} --storage-account {sa} --restore-mode AlternateLocation --target-vm-name {target_vm_name} --target-vnet-name {vnet_name} --target-subnet-name {subnet_name} --target-vnet-resource-group {target_rg} -t {target_rg}
Selectively listing Enhanced policy -
az backup policy list -g {rg} -v {vault} --policy-sub-type Enhanced
History Notes
[Backup] List commands multi-page response bug fix
[Backup]
az backup restore restore-disks
: Add support for Original Location Restore and Alternate Location Restore[Backup]
az backup policy create/set/list
: Add support for creating and selectively listing Enhanced policies[Backup]
az backup protection enable-for-vm
: Add support for Trusted VM configure protection with Enhanced policiesThis 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.