[BACKUP] Add CRR functionality for IaaSVM and other CRR commands#16557
Merged
fengzhou-msft merged 10 commits intoAzure:devfrom Jan 25, 2021
Merged
[BACKUP] Add CRR functionality for IaaSVM and other CRR commands#16557fengzhou-msft merged 10 commits intoAzure:devfrom
fengzhou-msft merged 10 commits intoAzure:devfrom
Conversation
Collaborator
|
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.') |
Member
There was a problem hiding this comment.
cross_region_restore_flag will be treated as a str, you may need to convert it to bool before you pass it to SDK.
Contributor
Author
There was a problem hiding this comment.
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.') |
Member
There was a problem hiding this comment.
This seems to be a command behavior switch, not a resource property. It's recommended to use action='store_true' for such cases.
Contributor
Author
There was a problem hiding this comment.
Did the changes. Please review once.
Comment on lines
+37
to
+41
| secondary_region_map = {"eastasia": "southeastasia", | ||
| "southeastasia": "eastasia", | ||
| "australiaeast": "australiasoutheast", | ||
| "australiasoutheast": "australiaeast", | ||
| "australiacentral": "australiacentral2", |
Member
There was a problem hiding this comment.
AKS also has a similar map. It is the same or may be different for different RPs?
Contributor
Author
There was a problem hiding this comment.
No, it seems to be a different map.
fengzhou-msft
approved these changes
Jan 25, 2021
kairu-ms
approved these changes
Jan 25, 2021
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.
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.