-
Notifications
You must be signed in to change notification settings - Fork 3.3k
[BACKUP] Add CRR functionality for IaaSVM and other CRR commands #16557
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 CRR functionality for IaaSVM and other CRR commands #16557
Conversation
|
BACKUP |
| with self.argument_context('backup vault backup-properties set') as c: | ||
| c.argument('backup_storage_redundancy', arg_type=get_enum_type(['GeoRedundant', 'LocallyRedundant']), help='Sets backup storage properties for a Recovery Services vault.') | ||
| c.argument('soft_delete_feature_state', arg_type=get_enum_type(['Enable', 'Disable']), help='Set soft-delete feature state for a Recovery Services Vault.') | ||
| c.argument('cross_region_restore_flag', arg_type=get_enum_type(["True", "False"]), help='Set cross-region-restore feature state for a Recovery Services Vault. Default: False.') |
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.
cross_region_restore_flag will be treated as a str, you may need to convert it to bool before you pass it to SDK.
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.
Did the changes. Please review once.
| with self.argument_context('backup container show') as c: | ||
| c.argument('name', container_name_type, options_list=['--name', '-n'], help='Name of the container. You can use the backup container list command to get the name of a container.') | ||
| c.argument('backup_management_type', backup_management_type) | ||
| c.argument('use_secondary_region', arg_type=get_three_state_flag(), help='Use this flag to show container in secondary region. Default: false.') |
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.
This seems to be a command behavior switch, not a resource property. It's recommended to use action='store_true' for such cases.
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.
Did the changes. Please review once.
| secondary_region_map = {"eastasia": "southeastasia", | ||
| "southeastasia": "eastasia", | ||
| "australiaeast": "australiasoutheast", | ||
| "australiasoutheast": "australiaeast", | ||
| "australiacentral": "australiacentral2", |
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.
AKS also has a similar map. It is the same or may be different for different RPs?
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.
No, it seems to be a different map.
Description
Added Cross Region Restore functionality in the CLI command for IaaSVM restore(restore-disks). Added other CRR commands for enabling CRR on a vault, list/show containers in secondary region, list/show items in secondary region, list/show RPs in secondary region, list/show jobs in secondary region, etc. azure-mgmt-recoveryservicesbackup SDK version has been updated to 0.11.0 from 0.6.0 for the same.
Testing Guide
History Notes
[Component Name 1] BREAKING CHANGE: az command a: Make some customer-facing breaking change.
[Component Name 2] az command b: Add some customer-facing feature.
This 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.