From 29bd4564590f9019b47f7e4005ccbf5fdbd3b2c4 Mon Sep 17 00:00:00 2001 From: Shubham Chaudhari Date: Tue, 4 Apr 2023 12:20:12 +0530 Subject: [PATCH 1/6] Breaking change --- src/azure-cli/azure/cli/command_modules/eventhubs/custom.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/azure-cli/azure/cli/command_modules/eventhubs/custom.py b/src/azure-cli/azure/cli/command_modules/eventhubs/custom.py index 735d40d923e..75c89162c0c 100644 --- a/src/azure-cli/azure/cli/command_modules/eventhubs/custom.py +++ b/src/azure-cli/azure/cli/command_modules/eventhubs/custom.py @@ -622,6 +622,9 @@ def cli_remove_appgroup_policy(client, resource_group_name, namespace_name, appl appGroup = client.get(resource_group_name, namespace_name, application_group_name) + logger.warning( + 'Parameter metric-id,rate-limit-threshold would not be required for a command eventhub application-group policy remove in future release ' + 'and the new policy remove cmdlets will br contain only name.') if appGroup.policies: for policy_object in throttling_policy_config: if policy_object in appGroup.policies: From 5219bbb56a675f34ced704401cf595537419f701 Mon Sep 17 00:00:00 2001 From: Shubham Chaudhari Date: Tue, 4 Apr 2023 12:36:48 +0530 Subject: [PATCH 2/6] updates --- src/azure-cli/azure/cli/command_modules/eventhubs/custom.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/azure-cli/azure/cli/command_modules/eventhubs/custom.py b/src/azure-cli/azure/cli/command_modules/eventhubs/custom.py index 75c89162c0c..4796f93ce92 100644 --- a/src/azure-cli/azure/cli/command_modules/eventhubs/custom.py +++ b/src/azure-cli/azure/cli/command_modules/eventhubs/custom.py @@ -623,8 +623,8 @@ def cli_remove_appgroup_policy(client, resource_group_name, namespace_name, appl appGroup = client.get(resource_group_name, namespace_name, application_group_name) logger.warning( - 'Parameter metric-id,rate-limit-threshold would not be required for a command eventhub application-group policy remove in future release ' - 'and the new policy remove cmdlets will br contain only name.') + 'the policy remove policy cmdlets will do removals based on policy name') + if appGroup.policies: for policy_object in throttling_policy_config: if policy_object in appGroup.policies: From 16ac11f24397c47fec767dc80e6979593088d949 Mon Sep 17 00:00:00 2001 From: Shubham Chaudhari Date: Tue, 4 Apr 2023 13:55:09 +0530 Subject: [PATCH 3/6] CI's fixed --- src/azure-cli/azure/cli/command_modules/eventhubs/custom.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/azure-cli/azure/cli/command_modules/eventhubs/custom.py b/src/azure-cli/azure/cli/command_modules/eventhubs/custom.py index 4796f93ce92..5317309ce0e 100644 --- a/src/azure-cli/azure/cli/command_modules/eventhubs/custom.py +++ b/src/azure-cli/azure/cli/command_modules/eventhubs/custom.py @@ -621,10 +621,8 @@ def cli_remove_appgroup_policy(client, resource_group_name, namespace_name, appl from azure.cli.core import CLIError appGroup = client.get(resource_group_name, namespace_name, application_group_name) - logger.warning( 'the policy remove policy cmdlets will do removals based on policy name') - if appGroup.policies: for policy_object in throttling_policy_config: if policy_object in appGroup.policies: From e745ee430fc31fe7db0f04449befd56168511cde Mon Sep 17 00:00:00 2001 From: schaudhari6254888 <111409694+schaudhari6254888@users.noreply.github.com> Date: Tue, 11 Apr 2023 13:59:37 +0530 Subject: [PATCH 4/6] Update src/azure-cli/azure/cli/command_modules/eventhubs/custom.py Co-authored-by: Yishi Wang --- src/azure-cli/azure/cli/command_modules/eventhubs/custom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/azure-cli/azure/cli/command_modules/eventhubs/custom.py b/src/azure-cli/azure/cli/command_modules/eventhubs/custom.py index 5317309ce0e..75e31045786 100644 --- a/src/azure-cli/azure/cli/command_modules/eventhubs/custom.py +++ b/src/azure-cli/azure/cli/command_modules/eventhubs/custom.py @@ -622,7 +622,7 @@ def cli_remove_appgroup_policy(client, resource_group_name, namespace_name, appl appGroup = client.get(resource_group_name, namespace_name, application_group_name) logger.warning( - 'the policy remove policy cmdlets will do removals based on policy name') + 'This operation will do removals based on policy name') if appGroup.policies: for policy_object in throttling_policy_config: if policy_object in appGroup.policies: From 7c820068cb9afae09387db1a0b8f318b0b15e19b Mon Sep 17 00:00:00 2001 From: Shubham Chaudhari Date: Wed, 12 Apr 2023 15:39:11 +0530 Subject: [PATCH 5/6] Updates --- src/azure-cli/azure/cli/command_modules/eventhubs/custom.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/azure-cli/azure/cli/command_modules/eventhubs/custom.py b/src/azure-cli/azure/cli/command_modules/eventhubs/custom.py index 75e31045786..23079b0b004 100644 --- a/src/azure-cli/azure/cli/command_modules/eventhubs/custom.py +++ b/src/azure-cli/azure/cli/command_modules/eventhubs/custom.py @@ -622,7 +622,8 @@ def cli_remove_appgroup_policy(client, resource_group_name, namespace_name, appl appGroup = client.get(resource_group_name, namespace_name, application_group_name) logger.warning( - 'This operation will do removals based on policy name') + 'This operation will do removals based on policy name. Will not accept metric-id,rate-limit-threshold in the future.' + 'Also throttling_policy_config will replace with policy only.') if appGroup.policies: for policy_object in throttling_policy_config: if policy_object in appGroup.policies: From cc040ad4247dcdb3b2fa4cc6dd7a710b40c87498 Mon Sep 17 00:00:00 2001 From: Shubham Chaudhari Date: Wed, 12 Apr 2023 15:41:12 +0530 Subject: [PATCH 6/6] Updates --- src/azure-cli/azure/cli/command_modules/eventhubs/custom.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/azure-cli/azure/cli/command_modules/eventhubs/custom.py b/src/azure-cli/azure/cli/command_modules/eventhubs/custom.py index 23079b0b004..51a5667deff 100644 --- a/src/azure-cli/azure/cli/command_modules/eventhubs/custom.py +++ b/src/azure-cli/azure/cli/command_modules/eventhubs/custom.py @@ -622,8 +622,8 @@ def cli_remove_appgroup_policy(client, resource_group_name, namespace_name, appl appGroup = client.get(resource_group_name, namespace_name, application_group_name) logger.warning( - 'This operation will do removals based on policy name. Will not accept metric-id,rate-limit-threshold in the future.' - 'Also throttling_policy_config will replace with policy only.') + 'This operation will do removals based on policy name. Will not accept metric-id,rate-limit-threshold in the future in future release.' + 'Also throttling_policy_config parameter will replace with "policy" in same future release.') if appGroup.policies: for policy_object in throttling_policy_config: if policy_object in appGroup.policies: