-
Notifications
You must be signed in to change notification settings - Fork 3.3k
{Storage} az storage share-rm: Add process_resource_group for resource group #12232
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -65,13 +65,15 @@ def _cancel_timer_event_handler(_, **__): | |
|
|
||
|
|
||
| # region PARAMETER VALIDATORS | ||
| def parse_storage_account(namespace): | ||
| def parse_storage_account(cmd, namespace): | ||
| """Parse storage account which can be either account name or account id""" | ||
| from msrestazure.tools import parse_resource_id, is_valid_resource_id | ||
|
|
||
| if namespace.account_name and is_valid_resource_id(namespace.account_name): | ||
| namespace.resource_group_name = parse_resource_id(namespace.account_name)['resource_group'] | ||
| namespace.account_name = parse_resource_id(namespace.account_name)['name'] | ||
| elif not namespace.resource_group_name: | ||
|
||
| namespace.resource_group_name = _query_account_rg(cmd.cli_ctx, namespace.account_name)[0] | ||
|
|
||
|
|
||
| def process_resource_group(cmd, namespace): | ||
|
|
||
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.
storage_account_type already adds validator to parse for resource group name.
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.
Is it better to add the logic to validator for storage_account_type instead of another validator?