-
Notifications
You must be signed in to change notification settings - Fork 3.3k
{EventGrid}: Make identity optional for system-topic in global location and some tests #17898
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
Conversation
| storage_system_topic_name_regional = self.create_random_name(prefix='cli', length=40) | ||
| policy_system_topic_name_global = 'policy-system-topic-name-global' | ||
|
|
||
| storage_account = '/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/devexprg/providers/Microsoft.Storage/storageAccounts/clistgaccount' |
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.
Can you use @StorageAccountPreparer() to create a new storage account with random name instead of fixed storage account?
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.
We have some requirements on the storageaccount so we have one setup for all our tests specifically. i'm reusing that.
| identity=None): | ||
|
|
||
| identity_info = _get_identity_info(identity) | ||
| identity_info = _get_identity_info_only_if_not_none(identity) |
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.
Does domain_create_or_update need the same change(L253)?
azure-cli/src/azure-cli/azure/cli/command_modules/eventgrid/custom.py
Lines 231 to 262 in 8c04af8
| def cli_domain_create_or_update( | |
| client, | |
| resource_group_name, | |
| domain_name, | |
| location=None, | |
| tags=None, | |
| input_schema=EVENTGRID_SCHEMA, | |
| input_mapping_fields=None, | |
| input_mapping_default_values=None, | |
| public_network_access=None, | |
| inbound_ip_rules=None, | |
| sku=SKU_BASIC, | |
| identity=None): | |
| final_input_schema, input_schema_mapping = _get_input_schema_and_mapping( | |
| input_schema, | |
| input_mapping_fields, | |
| input_mapping_default_values) | |
| sku_name = _get_sku(sku) | |
| sku_info = ResourceSku(name=sku_name) | |
| identity_info = None | |
| identity_info = _get_identity_info(identity) | |
| domain_info = Domain( | |
| location=location, | |
| tags=tags, | |
| input_schema=final_input_schema, | |
| input_schema_mapping=input_schema_mapping, | |
| public_network_access=public_network_access, | |
| inbound_ip_rules=inbound_ip_rules, | |
| sku=sku_info, | |
| identity=identity_info) |
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. this change is needed under some system-topics which are global.
Do not send identity for global system-topic
az eventgrid system-topic --name --location global --topic-type --source --resource-group
Added tests for some of the features introduced in 2020-10-15-preview