From f3a84d839d217b1e3593f4f94f294331d62a7b66 Mon Sep 17 00:00:00 2001 From: 00Kai0 Date: Wed, 16 Jun 2021 11:40:08 +0800 Subject: [PATCH 1/2] update logic about accept-terms --- src/azure-cli/azure/cli/command_modules/resource/custom.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/azure-cli/azure/cli/command_modules/resource/custom.py b/src/azure-cli/azure/cli/command_modules/resource/custom.py index e9bc63b8d0e..126428f3bbf 100644 --- a/src/azure-cli/azure/cli/command_modules/resource/custom.py +++ b/src/azure-cli/azure/cli/command_modules/resource/custom.py @@ -1025,9 +1025,7 @@ def _update_provider(cli_ctx, namespace, registering, wait, mg_id=None, accept_t rcf = _resource_client_factory(cli_ctx) is_rpaas = namespace.lower() in RPAAS_APIS if mg_id is None and registering: - if is_rpaas: - if not accept_terms: - raise RequiredArgumentMissingError("--accept-terms must be specified when registering the {} RP from RPaaS.".format(namespace)) + if is_rpaas and accept_terms: wait = True r = rcf.providers.register(namespace) elif mg_id and registering: @@ -1046,7 +1044,7 @@ def _update_provider(cli_ctx, namespace, registering, wait, mg_id=None, accept_t rp_info = rcf.providers.get(namespace) if rp_info.registration_state == target_state: break - if is_rpaas and registering and mg_id is None: + if is_rpaas and accept_terms and registering and mg_id is None: # call accept term API from azure.cli.core.util import send_raw_request send_raw_request(cli_ctx, 'put', RPAAS_APIS[namespace.lower()], body=json.dumps({"properties": {"accepted": True}})) From 0707dd485f83a36b3363ac310e8098d1a2621617 Mon Sep 17 00:00:00 2001 From: 00Kai0 Date: Wed, 16 Jun 2021 17:01:28 +0800 Subject: [PATCH 2/2] fix test --- .../test_provider_registration_rpaas.yaml | 177 ++++++------ ...er_registration_rpaas_no_accept_terms.yaml | 259 ++++++++++++++++++ .../resource/tests/latest/test_resource.py | 23 +- 3 files changed, 368 insertions(+), 91 deletions(-) create mode 100644 src/azure-cli/azure/cli/command_modules/resource/tests/latest/recordings/test_provider_registration_rpaas_no_accept_terms.yaml diff --git a/src/azure-cli/azure/cli/command_modules/resource/tests/latest/recordings/test_provider_registration_rpaas.yaml b/src/azure-cli/azure/cli/command_modules/resource/tests/latest/recordings/test_provider_registration_rpaas.yaml index f0886117b90..ad0b1dffcc4 100644 --- a/src/azure-cli/azure/cli/command_modules/resource/tests/latest/recordings/test_provider_registration_rpaas.yaml +++ b/src/azure-cli/azure/cli/command_modules/resource/tests/latest/recordings/test_provider_registration_rpaas.yaml @@ -13,28 +13,31 @@ interactions: ParameterSetName: - -n User-Agent: - - AZURECLI/2.21.0 azsdk-python-azure-mgmt-resource/16.0.0 Python/3.8.0 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Confluent?api-version=2020-10-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Confluent","namespace":"Microsoft.Confluent","authorizations":[{"applicationId":"1448fd13-7e74-41f4-b6e3-17e485d8ac2e","roleDefinitionId":"4db34280-b0be-4827-aa5b-418391409cee"}],"resourceTypes":[{"resourceType":"operations","locations":[],"apiVersions":["2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"locations","locations":[],"apiVersions":["2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"locations/OperationStatuses","locations":["West + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Confluent","namespace":"Microsoft.Confluent","authorizations":[{"applicationId":"1448fd13-7e74-41f4-b6e3-17e485d8ac2e","roleDefinitionId":"4db34280-b0be-4827-aa5b-418391409cee"}],"resourceTypes":[{"resourceType":"operations","locations":[],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"locations","locations":[],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"locations/OperationStatuses","locations":["West US 2","East US 2 EUAP","Central US EUAP","West Central US","Australia East","France Central","Canada Central","East US","UK South","West Europe","Central US","East - US 2","North Europe","Southeast Asia"],"apiVersions":["2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"organizations","locations":["West + US 2","North Europe","Southeast Asia"],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"organizations","locations":["West US 2","West Central US","Australia East","France Central","Canada Central","East US","UK South","West Europe","Central US","East US 2","North Europe","Southeast - Asia","East US 2 EUAP","Central US EUAP"],"apiVersions":["2020-03-01-preview","2020-03-01"],"capabilities":"SupportsTags, - SupportsLocation"},{"resourceType":"checkNameAvailability","locations":[],"apiVersions":["2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"agreements","locations":[],"apiVersions":["2020-03-01-preview","2020-03-01"],"capabilities":"None"}],"registrationState":"Unregistered","registrationPolicy":"RegistrationRequired"}' + Asia"],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"SupportsTags, + SupportsLocation"},{"resourceType":"checkNameAvailability","locations":[],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"agreements","locations":[],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"validations","locations":["West + US 2","West Central US","Australia East","France Central","Canada Central","East + US","UK South","West Europe","Central US","East US 2","North Europe","Southeast + Asia"],"apiVersions":["2021-03-01-preview"],"capabilities":"None"}],"registrationState":"Unregistered","registrationPolicy":"RegistrationRequired"}' headers: cache-control: - no-cache content-length: - - '1527' + - '1895' content-type: - application/json; charset=utf-8 date: - - Fri, 16 Apr 2021 02:01:27 GMT + - Wed, 16 Jun 2021 08:49:43 GMT expires: - '-1' pragma: @@ -64,28 +67,28 @@ interactions: ParameterSetName: - -n --accept-terms User-Agent: - - AZURECLI/2.21.0 azsdk-python-azure-mgmt-resource/16.0.0 Python/3.8.0 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) method: POST uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Confluent/register?api-version=2020-10-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Confluent","namespace":"Microsoft.Confluent","authorizations":[{"applicationId":"1448fd13-7e74-41f4-b6e3-17e485d8ac2e","roleDefinitionId":"4db34280-b0be-4827-aa5b-418391409cee"}],"resourceTypes":[{"resourceType":"operations","locations":[],"apiVersions":["2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"locations","locations":[],"apiVersions":["2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"locations/OperationStatuses","locations":["West + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Confluent","namespace":"Microsoft.Confluent","authorizations":[{"applicationId":"1448fd13-7e74-41f4-b6e3-17e485d8ac2e","roleDefinitionId":"4db34280-b0be-4827-aa5b-418391409cee"}],"resourceTypes":[{"resourceType":"operations","locations":[],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"locations","locations":[],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"locations/OperationStatuses","locations":["West US 2","East US 2 EUAP","Central US EUAP","West Central US","Australia East","France Central","Canada Central","East US","UK South","West Europe","Central US","East - US 2","North Europe","Southeast Asia"],"apiVersions":["2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"organizations","locations":["West + US 2","North Europe","Southeast Asia"],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"organizations","locations":["West US 2","West Central US","Australia East","France Central","Canada Central","East US","UK South","West Europe","Central US","East US 2","North Europe","Southeast - Asia","East US 2 EUAP","Central US EUAP"],"apiVersions":["2020-03-01-preview","2020-03-01"],"capabilities":"SupportsTags, - SupportsLocation"},{"resourceType":"checkNameAvailability","locations":[],"apiVersions":["2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"agreements","locations":[],"apiVersions":["2020-03-01-preview","2020-03-01"],"capabilities":"None"}],"registrationState":"Registering","registrationPolicy":"RegistrationRequired"}' + Asia"],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"SupportsTags, + SupportsLocation"},{"resourceType":"checkNameAvailability","locations":[],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"agreements","locations":[],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"validations","locations":[],"apiVersions":["2021-03-01-preview"],"capabilities":"None"}],"registrationState":"Registering","registrationPolicy":"RegistrationRequired"}' headers: cache-control: - no-cache content-length: - - '1526' + - '1722' content-type: - application/json; charset=utf-8 date: - - Fri, 16 Apr 2021 02:01:32 GMT + - Wed, 16 Jun 2021 08:49:48 GMT expires: - '-1' pragma: @@ -117,28 +120,28 @@ interactions: ParameterSetName: - -n --accept-terms User-Agent: - - AZURECLI/2.21.0 azsdk-python-azure-mgmt-resource/16.0.0 Python/3.8.0 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Confluent?api-version=2020-10-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Confluent","namespace":"Microsoft.Confluent","authorizations":[{"applicationId":"1448fd13-7e74-41f4-b6e3-17e485d8ac2e","roleDefinitionId":"4db34280-b0be-4827-aa5b-418391409cee"}],"resourceTypes":[{"resourceType":"operations","locations":[],"apiVersions":["2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"locations","locations":[],"apiVersions":["2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"locations/OperationStatuses","locations":["West + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Confluent","namespace":"Microsoft.Confluent","authorizations":[{"applicationId":"1448fd13-7e74-41f4-b6e3-17e485d8ac2e","roleDefinitionId":"4db34280-b0be-4827-aa5b-418391409cee"}],"resourceTypes":[{"resourceType":"operations","locations":[],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"locations","locations":[],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"locations/OperationStatuses","locations":["West US 2","East US 2 EUAP","Central US EUAP","West Central US","Australia East","France Central","Canada Central","East US","UK South","West Europe","Central US","East - US 2","North Europe","Southeast Asia"],"apiVersions":["2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"organizations","locations":["West + US 2","North Europe","Southeast Asia"],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"organizations","locations":["West US 2","West Central US","Australia East","France Central","Canada Central","East US","UK South","West Europe","Central US","East US 2","North Europe","Southeast - Asia","East US 2 EUAP","Central US EUAP"],"apiVersions":["2020-03-01-preview","2020-03-01"],"capabilities":"SupportsTags, - SupportsLocation"},{"resourceType":"checkNameAvailability","locations":[],"apiVersions":["2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"agreements","locations":[],"apiVersions":["2020-03-01-preview","2020-03-01"],"capabilities":"None"}],"registrationState":"Registering","registrationPolicy":"RegistrationRequired"}' + Asia"],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"SupportsTags, + SupportsLocation"},{"resourceType":"checkNameAvailability","locations":[],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"agreements","locations":[],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"validations","locations":[],"apiVersions":["2021-03-01-preview"],"capabilities":"None"}],"registrationState":"Registering","registrationPolicy":"RegistrationRequired"}' headers: cache-control: - no-cache content-length: - - '1526' + - '1722' content-type: - application/json; charset=utf-8 date: - - Fri, 16 Apr 2021 02:01:42 GMT + - Wed, 16 Jun 2021 08:49:58 GMT expires: - '-1' pragma: @@ -166,28 +169,28 @@ interactions: ParameterSetName: - -n --accept-terms User-Agent: - - AZURECLI/2.21.0 azsdk-python-azure-mgmt-resource/16.0.0 Python/3.8.0 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Confluent?api-version=2020-10-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Confluent","namespace":"Microsoft.Confluent","authorizations":[{"applicationId":"1448fd13-7e74-41f4-b6e3-17e485d8ac2e","roleDefinitionId":"4db34280-b0be-4827-aa5b-418391409cee"}],"resourceTypes":[{"resourceType":"operations","locations":[],"apiVersions":["2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"locations","locations":[],"apiVersions":["2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"locations/OperationStatuses","locations":["West + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Confluent","namespace":"Microsoft.Confluent","authorizations":[{"applicationId":"1448fd13-7e74-41f4-b6e3-17e485d8ac2e","roleDefinitionId":"4db34280-b0be-4827-aa5b-418391409cee"}],"resourceTypes":[{"resourceType":"operations","locations":[],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"locations","locations":[],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"locations/OperationStatuses","locations":["West US 2","East US 2 EUAP","Central US EUAP","West Central US","Australia East","France Central","Canada Central","East US","UK South","West Europe","Central US","East - US 2","North Europe","Southeast Asia"],"apiVersions":["2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"organizations","locations":["West + US 2","North Europe","Southeast Asia"],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"organizations","locations":["West US 2","West Central US","Australia East","France Central","Canada Central","East US","UK South","West Europe","Central US","East US 2","North Europe","Southeast - Asia","East US 2 EUAP","Central US EUAP"],"apiVersions":["2020-03-01-preview","2020-03-01"],"capabilities":"SupportsTags, - SupportsLocation"},{"resourceType":"checkNameAvailability","locations":[],"apiVersions":["2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"agreements","locations":[],"apiVersions":["2020-03-01-preview","2020-03-01"],"capabilities":"None"}],"registrationState":"Registering","registrationPolicy":"RegistrationRequired"}' + Asia"],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"SupportsTags, + SupportsLocation"},{"resourceType":"checkNameAvailability","locations":[],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"agreements","locations":[],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"validations","locations":[],"apiVersions":["2021-03-01-preview"],"capabilities":"None"}],"registrationState":"Registering","registrationPolicy":"RegistrationRequired"}' headers: cache-control: - no-cache content-length: - - '1526' + - '1722' content-type: - application/json; charset=utf-8 date: - - Fri, 16 Apr 2021 02:01:52 GMT + - Wed, 16 Jun 2021 08:50:08 GMT expires: - '-1' pragma: @@ -215,28 +218,28 @@ interactions: ParameterSetName: - -n --accept-terms User-Agent: - - AZURECLI/2.21.0 azsdk-python-azure-mgmt-resource/16.0.0 Python/3.8.0 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Confluent?api-version=2020-10-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Confluent","namespace":"Microsoft.Confluent","authorizations":[{"applicationId":"1448fd13-7e74-41f4-b6e3-17e485d8ac2e","roleDefinitionId":"4db34280-b0be-4827-aa5b-418391409cee"}],"resourceTypes":[{"resourceType":"operations","locations":[],"apiVersions":["2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"locations","locations":[],"apiVersions":["2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"locations/OperationStatuses","locations":["West + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Confluent","namespace":"Microsoft.Confluent","authorizations":[{"applicationId":"1448fd13-7e74-41f4-b6e3-17e485d8ac2e","roleDefinitionId":"4db34280-b0be-4827-aa5b-418391409cee"}],"resourceTypes":[{"resourceType":"operations","locations":[],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"locations","locations":[],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"locations/OperationStatuses","locations":["West US 2","East US 2 EUAP","Central US EUAP","West Central US","Australia East","France Central","Canada Central","East US","UK South","West Europe","Central US","East - US 2","North Europe","Southeast Asia"],"apiVersions":["2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"organizations","locations":["West + US 2","North Europe","Southeast Asia"],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"organizations","locations":["West US 2","West Central US","Australia East","France Central","Canada Central","East US","UK South","West Europe","Central US","East US 2","North Europe","Southeast - Asia","East US 2 EUAP","Central US EUAP"],"apiVersions":["2020-03-01-preview","2020-03-01"],"capabilities":"SupportsTags, - SupportsLocation"},{"resourceType":"checkNameAvailability","locations":[],"apiVersions":["2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"agreements","locations":[],"apiVersions":["2020-03-01-preview","2020-03-01"],"capabilities":"None"}],"registrationState":"Registering","registrationPolicy":"RegistrationRequired"}' + Asia"],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"SupportsTags, + SupportsLocation"},{"resourceType":"checkNameAvailability","locations":[],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"agreements","locations":[],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"validations","locations":[],"apiVersions":["2021-03-01-preview"],"capabilities":"None"}],"registrationState":"Registering","registrationPolicy":"RegistrationRequired"}' headers: cache-control: - no-cache content-length: - - '1526' + - '1722' content-type: - application/json; charset=utf-8 date: - - Fri, 16 Apr 2021 02:02:02 GMT + - Wed, 16 Jun 2021 08:50:18 GMT expires: - '-1' pragma: @@ -264,28 +267,28 @@ interactions: ParameterSetName: - -n --accept-terms User-Agent: - - AZURECLI/2.21.0 azsdk-python-azure-mgmt-resource/16.0.0 Python/3.8.0 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Confluent?api-version=2020-10-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Confluent","namespace":"Microsoft.Confluent","authorizations":[{"applicationId":"1448fd13-7e74-41f4-b6e3-17e485d8ac2e","roleDefinitionId":"4db34280-b0be-4827-aa5b-418391409cee"}],"resourceTypes":[{"resourceType":"operations","locations":[],"apiVersions":["2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"locations","locations":[],"apiVersions":["2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"locations/OperationStatuses","locations":["West + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Confluent","namespace":"Microsoft.Confluent","authorizations":[{"applicationId":"1448fd13-7e74-41f4-b6e3-17e485d8ac2e","roleDefinitionId":"4db34280-b0be-4827-aa5b-418391409cee"}],"resourceTypes":[{"resourceType":"operations","locations":[],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"locations","locations":[],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"locations/OperationStatuses","locations":["West US 2","East US 2 EUAP","Central US EUAP","West Central US","Australia East","France Central","Canada Central","East US","UK South","West Europe","Central US","East - US 2","North Europe","Southeast Asia"],"apiVersions":["2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"organizations","locations":["West + US 2","North Europe","Southeast Asia"],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"organizations","locations":["West US 2","West Central US","Australia East","France Central","Canada Central","East US","UK South","West Europe","Central US","East US 2","North Europe","Southeast - Asia","East US 2 EUAP","Central US EUAP"],"apiVersions":["2020-03-01-preview","2020-03-01"],"capabilities":"SupportsTags, - SupportsLocation"},{"resourceType":"checkNameAvailability","locations":[],"apiVersions":["2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"agreements","locations":[],"apiVersions":["2020-03-01-preview","2020-03-01"],"capabilities":"None"}],"registrationState":"Registering","registrationPolicy":"RegistrationRequired"}' + Asia"],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"SupportsTags, + SupportsLocation"},{"resourceType":"checkNameAvailability","locations":[],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"agreements","locations":[],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"validations","locations":[],"apiVersions":["2021-03-01-preview"],"capabilities":"None"}],"registrationState":"Registering","registrationPolicy":"RegistrationRequired"}' headers: cache-control: - no-cache content-length: - - '1526' + - '1722' content-type: - application/json; charset=utf-8 date: - - Fri, 16 Apr 2021 02:02:12 GMT + - Wed, 16 Jun 2021 08:50:29 GMT expires: - '-1' pragma: @@ -313,28 +316,28 @@ interactions: ParameterSetName: - -n --accept-terms User-Agent: - - AZURECLI/2.21.0 azsdk-python-azure-mgmt-resource/16.0.0 Python/3.8.0 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Confluent?api-version=2020-10-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Confluent","namespace":"Microsoft.Confluent","authorizations":[{"applicationId":"1448fd13-7e74-41f4-b6e3-17e485d8ac2e","roleDefinitionId":"4db34280-b0be-4827-aa5b-418391409cee"}],"resourceTypes":[{"resourceType":"operations","locations":[],"apiVersions":["2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"locations","locations":[],"apiVersions":["2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"locations/OperationStatuses","locations":["West + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Confluent","namespace":"Microsoft.Confluent","authorizations":[{"applicationId":"1448fd13-7e74-41f4-b6e3-17e485d8ac2e","roleDefinitionId":"4db34280-b0be-4827-aa5b-418391409cee"}],"resourceTypes":[{"resourceType":"operations","locations":[],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"locations","locations":[],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"locations/OperationStatuses","locations":["West US 2","East US 2 EUAP","Central US EUAP","West Central US","Australia East","France Central","Canada Central","East US","UK South","West Europe","Central US","East - US 2","North Europe","Southeast Asia"],"apiVersions":["2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"organizations","locations":["West + US 2","North Europe","Southeast Asia"],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"organizations","locations":["West US 2","West Central US","Australia East","France Central","Canada Central","East US","UK South","West Europe","Central US","East US 2","North Europe","Southeast - Asia","East US 2 EUAP","Central US EUAP"],"apiVersions":["2020-03-01-preview","2020-03-01"],"capabilities":"SupportsTags, - SupportsLocation"},{"resourceType":"checkNameAvailability","locations":[],"apiVersions":["2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"agreements","locations":[],"apiVersions":["2020-03-01-preview","2020-03-01"],"capabilities":"None"}],"registrationState":"Registering","registrationPolicy":"RegistrationRequired"}' + Asia"],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"SupportsTags, + SupportsLocation"},{"resourceType":"checkNameAvailability","locations":[],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"agreements","locations":[],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"validations","locations":[],"apiVersions":["2021-03-01-preview"],"capabilities":"None"}],"registrationState":"Registering","registrationPolicy":"RegistrationRequired"}' headers: cache-control: - no-cache content-length: - - '1526' + - '1722' content-type: - application/json; charset=utf-8 date: - - Fri, 16 Apr 2021 02:02:22 GMT + - Wed, 16 Jun 2021 08:50:39 GMT expires: - '-1' pragma: @@ -362,28 +365,28 @@ interactions: ParameterSetName: - -n --accept-terms User-Agent: - - AZURECLI/2.21.0 azsdk-python-azure-mgmt-resource/16.0.0 Python/3.8.0 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Confluent?api-version=2020-10-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Confluent","namespace":"Microsoft.Confluent","authorizations":[{"applicationId":"1448fd13-7e74-41f4-b6e3-17e485d8ac2e","roleDefinitionId":"4db34280-b0be-4827-aa5b-418391409cee"}],"resourceTypes":[{"resourceType":"operations","locations":[],"apiVersions":["2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"locations","locations":[],"apiVersions":["2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"locations/OperationStatuses","locations":["West + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Confluent","namespace":"Microsoft.Confluent","authorizations":[{"applicationId":"1448fd13-7e74-41f4-b6e3-17e485d8ac2e","roleDefinitionId":"4db34280-b0be-4827-aa5b-418391409cee"}],"resourceTypes":[{"resourceType":"operations","locations":[],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"locations","locations":[],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"locations/OperationStatuses","locations":["West US 2","East US 2 EUAP","Central US EUAP","West Central US","Australia East","France Central","Canada Central","East US","UK South","West Europe","Central US","East - US 2","North Europe","Southeast Asia"],"apiVersions":["2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"organizations","locations":["West + US 2","North Europe","Southeast Asia"],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"organizations","locations":["West US 2","West Central US","Australia East","France Central","Canada Central","East US","UK South","West Europe","Central US","East US 2","North Europe","Southeast - Asia","East US 2 EUAP","Central US EUAP"],"apiVersions":["2020-03-01-preview","2020-03-01"],"capabilities":"SupportsTags, - SupportsLocation"},{"resourceType":"checkNameAvailability","locations":[],"apiVersions":["2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"agreements","locations":[],"apiVersions":["2020-03-01-preview","2020-03-01"],"capabilities":"None"}],"registrationState":"Registering","registrationPolicy":"RegistrationRequired"}' + Asia"],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"SupportsTags, + SupportsLocation"},{"resourceType":"checkNameAvailability","locations":[],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"agreements","locations":[],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"validations","locations":[],"apiVersions":["2021-03-01-preview"],"capabilities":"None"}],"registrationState":"Registering","registrationPolicy":"RegistrationRequired"}' headers: cache-control: - no-cache content-length: - - '1526' + - '1722' content-type: - application/json; charset=utf-8 date: - - Fri, 16 Apr 2021 02:02:32 GMT + - Wed, 16 Jun 2021 08:50:49 GMT expires: - '-1' pragma: @@ -411,28 +414,28 @@ interactions: ParameterSetName: - -n --accept-terms User-Agent: - - AZURECLI/2.21.0 azsdk-python-azure-mgmt-resource/16.0.0 Python/3.8.0 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Confluent?api-version=2020-10-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Confluent","namespace":"Microsoft.Confluent","authorizations":[{"applicationId":"1448fd13-7e74-41f4-b6e3-17e485d8ac2e","roleDefinitionId":"4db34280-b0be-4827-aa5b-418391409cee"}],"resourceTypes":[{"resourceType":"operations","locations":[],"apiVersions":["2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"locations","locations":[],"apiVersions":["2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"locations/OperationStatuses","locations":["West + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Confluent","namespace":"Microsoft.Confluent","authorizations":[{"applicationId":"1448fd13-7e74-41f4-b6e3-17e485d8ac2e","roleDefinitionId":"4db34280-b0be-4827-aa5b-418391409cee"}],"resourceTypes":[{"resourceType":"operations","locations":[],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"locations","locations":[],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"locations/OperationStatuses","locations":["West US 2","East US 2 EUAP","Central US EUAP","West Central US","Australia East","France Central","Canada Central","East US","UK South","West Europe","Central US","East - US 2","North Europe","Southeast Asia"],"apiVersions":["2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"organizations","locations":["West + US 2","North Europe","Southeast Asia"],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"organizations","locations":["West US 2","West Central US","Australia East","France Central","Canada Central","East US","UK South","West Europe","Central US","East US 2","North Europe","Southeast - Asia","East US 2 EUAP","Central US EUAP"],"apiVersions":["2020-03-01-preview","2020-03-01"],"capabilities":"SupportsTags, - SupportsLocation"},{"resourceType":"checkNameAvailability","locations":[],"apiVersions":["2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"agreements","locations":[],"apiVersions":["2020-03-01-preview","2020-03-01"],"capabilities":"None"}],"registrationState":"Registered","registrationPolicy":"RegistrationRequired"}' + Asia"],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"SupportsTags, + SupportsLocation"},{"resourceType":"checkNameAvailability","locations":[],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"agreements","locations":[],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"validations","locations":[],"apiVersions":["2021-03-01-preview"],"capabilities":"None"}],"registrationState":"Registered","registrationPolicy":"RegistrationRequired"}' headers: cache-control: - no-cache content-length: - - '1525' + - '1721' content-type: - application/json; charset=utf-8 date: - - Fri, 16 Apr 2021 02:02:42 GMT + - Wed, 16 Jun 2021 08:50:59 GMT expires: - '-1' pragma: @@ -464,7 +467,7 @@ interactions: ParameterSetName: - -n --accept-terms User-Agent: - - python/3.8.0 (Windows-10-10.0.19041-SP0) AZURECLI/2.21.0 + - python/3.8.3 (Windows-10-10.0.18362-SP0) AZURECLI/2.25.0 method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Confluent/agreements/default?api-version=2020-03-01-preview response: @@ -478,7 +481,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 16 Apr 2021 02:02:44 GMT + - Wed, 16 Jun 2021 08:51:03 GMT expires: - '-1' pragma: @@ -494,7 +497,7 @@ interactions: x-ms-providerhub-traffic: - 'True' x-ms-ratelimit-remaining-subscription-writes: - - '1196' + - '1199' status: code: 200 message: OK @@ -512,28 +515,28 @@ interactions: ParameterSetName: - -n User-Agent: - - AZURECLI/2.21.0 azsdk-python-azure-mgmt-resource/16.0.0 Python/3.8.0 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Confluent?api-version=2020-10-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Confluent","namespace":"Microsoft.Confluent","authorizations":[{"applicationId":"1448fd13-7e74-41f4-b6e3-17e485d8ac2e","roleDefinitionId":"4db34280-b0be-4827-aa5b-418391409cee"}],"resourceTypes":[{"resourceType":"operations","locations":[],"apiVersions":["2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"locations","locations":[],"apiVersions":["2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"locations/OperationStatuses","locations":["West + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Confluent","namespace":"Microsoft.Confluent","authorizations":[{"applicationId":"1448fd13-7e74-41f4-b6e3-17e485d8ac2e","roleDefinitionId":"4db34280-b0be-4827-aa5b-418391409cee"}],"resourceTypes":[{"resourceType":"operations","locations":[],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"locations","locations":[],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"locations/OperationStatuses","locations":["West US 2","East US 2 EUAP","Central US EUAP","West Central US","Australia East","France Central","Canada Central","East US","UK South","West Europe","Central US","East - US 2","North Europe","Southeast Asia"],"apiVersions":["2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"organizations","locations":["West + US 2","North Europe","Southeast Asia"],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"organizations","locations":["West US 2","West Central US","Australia East","France Central","Canada Central","East US","UK South","West Europe","Central US","East US 2","North Europe","Southeast - Asia","East US 2 EUAP","Central US EUAP"],"apiVersions":["2020-03-01-preview","2020-03-01"],"capabilities":"SupportsTags, - SupportsLocation"},{"resourceType":"checkNameAvailability","locations":[],"apiVersions":["2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"agreements","locations":[],"apiVersions":["2020-03-01-preview","2020-03-01"],"capabilities":"None"}],"registrationState":"Registered","registrationPolicy":"RegistrationRequired"}' + Asia"],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"SupportsTags, + SupportsLocation"},{"resourceType":"checkNameAvailability","locations":[],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"agreements","locations":[],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"validations","locations":[],"apiVersions":["2021-03-01-preview"],"capabilities":"None"}],"registrationState":"Registered","registrationPolicy":"RegistrationRequired"}' headers: cache-control: - no-cache content-length: - - '1525' + - '1721' content-type: - application/json; charset=utf-8 date: - - Fri, 16 Apr 2021 02:02:45 GMT + - Wed, 16 Jun 2021 08:51:04 GMT expires: - '-1' pragma: @@ -563,28 +566,28 @@ interactions: ParameterSetName: - -n User-Agent: - - AZURECLI/2.21.0 azsdk-python-azure-mgmt-resource/16.0.0 Python/3.8.0 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) method: POST uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Confluent/unregister?api-version=2020-10-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Confluent","namespace":"Microsoft.Confluent","authorizations":[{"applicationId":"1448fd13-7e74-41f4-b6e3-17e485d8ac2e","roleDefinitionId":"4db34280-b0be-4827-aa5b-418391409cee"}],"resourceTypes":[{"resourceType":"operations","locations":[],"apiVersions":["2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"locations","locations":[],"apiVersions":["2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"locations/OperationStatuses","locations":["West + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Confluent","namespace":"Microsoft.Confluent","authorizations":[{"applicationId":"1448fd13-7e74-41f4-b6e3-17e485d8ac2e","roleDefinitionId":"4db34280-b0be-4827-aa5b-418391409cee"}],"resourceTypes":[{"resourceType":"operations","locations":[],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"locations","locations":[],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"locations/OperationStatuses","locations":["West US 2","East US 2 EUAP","Central US EUAP","West Central US","Australia East","France Central","Canada Central","East US","UK South","West Europe","Central US","East - US 2","North Europe","Southeast Asia"],"apiVersions":["2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"organizations","locations":["West + US 2","North Europe","Southeast Asia"],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"organizations","locations":["West US 2","West Central US","Australia East","France Central","Canada Central","East US","UK South","West Europe","Central US","East US 2","North Europe","Southeast - Asia","East US 2 EUAP","Central US EUAP"],"apiVersions":["2020-03-01-preview","2020-03-01"],"capabilities":"SupportsTags, - SupportsLocation"},{"resourceType":"checkNameAvailability","locations":[],"apiVersions":["2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"agreements","locations":[],"apiVersions":["2020-03-01-preview","2020-03-01"],"capabilities":"None"}],"registrationState":"Unregistering","registrationPolicy":"RegistrationRequired"}' + Asia"],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"SupportsTags, + SupportsLocation"},{"resourceType":"checkNameAvailability","locations":[],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"agreements","locations":[],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"validations","locations":[],"apiVersions":["2021-03-01-preview"],"capabilities":"None"}],"registrationState":"Unregistering","registrationPolicy":"RegistrationRequired"}' headers: cache-control: - no-cache content-length: - - '1528' + - '1724' content-type: - application/json; charset=utf-8 date: - - Fri, 16 Apr 2021 02:02:49 GMT + - Wed, 16 Jun 2021 08:51:08 GMT expires: - '-1' pragma: @@ -616,28 +619,28 @@ interactions: ParameterSetName: - -n User-Agent: - - AZURECLI/2.21.0 azsdk-python-azure-mgmt-resource/16.0.0 Python/3.8.0 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Confluent?api-version=2020-10-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Confluent","namespace":"Microsoft.Confluent","authorizations":[{"applicationId":"1448fd13-7e74-41f4-b6e3-17e485d8ac2e","roleDefinitionId":"4db34280-b0be-4827-aa5b-418391409cee"}],"resourceTypes":[{"resourceType":"operations","locations":[],"apiVersions":["2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"locations","locations":[],"apiVersions":["2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"locations/OperationStatuses","locations":["West + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Confluent","namespace":"Microsoft.Confluent","authorizations":[{"applicationId":"1448fd13-7e74-41f4-b6e3-17e485d8ac2e","roleDefinitionId":"4db34280-b0be-4827-aa5b-418391409cee"}],"resourceTypes":[{"resourceType":"operations","locations":[],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"locations","locations":[],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"locations/OperationStatuses","locations":["West US 2","East US 2 EUAP","Central US EUAP","West Central US","Australia East","France Central","Canada Central","East US","UK South","West Europe","Central US","East - US 2","North Europe","Southeast Asia"],"apiVersions":["2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"organizations","locations":["West + US 2","North Europe","Southeast Asia"],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"organizations","locations":["West US 2","West Central US","Australia East","France Central","Canada Central","East US","UK South","West Europe","Central US","East US 2","North Europe","Southeast - Asia","East US 2 EUAP","Central US EUAP"],"apiVersions":["2020-03-01-preview","2020-03-01"],"capabilities":"SupportsTags, - SupportsLocation"},{"resourceType":"checkNameAvailability","locations":[],"apiVersions":["2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"agreements","locations":[],"apiVersions":["2020-03-01-preview","2020-03-01"],"capabilities":"None"}],"registrationState":"Unregistering","registrationPolicy":"RegistrationRequired"}' + Asia"],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"SupportsTags, + SupportsLocation"},{"resourceType":"checkNameAvailability","locations":[],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"agreements","locations":[],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"validations","locations":[],"apiVersions":["2021-03-01-preview"],"capabilities":"None"}],"registrationState":"Unregistering","registrationPolicy":"RegistrationRequired"}' headers: cache-control: - no-cache content-length: - - '1528' + - '1724' content-type: - application/json; charset=utf-8 date: - - Fri, 16 Apr 2021 02:02:49 GMT + - Wed, 16 Jun 2021 08:51:11 GMT expires: - '-1' pragma: diff --git a/src/azure-cli/azure/cli/command_modules/resource/tests/latest/recordings/test_provider_registration_rpaas_no_accept_terms.yaml b/src/azure-cli/azure/cli/command_modules/resource/tests/latest/recordings/test_provider_registration_rpaas_no_accept_terms.yaml new file mode 100644 index 00000000000..862a11ce60b --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/resource/tests/latest/recordings/test_provider_registration_rpaas_no_accept_terms.yaml @@ -0,0 +1,259 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - provider show + Connection: + - keep-alive + ParameterSetName: + - -n + User-Agent: + - AZURECLI/2.25.0 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Confluent?api-version=2020-10-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Confluent","namespace":"Microsoft.Confluent","authorizations":[{"applicationId":"1448fd13-7e74-41f4-b6e3-17e485d8ac2e","roleDefinitionId":"4db34280-b0be-4827-aa5b-418391409cee"}],"resourceTypes":[{"resourceType":"operations","locations":[],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"locations","locations":[],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"locations/OperationStatuses","locations":["West + US 2","East US 2 EUAP","Central US EUAP","West Central US","Australia East","France + Central","Canada Central","East US","UK South","West Europe","Central US","East + US 2","North Europe","Southeast Asia"],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"organizations","locations":["West + US 2","West Central US","Australia East","France Central","Canada Central","East + US","UK South","West Europe","Central US","East US 2","North Europe","Southeast + Asia"],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"SupportsTags, + SupportsLocation"},{"resourceType":"checkNameAvailability","locations":[],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"agreements","locations":[],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"validations","locations":[],"apiVersions":["2021-03-01-preview"],"capabilities":"None"}],"registrationState":"Unregistered","registrationPolicy":"RegistrationRequired"}' + headers: + cache-control: + - no-cache + content-length: + - '1723' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 16 Jun 2021 08:52:29 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - provider register + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -n + User-Agent: + - AZURECLI/2.25.0 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Confluent/register?api-version=2020-10-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Confluent","namespace":"Microsoft.Confluent","authorizations":[{"applicationId":"1448fd13-7e74-41f4-b6e3-17e485d8ac2e","roleDefinitionId":"4db34280-b0be-4827-aa5b-418391409cee"}],"resourceTypes":[{"resourceType":"operations","locations":[],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"locations","locations":[],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"locations/OperationStatuses","locations":["West + US 2","East US 2 EUAP","Central US EUAP","West Central US","Australia East","France + Central","Canada Central","East US","UK South","West Europe","Central US","East + US 2","North Europe","Southeast Asia"],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"organizations","locations":["West + US 2","West Central US","Australia East","France Central","Canada Central","East + US","UK South","West Europe","Central US","East US 2","North Europe","Southeast + Asia"],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"SupportsTags, + SupportsLocation"},{"resourceType":"checkNameAvailability","locations":[],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"agreements","locations":[],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"validations","locations":[],"apiVersions":["2021-03-01-preview"],"capabilities":"None"}],"registrationState":"Registering","registrationPolicy":"RegistrationRequired"}' + headers: + cache-control: + - no-cache + content-length: + - '1722' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 16 Jun 2021 08:52:32 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - provider show + Connection: + - keep-alive + ParameterSetName: + - -n + User-Agent: + - AZURECLI/2.25.0 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Confluent?api-version=2020-10-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Confluent","namespace":"Microsoft.Confluent","authorizations":[{"applicationId":"1448fd13-7e74-41f4-b6e3-17e485d8ac2e","roleDefinitionId":"4db34280-b0be-4827-aa5b-418391409cee"}],"resourceTypes":[{"resourceType":"operations","locations":[],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"locations","locations":[],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"locations/OperationStatuses","locations":["West + US 2","East US 2 EUAP","Central US EUAP","West Central US","Australia East","France + Central","Canada Central","East US","UK South","West Europe","Central US","East + US 2","North Europe","Southeast Asia"],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"organizations","locations":["West + US 2","West Central US","Australia East","France Central","Canada Central","East + US","UK South","West Europe","Central US","East US 2","North Europe","Southeast + Asia"],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"SupportsTags, + SupportsLocation"},{"resourceType":"checkNameAvailability","locations":[],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"agreements","locations":[],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"validations","locations":[],"apiVersions":["2021-03-01-preview"],"capabilities":"None"}],"registrationState":"Registering","registrationPolicy":"RegistrationRequired"}' + headers: + cache-control: + - no-cache + content-length: + - '1722' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 16 Jun 2021 08:52:33 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - provider unregister + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -n + User-Agent: + - AZURECLI/2.25.0 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Confluent/unregister?api-version=2020-10-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Confluent","namespace":"Microsoft.Confluent","authorizations":[{"applicationId":"1448fd13-7e74-41f4-b6e3-17e485d8ac2e","roleDefinitionId":"4db34280-b0be-4827-aa5b-418391409cee"}],"resourceTypes":[{"resourceType":"operations","locations":[],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"locations","locations":[],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"locations/OperationStatuses","locations":["West + US 2","East US 2 EUAP","Central US EUAP","West Central US","Australia East","France + Central","Canada Central","East US","UK South","West Europe","Central US","East + US 2","North Europe","Southeast Asia"],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"organizations","locations":["West + US 2","West Central US","Australia East","France Central","Canada Central","East + US","UK South","West Europe","Central US","East US 2","North Europe","Southeast + Asia"],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"SupportsTags, + SupportsLocation"},{"resourceType":"checkNameAvailability","locations":[],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"agreements","locations":[],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"validations","locations":[],"apiVersions":["2021-03-01-preview"],"capabilities":"None"}],"registrationState":"Unregistering","registrationPolicy":"RegistrationRequired"}' + headers: + cache-control: + - no-cache + content-length: + - '1724' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 16 Jun 2021 08:52:38 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - provider show + Connection: + - keep-alive + ParameterSetName: + - -n + User-Agent: + - AZURECLI/2.25.0 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Confluent?api-version=2020-10-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Confluent","namespace":"Microsoft.Confluent","authorizations":[{"applicationId":"1448fd13-7e74-41f4-b6e3-17e485d8ac2e","roleDefinitionId":"4db34280-b0be-4827-aa5b-418391409cee"}],"resourceTypes":[{"resourceType":"operations","locations":[],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"locations","locations":[],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"locations/OperationStatuses","locations":["West + US 2","East US 2 EUAP","Central US EUAP","West Central US","Australia East","France + Central","Canada Central","East US","UK South","West Europe","Central US","East + US 2","North Europe","Southeast Asia"],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"organizations","locations":["West + US 2","West Central US","Australia East","France Central","Canada Central","East + US","UK South","West Europe","Central US","East US 2","North Europe","Southeast + Asia"],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"SupportsTags, + SupportsLocation"},{"resourceType":"checkNameAvailability","locations":[],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"agreements","locations":[],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"validations","locations":[],"apiVersions":["2021-03-01-preview"],"capabilities":"None"}],"registrationState":"Unregistering","registrationPolicy":"RegistrationRequired"}' + headers: + cache-control: + - no-cache + content-length: + - '1724' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 16 Jun 2021 08:52:39 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +version: 1 diff --git a/src/azure-cli/azure/cli/command_modules/resource/tests/latest/test_resource.py b/src/azure-cli/azure/cli/command_modules/resource/tests/latest/test_resource.py index d859f52116d..bb16d8e43ad 100644 --- a/src/azure-cli/azure/cli/command_modules/resource/tests/latest/test_resource.py +++ b/src/azure-cli/azure/cli/command_modules/resource/tests/latest/test_resource.py @@ -657,8 +657,6 @@ def test_provider_registration_rpaas(self): result = self.cmd('provider show -n {prov}').get_output_in_json() if result['registrationState'] == 'Unregistered': - with self.assertRaisesRegexp(CLIError, '--accept-terms must be specified'): - self.cmd('provider register -n {prov}') self.cmd('provider register -n {prov} --accept-terms') result = self.cmd('provider show -n {prov}').get_output_in_json() self.assertTrue(result['registrationState'], 'Registered') @@ -669,12 +667,29 @@ def test_provider_registration_rpaas(self): self.cmd('provider unregister -n {prov}') result = self.cmd('provider show -n {prov}').get_output_in_json() self.assertTrue(result['registrationState'] in ['Unregistering', 'Unregistered']) - with self.assertRaisesRegexp(CLIError, '--accept-terms must be specified'): - self.cmd('provider register -n {prov}') self.cmd('provider register -n {prov} --accept-terms') result = self.cmd('provider show -n {prov}').get_output_in_json() self.assertTrue(result['registrationState'], 'Registered') + def test_provider_registration_rpaas_no_accept_terms(self): + self.kwargs.update({'prov': 'Microsoft.Confluent'}) + + result = self.cmd('provider show -n {prov}').get_output_in_json() + if result['registrationState'] == 'Unregistered': + self.cmd('provider register -n {prov}') + result = self.cmd('provider show -n {prov}').get_output_in_json() + self.assertTrue(result['registrationState'], 'Registered') + self.cmd('provider unregister -n {prov}') + result = self.cmd('provider show -n {prov}').get_output_in_json() + self.assertTrue(result['registrationState'] in ['Unregistering', 'Unregistered']) + else: + self.cmd('provider unregister -n {prov}') + result = self.cmd('provider show -n {prov}').get_output_in_json() + self.assertTrue(result['registrationState'] in ['Unregistering', 'Unregistered']) + self.cmd('provider register -n {prov}') + result = self.cmd('provider show -n {prov}').get_output_in_json() + self.assertTrue(result['registrationState'], 'Registered') + def test_provider_registration_mg(self): self.kwargs.update({'prov': 'Microsoft.ClassicInfrastructureMigrate'})