diff --git a/linter_exclusions.yml b/linter_exclusions.yml index 2e76f787c7f..ac9383f0aaa 100644 --- a/linter_exclusions.yml +++ b/linter_exclusions.yml @@ -2345,6 +2345,36 @@ ssh arc: ssh_args: rule_exclusions: - no_positional_parameters +stack-hci arc-setting create: + parameters: + arc_application_client_id: + rule_exclusions: + - option_length_too_long + arc_application_object_id: + rule_exclusions: + - option_length_too_long + arc_application_tenant_id: + rule_exclusions: + - option_length_too_long + arc_service_principal_object_id: + rule_exclusions: + - option_length_too_long + connectivity_properties: + rule_exclusions: + - option_length_too_long +stack-hci arc-setting update: + parameters: + connectivity_properties: + rule_exclusions: + - option_length_too_long +stack-hci cluster create: + parameters: + aad_application_object_id: + rule_exclusions: + - option_length_too_long + aad_service_principal_object_id: + rule_exclusions: + - option_length_too_long storage account create: parameters: hierarchical_namespace: diff --git a/src/stack-hci/HISTORY.rst b/src/stack-hci/HISTORY.rst index 7307bcc0e20..7552bc96719 100644 --- a/src/stack-hci/HISTORY.rst +++ b/src/stack-hci/HISTORY.rst @@ -3,6 +3,14 @@ Release History =============== +0.1.6 +++++++ +* Upgrade api-version to 2022-05-01 +* Add new command `az stack-hci arc-setting update` to support updating arc settings for HCI cluster +* Add new command `az stack-hci arc-setting create-identity` to support creating aad identity for arc settings +* Add new command `az stack-hci arc-setting generate-password` to support generating password for arc settings +* Add new command `az stack-hci cluster create-identity` to support creating cluster identity + 0.1.5 ++++++ * Support arc setting management diff --git a/src/stack-hci/README.md b/src/stack-hci/README.md index 68264818f33..7a47abbfc01 100644 --- a/src/stack-hci/README.md +++ b/src/stack-hci/README.md @@ -1,5 +1,5 @@ # Azure CLI stack-hci Extension # -This package is for the 'stack-hci' extension, i.e. 'az stack-hci' +This is the extension for stack-hci ### How to use ### Install this extension using the below CLI command @@ -7,45 +7,91 @@ Install this extension using the below CLI command az extension add --name stack-hci ``` -### Included Features -#### Stack HCI Management: -Manage Stack HCI: [more info](https://docs.microsoft.com/en-us/azure-stack/hci/) \ -*Examples:* - -##### Create an HCI cluster +### Included Features ### +#### stack-hci arc-setting #### +##### Create ##### ``` -az stack-hci cluster create \ - --location "East US" \ - --aad-client-id "24a6e53d-04e5-44d2-b7cc-1b732a847dfc" \ - --aad-tenant-id "7e589cc1-a8b6-4dff-91bd-5ec0fa18db94" \ - --name "myCluster" \ - --resource-group "test-rg" +az stack-hci arc-setting create --name "default" --cluster-name "myCluster" --resource-group "test-rg" ``` - -##### Delete an HCI cluster +##### Show ##### ``` -az stack-hci cluster delete --name "myCluster" --resource-group "test-rg" +az stack-hci arc-setting show --name "default" --cluster-name "myCluster" --resource-group "test-rg" ``` - -##### List the HCI clusters +##### List ##### +``` +az stack-hci arc-setting list --cluster-name "myCluster" --resource-group "test-rg" +``` +##### Update ##### +``` +az stack-hci arc-setting update --connectivity-properties "{\\"enabled\\":true}" --name "default" \ + --cluster-name "myCluster" --resource-group "test-rg" +``` +##### Create-identity ##### +``` +az stack-hci arc-setting create-identity --name "default" --cluster-name "myCluster" --resource-group "test-rg" +``` +##### Generate-password ##### +``` +az stack-hci arc-setting generate-password --name "default" --cluster-name "myCluster" --resource-group "test-rg" +``` +##### Delete ##### +``` +az stack-hci arc-setting delete --name "default" --cluster-name "myCluster" --resource-group "test-rg" ``` -az stack-hci cluster list +#### stack-hci cluster #### +##### Create ##### ``` +az stack-hci cluster create --location "East US" --aad-client-id "24a6e53d-04e5-44d2-b7cc-1b732a847dfc" \ + --aad-tenant-id "7e589cc1-a8b6-4dff-91bd-5ec0fa18db94" \ + --endpoint "https://98294836-31be-4668-aeae-698667faf99b.waconazure.com" --name "myCluster" \ + --resource-group "test-rg" +``` +##### Show ##### +``` +az stack-hci cluster show --name "myCluster" --resource-group "test-rg" +``` +##### List ##### ``` az stack-hci cluster list --resource-group "test-rg" ``` +##### Update ##### +``` +az stack-hci cluster update --endpoint "https://98294836-31be-4668-aeae-698667faf99b.waconazure.com" \ + --desired-properties diagnostic-level="Basic" windows-server-subscription="Enabled" \ + --tags tag1="value1" tag2="value2" --name "myCluster" --resource-group "test-rg" +``` +##### Create-identity ##### ``` -az stack-hci cluster list --subscription "test-sub" +az stack-hci cluster create-identity --name "myCluster" --resource-group "test-rg" ``` -##### Get details about the specified HCI cluster +##### Delete ##### ``` -az stack-hci cluster show --name "myCluster" --resource-group "test-rg" +az stack-hci cluster delete --name "myCluster" --resource-group "test-rg" ``` +#### stack-hci extension #### +##### Create ##### +``` +az stack-hci extension create --arc-setting-name "default" --cluster-name "myCluster" \ + --type "MicrosoftMonitoringAgent" --protected-settings "{\\"workspaceKey\\":\\"xx\\"}" \ + --publisher "Microsoft.Compute" --settings "{\\"workspaceId\\":\\"xx\\"}" --type-handler-version "1.10" \ + --name "MicrosoftMonitoringAgent" --resource-group "test-rg" -##### Update an HCI cluster +az stack-hci extension wait --created --arc-setting-name "{myArcSetting}" --cluster-name "{myCluster}" \ + --name "{myExtension}" --resource-group "{rg}" +``` +##### Show ##### ``` -az stack-hci cluster update --tags tag1="value1" tag2="value2" --name "myCluster" --resource-group "test-rg" +az stack-hci extension show --arc-setting-name "default" --cluster-name "myCluster" --name "MicrosoftMonitoringAgent" \ + --resource-group "test-rg" +``` +##### List ##### +``` +az stack-hci extension list --arc-setting-name "default" --cluster-name "myCluster" --resource-group "test-rg" ``` -If you have issues, please give feedback by opening an issue at https://github.com/Azure/azure-cli-extensions/issues. +##### Delete ##### +``` +az stack-hci extension delete --arc-setting-name "default" --cluster-name "myCluster" \ + --name "MicrosoftMonitoringAgent" --resource-group "test-rg" +``` \ No newline at end of file diff --git a/src/stack-hci/azext_stack_hci/generated/_help.py b/src/stack-hci/azext_stack_hci/generated/_help.py index 7536f1f8a6e..9b51df8ed64 100644 --- a/src/stack-hci/azext_stack_hci/generated/_help.py +++ b/src/stack-hci/azext_stack_hci/generated/_help.py @@ -49,6 +49,16 @@ az stack-hci arc-setting create --name "default" --cluster-name "myCluster" --resource-group "test-rg" """ +helps['stack-hci arc-setting update'] = """ + type: command + short-summary: "Update ArcSettings for HCI cluster." + examples: + - name: Patch ArcSetting + text: |- + az stack-hci arc-setting update --connectivity-properties "{\\"enabled\\":true}" --name "default" \ +--cluster-name "myCluster" --resource-group "test-rg" +""" + helps['stack-hci arc-setting delete'] = """ type: command short-summary: "Delete ArcSetting resource details of HCI Cluster." @@ -58,6 +68,26 @@ az stack-hci arc-setting delete --name "default" --cluster-name "myCluster" --resource-group "test-rg" """ +helps['stack-hci arc-setting create-identity'] = """ + type: command + short-summary: "Create Aad identity for arc settings." + examples: + - name: Create Arc Identity + text: |- + az stack-hci arc-setting create-identity --name "default" --cluster-name "myCluster" --resource-group \ +"test-rg" +""" + +helps['stack-hci arc-setting generate-password'] = """ + type: command + short-summary: "Generate password for arc settings." + examples: + - name: Generate Password + text: |- + az stack-hci arc-setting generate-password --name "default" --cluster-name "myCluster" --resource-group \ +"test-rg" +""" + helps['stack-hci arc-setting wait'] = """ type: command short-summary: Place the CLI in a waiting state until a condition of the stack-hci arc-setting is met. @@ -66,6 +96,10 @@ text: |- az stack-hci arc-setting wait --name "default" --cluster-name "myCluster" --resource-group "test-rg" \ --deleted + - name: Pause executing next line of CLI script until the stack-hci arc-setting is successfully created. + text: |- + az stack-hci arc-setting wait --name "default" --cluster-name "myCluster" --resource-group "test-rg" \ +--created """ helps['stack-hci cluster'] = """ @@ -141,6 +175,27 @@ az stack-hci cluster delete --name "myCluster" --resource-group "test-rg" """ +helps['stack-hci cluster create-identity'] = """ + type: command + short-summary: "Create cluster identity." + examples: + - name: Create cluster Identity + text: |- + az stack-hci cluster create-identity --name "myCluster" --resource-group "test-rg" +""" + +helps['stack-hci cluster wait'] = """ + type: command + short-summary: Place the CLI in a waiting state until a condition of the stack-hci cluster is met. + examples: + - name: Pause executing next line of CLI script until the stack-hci cluster is successfully deleted. + text: |- + az stack-hci cluster wait --name "myCluster" --resource-group "test-rg" --deleted + - name: Pause executing next line of CLI script until the stack-hci cluster is successfully created. + text: |- + az stack-hci cluster wait --name "myCluster" --resource-group "test-rg" --created +""" + helps['stack-hci extension'] = """ type: group short-summary: Manage extension with stack hci diff --git a/src/stack-hci/azext_stack_hci/generated/_params.py b/src/stack-hci/azext_stack_hci/generated/_params.py index 0aba401a0cc..aa9e628e26f 100644 --- a/src/stack-hci/azext_stack_hci/generated/_params.py +++ b/src/stack-hci/azext_stack_hci/generated/_params.py @@ -43,6 +43,12 @@ def load_arguments(self, _): 'of the proxy resource holding details of HCI ArcSetting information.') c.argument('arc_instance_resource_group', options_list=['--instance-rg'], type=str, help='The resource group ' 'that hosts the Arc agents, ie. Hybrid Compute Machine resources.') + c.argument('arc_application_client_id', type=str, help='App id of arc AAD identity.') + c.argument('arc_application_tenant_id', type=str, help='Tenant id of arc AAD identity.') + c.argument('arc_service_principal_object_id', type=str, help='Object id of arc AAD service principal.') + c.argument('arc_application_object_id', type=str, help='Object id of arc AAD identity.') + c.argument('connectivity_properties', type=validate_file_or_dict, help='contains connectivity related ' + 'configuration for ARC resources Expected value: json-string/json-file/@json-file.') c.argument('created_by', type=str, help='The identity that created the resource.', arg_group='System Data') c.argument('created_by_type', arg_type=get_enum_type(['User', 'Application', 'ManagedIdentity', 'Key']), help='The type of identity that created the resource.', arg_group='System Data') @@ -54,12 +60,33 @@ def load_arguments(self, _): c.argument('last_modified_at', help='The timestamp of resource last modification (UTC)', arg_group='System ' 'Data') + with self.argument_context('stack-hci arc-setting update') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('cluster_name', type=str, help='The name of the cluster.', id_part='name') + c.argument('arc_setting_name', options_list=['--name', '-n', '--arc-setting-name'], type=str, help='The name ' + 'of the proxy resource holding details of HCI ArcSetting information.', id_part='child_name_1') + c.argument('tags', tags_type) + c.argument('connectivity_properties', type=validate_file_or_dict, help='contains connectivity related ' + 'configuration for ARC resources Expected value: json-string/json-file/@json-file.') + with self.argument_context('stack-hci arc-setting delete') as c: c.argument('resource_group_name', resource_group_name_type) c.argument('cluster_name', type=str, help='The name of the cluster.', id_part='name') c.argument('arc_setting_name', options_list=['--name', '-n', '--arc-setting-name'], type=str, help='The name ' 'of the proxy resource holding details of HCI ArcSetting information.', id_part='child_name_1') + with self.argument_context('stack-hci arc-setting create-identity') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('cluster_name', type=str, help='The name of the cluster.') + c.argument('arc_setting_name', options_list=['--name', '-n', '--arc-setting-name'], type=str, help='The name ' + 'of the proxy resource holding details of HCI ArcSetting information.') + + with self.argument_context('stack-hci arc-setting generate-password') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('cluster_name', type=str, help='The name of the cluster.', id_part='name') + c.argument('arc_setting_name', options_list=['--name', '-n', '--arc-setting-name'], type=str, help='The name ' + 'of the proxy resource holding details of HCI ArcSetting information.', id_part='child_name_1') + with self.argument_context('stack-hci arc-setting wait') as c: c.argument('resource_group_name', resource_group_name_type) c.argument('cluster_name', type=str, help='The name of the cluster.', id_part='name') @@ -85,6 +112,8 @@ def load_arguments(self, _): 'management from the Azure portal.') c.argument('aad_client_id', type=str, help='App id of cluster AAD identity.') c.argument('aad_tenant_id', type=str, help='Tenant id of cluster AAD identity.') + c.argument('aad_application_object_id', type=str, help='Object id of cluster AAD identity.') + c.argument('aad_service_principal_object_id', type=str, help='Id of cluster identity service principal.') c.argument('desired_properties', action=AddDesiredProperties, nargs='+', help='Desired properties of the ' 'cluster.') c.argument('created_by', type=str, help='The identity that created the resource.', arg_group='System Data') @@ -115,6 +144,16 @@ def load_arguments(self, _): c.argument('cluster_name', options_list=['--name', '-n', '--cluster-name'], type=str, help='The name of the ' 'cluster.', id_part='name') + with self.argument_context('stack-hci cluster create-identity') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('cluster_name', options_list=['--name', '-n', '--cluster-name'], type=str, help='The name of the ' + 'cluster.') + + with self.argument_context('stack-hci cluster wait') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('cluster_name', options_list=['--name', '-n', '--cluster-name'], type=str, help='The name of the ' + 'cluster.', id_part='name') + with self.argument_context('stack-hci extension list') as c: c.argument('resource_group_name', resource_group_name_type) c.argument('cluster_name', type=str, help='The name of the cluster.') diff --git a/src/stack-hci/azext_stack_hci/generated/commands.py b/src/stack-hci/azext_stack_hci/generated/commands.py index b3519a515a8..d8a53ad868b 100644 --- a/src/stack-hci/azext_stack_hci/generated/commands.py +++ b/src/stack-hci/azext_stack_hci/generated/commands.py @@ -44,7 +44,10 @@ def load_command_table(self, _): g.custom_command('list', 'stack_hci_arc_setting_list') g.custom_show_command('show', 'stack_hci_arc_setting_show') g.custom_command('create', 'stack_hci_arc_setting_create') + g.custom_command('update', 'stack_hci_arc_setting_update') g.custom_command('delete', 'stack_hci_arc_setting_delete', supports_no_wait=True, confirmation=True) + g.custom_command('create-identity', 'stack_hci_arc_setting_create_identity', supports_no_wait=True) + g.custom_command('generate-password', 'stack_hci_arc_setting_generate_password') g.custom_wait_command('wait', 'stack_hci_arc_setting_show') with self.command_group('stack-hci cluster', stack_hci_cluster, client_factory=cf_cluster) as g: @@ -52,13 +55,17 @@ def load_command_table(self, _): g.custom_show_command('show', 'stack_hci_cluster_show') g.custom_command('create', 'stack_hci_cluster_create') g.custom_command('update', 'stack_hci_cluster_update') - g.custom_command('delete', 'stack_hci_cluster_delete', confirmation=True) + g.custom_command('delete', 'stack_hci_cluster_delete', supports_no_wait=True, confirmation=True) + g.custom_command('create-identity', 'stack_hci_cluster_create_identity', supports_no_wait=True) + # service team found a bug on this api: Operation returned an invalid status 'OK' + # g.custom_command('upload-certificate', 'stack_hci_cluster_upload_certificate', supports_no_wait=True) + g.custom_wait_command('wait', 'stack_hci_cluster_show') with self.command_group('stack-hci extension', stack_hci_extension, client_factory=cf_extension) as g: g.custom_command('list', 'stack_hci_extension_list') g.custom_show_command('show', 'stack_hci_extension_show') g.custom_command('create', 'stack_hci_extension_create', supports_no_wait=True) - # service team found a bug on this api + # service team found a bug on this api: Operation returned an invalid status 'OK' # g.custom_command('update', 'stack_hci_extension_update', supports_no_wait=True) g.custom_command('delete', 'stack_hci_extension_delete', supports_no_wait=True, confirmation=True) g.custom_wait_command('wait', 'stack_hci_extension_show') diff --git a/src/stack-hci/azext_stack_hci/generated/custom.py b/src/stack-hci/azext_stack_hci/generated/custom.py index acc16060d60..d1e9520ac46 100644 --- a/src/stack-hci/azext_stack_hci/generated/custom.py +++ b/src/stack-hci/azext_stack_hci/generated/custom.py @@ -33,6 +33,11 @@ def stack_hci_arc_setting_create(client, cluster_name, arc_setting_name, arc_instance_resource_group=None, + arc_application_client_id=None, + arc_application_tenant_id=None, + arc_service_principal_object_id=None, + arc_application_object_id=None, + connectivity_properties=None, created_by=None, created_by_type=None, created_at=None, @@ -42,6 +47,16 @@ def stack_hci_arc_setting_create(client, arc_setting = {} if arc_instance_resource_group is not None: arc_setting['arc_instance_resource_group'] = arc_instance_resource_group + if arc_application_client_id is not None: + arc_setting['arc_application_client_id'] = arc_application_client_id + if arc_application_tenant_id is not None: + arc_setting['arc_application_tenant_id'] = arc_application_tenant_id + if arc_service_principal_object_id is not None: + arc_setting['arc_service_principal_object_id'] = arc_service_principal_object_id + if arc_application_object_id is not None: + arc_setting['arc_application_object_id'] = arc_application_object_id + if connectivity_properties is not None: + arc_setting['connectivity_properties'] = connectivity_properties if created_by is not None: arc_setting['created_by'] = created_by if created_by_type is not None: @@ -60,6 +75,23 @@ def stack_hci_arc_setting_create(client, arc_setting=arc_setting) +def stack_hci_arc_setting_update(client, + resource_group_name, + cluster_name, + arc_setting_name, + tags=None, + connectivity_properties=None): + arc_setting = {} + if tags is not None: + arc_setting['tags'] = tags + if connectivity_properties is not None: + arc_setting['connectivity_properties'] = connectivity_properties + return client.update(resource_group_name=resource_group_name, + cluster_name=cluster_name, + arc_setting_name=arc_setting_name, + arc_setting=arc_setting) + + def stack_hci_arc_setting_delete(client, resource_group_name, cluster_name, @@ -72,6 +104,27 @@ def stack_hci_arc_setting_delete(client, arc_setting_name=arc_setting_name) +def stack_hci_arc_setting_create_identity(client, + resource_group_name, + cluster_name, + arc_setting_name, + no_wait=False): + return sdk_no_wait(no_wait, + client.begin_create_identity, + resource_group_name=resource_group_name, + cluster_name=cluster_name, + arc_setting_name=arc_setting_name) + + +def stack_hci_arc_setting_generate_password(client, + resource_group_name, + cluster_name, + arc_setting_name): + return client.generate_password(resource_group_name=resource_group_name, + cluster_name=cluster_name, + arc_setting_name=arc_setting_name) + + def stack_hci_cluster_list(client, resource_group_name=None): if resource_group_name: @@ -94,6 +147,8 @@ def stack_hci_cluster_create(client, cloud_management_endpoint=None, aad_client_id=None, aad_tenant_id=None, + aad_application_object_id=None, + aad_service_principal_object_id=None, desired_properties=None, created_by=None, created_by_type=None, @@ -111,6 +166,10 @@ def stack_hci_cluster_create(client, cluster['aad_client_id'] = aad_client_id if aad_tenant_id is not None: cluster['aad_tenant_id'] = aad_tenant_id + if aad_application_object_id is not None: + cluster['aad_application_object_id'] = aad_application_object_id + if aad_service_principal_object_id is not None: + cluster['aad_service_principal_object_id'] = aad_service_principal_object_id if desired_properties is not None: cluster['desired_properties'] = desired_properties if created_by is not None: @@ -156,9 +215,37 @@ def stack_hci_cluster_update(client, def stack_hci_cluster_delete(client, resource_group_name, - cluster_name): - return client.delete(resource_group_name=resource_group_name, - cluster_name=cluster_name) + cluster_name, + no_wait=False): + return sdk_no_wait(no_wait, + client.begin_delete, + resource_group_name=resource_group_name, + cluster_name=cluster_name) + + +def stack_hci_cluster_create_identity(client, + resource_group_name, + cluster_name, + no_wait=False): + return sdk_no_wait(no_wait, + client.begin_create_identity, + resource_group_name=resource_group_name, + cluster_name=cluster_name) + + +def stack_hci_cluster_upload_certificate(client, + resource_group_name, + cluster_name, + certificates=None, + no_wait=False): + upload_certificate_request = {} + if certificates is not None: + upload_certificate_request['properties'] = {'certificates': certificates} + return sdk_no_wait(no_wait, + client.begin_upload_certificate, + resource_group_name=resource_group_name, + cluster_name=cluster_name, + upload_certificate_request=upload_certificate_request) def stack_hci_extension_list(client, diff --git a/src/stack-hci/azext_stack_hci/manual/_help.py b/src/stack-hci/azext_stack_hci/manual/_help.py deleted file mode 100644 index a1e6247f687..00000000000 --- a/src/stack-hci/azext_stack_hci/manual/_help.py +++ /dev/null @@ -1,24 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -------------------------------------------------------------------------------------------- -# pylint: disable=too-many-lines - -from knack.help_files import helps - -helps['stack-hci'] = """ - type: group - short-summary: Manage Azure Stack HCI -""" - -helps['stack-hci extension create'] = """ - type: command - short-summary: "Create Extension for HCI cluster." - examples: - - name: Create Arc Extension - text: |- - az stack-hci extension create --arc-setting-name "default" --cluster-name "myCluster" --type \ -"MicrosoftMonitoringAgent" --protected-settings '{\\"workspaceKey\\":\\"xx\\"}' --publisher "Microsoft.Compute" \ ---settings '{\\"workspaceId\\":\\"xx\\"}' --type-handler-version "1.10" --name "MicrosoftMonitoringAgent" \ ---resource-group "test-rg" -""" diff --git a/src/stack-hci/azext_stack_hci/tests/latest/recordings/test_stack_hci_arc_setting_crud.yaml b/src/stack-hci/azext_stack_hci/tests/latest/recordings/test_stack_hci_arc_setting_crud.yaml index 11437255979..c5d499f5822 100644 --- a/src/stack-hci/azext_stack_hci/tests/latest/recordings/test_stack_hci_arc_setting_crud.yaml +++ b/src/stack-hci/azext_stack_hci/tests/latest/recordings/test_stack_hci_arc_setting_crud.yaml @@ -3,7 +3,7 @@ interactions: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: @@ -13,59 +13,89 @@ interactions: ParameterSetName: - --display-name User-Agent: - - python/3.8.10 (Windows-10-10.0.19044-SP0) msrest/0.6.21 msrest_azure/0.6.4 - azure-graphrbac/0.60.0 Azure-SDK-For-Python AZURECLI/2.34.1 - accept-language: - - en-US + - python/3.8.9 (Windows-10-10.0.22000-SP0) AZURECLI/2.38.0 method: GET - uri: https://graph.windows.net/00000000-0000-0000-0000-000000000000/applications?$filter=startswith%28displayName%2C%27cli-test-app%27%29&api-version=1.6 + uri: https://graph.microsoft.com/v1.0/applications?$filter=startswith%28displayName%2C%27cli-test-app%27%29 response: body: - string: '{"odata.metadata":"https://graph.windows.net/00000000-0000-0000-0000-000000000000/$metadata#directoryObjects","value":[]}' + string: '{"@odata.context":"https://graph.microsoft.com/v1.0/$metadata#applications","value":[{"id":"30c2deaa-2ea2-4208-b51d-ebe81e1c9805","deletedDateTime":null,"appId":"bb58dfe8-db67-4d3c-bbe9-fc8ac96077a5","applicationTemplateId":null,"disabledByMicrosoftStatus":null,"createdDateTime":"2022-07-22T09:07:32Z","displayName":"cli-test-app","description":null,"groupMembershipClaims":null,"identifierUris":[],"isDeviceOnlyAuthSupported":null,"isFallbackPublicClient":null,"notes":null,"publisherDomain":"AzureSDKTeam.onmicrosoft.com","serviceManagementReference":null,"signInAudience":"AzureADandPersonalMicrosoftAccount","tags":[],"tokenEncryptionKeyId":null,"samlMetadataUrl":null,"defaultRedirectUri":null,"certification":null,"optionalClaims":null,"addIns":[],"api":{"acceptMappedClaims":null,"knownClientApplications":[],"requestedAccessTokenVersion":2,"oauth2PermissionScopes":[],"preAuthorizedApplications":[]},"appRoles":[],"info":{"logoUrl":null,"marketingUrl":null,"privacyStatementUrl":null,"supportUrl":null,"termsOfServiceUrl":null},"keyCredentials":[],"parentalControlSettings":{"countriesBlockedForMinors":[],"legalAgeGroupRule":"Allow"},"passwordCredentials":[],"publicClient":{"redirectUris":[]},"requiredResourceAccess":[],"verifiedPublisher":{"displayName":null,"verifiedPublisherId":null,"addedDateTime":null},"web":{"homePageUrl":null,"logoutUrl":null,"redirectUris":[],"implicitGrantSettings":{"enableAccessTokenIssuance":false,"enableIdTokenIssuance":false}},"spa":{"redirectUris":[]}}]}' headers: - access-control-allow-origin: - - '*' cache-control: - no-cache content-length: - - '121' + - '1501' content-type: - - application/json; odata=minimalmetadata; streaming=true; charset=utf-8 - dataserviceversion: - - 3.0; + - application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8 date: - - Wed, 23 Mar 2022 07:12:30 GMT - duration: - - '6833134' - expires: - - '-1' - ocp-aad-diagnostics-server-name: - - j1enVffl9zi9usCSq4q/28gAxYfsgIgvVS77IpsStTc= - ocp-aad-session-key: - - 0VTbtPbj48MUHDwJdQVOPPYVsjuJXokgq086cH71Q-5icn0JXlp6h5nrSRS84dZLcEiLhO0LHs-FatOy9_QwAZSWr-zVUvIZcvvOhRoC4TPcrKBdUHgZkA90pJS47K9zr8Oczu8_MqQXrA9XVhru3Odwoa2LcU-NzZwnC80wMpc.wZ3u5OaybT8zqOKx6vFPo3UZuJGdtGlkLqs_XJC5mgI - pragma: + - Tue, 26 Jul 2022 03:56:40 GMT + odata-version: + - '4.0' + request-id: + - cba607e5-e021-445d-9788-a13528a1003d + strict-transport-security: + - max-age=31536000 + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-ms-ags-diagnostic: + - '{"ServerInfo":{"DataCenter":"Southeast Asia","Slice":"E","Ring":"5","ScaleUnit":"002","RoleInstance":"SG1PEPF000037E8"}}' + x-ms-resource-unit: + - '2' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - ad app create + Connection: + - keep-alive + ParameterSetName: + - --display-name + User-Agent: + - python/3.8.9 (Windows-10-10.0.22000-SP0) AZURECLI/2.38.0 + method: GET + uri: https://graph.microsoft.com/v1.0/applications?$filter=appId%20eq%20%2730c2deaa-2ea2-4208-b51d-ebe81e1c9805%27 + response: + body: + string: '{"@odata.context":"https://graph.microsoft.com/v1.0/$metadata#applications","value":[]}' + headers: + cache-control: - no-cache + content-length: + - '87' + content-type: + - application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8 + date: + - Tue, 26 Jul 2022 03:56:40 GMT + odata-version: + - '4.0' request-id: - - 534efc32-37a4-458d-b90a-6f320f20a7c9 + - 482a5e9e-5af0-4804-b777-bc89760eba37 strict-transport-security: - - max-age=31536000; includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-ms-dirapi-data-contract-version: - - '1.6' + - max-age=31536000 + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-ms-ags-diagnostic: + - '{"ServerInfo":{"DataCenter":"Southeast Asia","Slice":"E","Ring":"5","ScaleUnit":"002","RoleInstance":"SG1PEPF000037E5"}}' x-ms-resource-unit: - '2' - x-powered-by: - - ASP.NET status: code: 200 message: OK - request: - body: '{"availableToOtherTenants": false, "displayName": "cli-test-app", "identifierUris": - []}' + body: '{"displayName": "cli-test-app"}' headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: @@ -73,85 +103,80 @@ interactions: Connection: - keep-alive Content-Length: - - '87' + - '31' Content-Type: - - application/json; charset=utf-8 + - application/json ParameterSetName: - --display-name User-Agent: - - python/3.8.10 (Windows-10-10.0.19044-SP0) msrest/0.6.21 msrest_azure/0.6.4 - azure-graphrbac/0.60.0 Azure-SDK-For-Python AZURECLI/2.34.1 - accept-language: - - en-US - method: POST - uri: https://graph.windows.net/00000000-0000-0000-0000-000000000000/applications?api-version=1.6 + - python/3.8.9 (Windows-10-10.0.22000-SP0) AZURECLI/2.38.0 + method: PATCH + uri: https://graph.microsoft.com/v1.0/applications/30c2deaa-2ea2-4208-b51d-ebe81e1c9805 response: body: - string: '{"odata.metadata": "https://graph.windows.net/00000000-0000-0000-0000-000000000000/$metadata#directoryObjects/@Element", - "odata.type": "Microsoft.DirectoryServices.Application", "objectType": "Application", - "objectId": "2ddd80d9-80fa-4ef6-bc07-58af0824604c", "deletionTimestamp": null, - "acceptMappedClaims": null, "addIns": [], "appId": "19e87cb7-6317-4e39-a358-2de5b2b3d1ec", - "applicationTemplateId": null, "appRoles": [], "availableToOtherTenants": - false, "displayName": "cli-test-app", "errorUrl": null, "groupMembershipClaims": - null, "homepage": null, "identifierUris": [], "informationalUrls": {"termsOfService": - null, "support": null, "privacy": null, "marketing": null}, "isDeviceOnlyAuthSupported": - null, "keyCredentials": [], "knownClientApplications": [], "logoutUrl": null, - "logo@odata.mediaEditLink": "directoryObjects/2ddd80d9-80fa-4ef6-bc07-58af0824604c/Microsoft.DirectoryServices.Application/logo", - "logo@odata.mediaContentType": "application/json;odata=minimalmetadata; charset=utf-8", - "logoUrl": null, "mainLogo@odata.mediaEditLink": "directoryObjects/2ddd80d9-80fa-4ef6-bc07-58af0824604c/Microsoft.DirectoryServices.Application/mainLogo", - "oauth2AllowIdTokenImplicitFlow": true, "oauth2AllowImplicitFlow": false, - "oauth2AllowUrlPathMatching": false, "oauth2Permissions": [{"adminConsentDescription": - "Allow the application to access cli-test-app on behalf of the signed-in user.", - "adminConsentDisplayName": "Access cli-test-app", "id": "5643deba-94a1-40f2-8ff5-290c44396a5c", - "isEnabled": true, "type": "User", "userConsentDescription": "Allow the application - to access cli-test-app on your behalf.", "userConsentDisplayName": "Access - cli-test-app", "value": "user_impersonation"}], "oauth2RequirePostResponse": - false, "optionalClaims": null, "orgRestrictions": [], "parentalControlSettings": - {"countriesBlockedForMinors": [], "legalAgeGroupRule": "Allow"}, "passwordCredentials": - [], "publicClient": null, "publisherDomain": "AzureSDKTeam.onmicrosoft.com", - "recordConsentConditions": null, "replyUrls": [], "requiredResourceAccess": - [], "samlMetadataUrl": null, "signInAudience": "AzureADMyOrg", "tokenEncryptionKeyId": - null}' + string: '' + headers: + cache-control: + - no-cache + date: + - Tue, 26 Jul 2022 03:56:42 GMT + request-id: + - 327a1339-9d4f-4add-8750-21556afe65fa + strict-transport-security: + - max-age=31536000 + x-ms-ags-diagnostic: + - '{"ServerInfo":{"DataCenter":"Southeast Asia","Slice":"E","Ring":"5","ScaleUnit":"002","RoleInstance":"SG1PEPF00001302"}}' + x-ms-resource-unit: + - '1' + status: + code: 204 + message: No Content +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - ad app create + Connection: + - keep-alive + ParameterSetName: + - --display-name + User-Agent: + - python/3.8.9 (Windows-10-10.0.22000-SP0) AZURECLI/2.38.0 + method: GET + uri: https://graph.microsoft.com/v1.0/applications/30c2deaa-2ea2-4208-b51d-ebe81e1c9805 + response: + body: + string: '{"@odata.context":"https://graph.microsoft.com/v1.0/$metadata#applications/$entity","id":"30c2deaa-2ea2-4208-b51d-ebe81e1c9805","deletedDateTime":null,"appId":"bb58dfe8-db67-4d3c-bbe9-fc8ac96077a5","applicationTemplateId":null,"disabledByMicrosoftStatus":null,"createdDateTime":"2022-07-22T09:07:32Z","displayName":"cli-test-app","description":null,"groupMembershipClaims":null,"identifierUris":[],"isDeviceOnlyAuthSupported":null,"isFallbackPublicClient":null,"notes":null,"publisherDomain":"AzureSDKTeam.onmicrosoft.com","serviceManagementReference":null,"signInAudience":"AzureADandPersonalMicrosoftAccount","tags":[],"tokenEncryptionKeyId":null,"samlMetadataUrl":null,"defaultRedirectUri":null,"certification":null,"optionalClaims":null,"addIns":[],"api":{"acceptMappedClaims":null,"knownClientApplications":[],"requestedAccessTokenVersion":2,"oauth2PermissionScopes":[],"preAuthorizedApplications":[]},"appRoles":[],"info":{"logoUrl":null,"marketingUrl":null,"privacyStatementUrl":null,"supportUrl":null,"termsOfServiceUrl":null},"keyCredentials":[],"parentalControlSettings":{"countriesBlockedForMinors":[],"legalAgeGroupRule":"Allow"},"passwordCredentials":[],"publicClient":{"redirectUris":[]},"requiredResourceAccess":[],"verifiedPublisher":{"displayName":null,"verifiedPublisherId":null,"addedDateTime":null},"web":{"homePageUrl":null,"logoutUrl":null,"redirectUris":[],"implicitGrantSettings":{"enableAccessTokenIssuance":false,"enableIdTokenIssuance":false}},"spa":{"redirectUris":[]}}' headers: - access-control-allow-origin: - - '*' cache-control: - no-cache content-length: - - '2146' + - '1497' content-type: - - application/json; odata=minimalmetadata; streaming=true; charset=utf-8 - dataserviceversion: - - 3.0; + - application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8 date: - - Wed, 23 Mar 2022 07:12:31 GMT - duration: - - '9508478' - expires: - - '-1' - location: - - https://graph.windows.net/00000000-0000-0000-0000-000000000000/directoryObjects/2ddd80d9-80fa-4ef6-bc07-58af0824604c/Microsoft.DirectoryServices.Application - ocp-aad-diagnostics-server-name: - - HWBBdh+h9Y2P4ICVCYLiYcUnegArWP3IJrpm2FYEOVk= - ocp-aad-session-key: - - x4AJBCFiaXavWdJ8xo8yBV8G83KpihwGQYwxo4NXO7khid3QJH01nf4UKEIvHG3Gx69D_n7vDD6TuYgeN9RpcX1OgX0AB2vFsgYU126BTLFx8966hQELp2k-vwRFXQLDVbDrJQvplXXm-MEjurR9Yh7ZMezfSRjMQC_C-MdVb-s.Y6m8hoe61sA_8-8EKMDnmobcnNhnyoJKYre0mQmFolg - pragma: - - no-cache + - Tue, 26 Jul 2022 03:56:43 GMT + odata-version: + - '4.0' request-id: - - 10739001-d7b6-48ff-a062-6dea72128864 + - 09ace384-867a-4fbc-b8c5-afa259035435 strict-transport-security: - - max-age=31536000; includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-ms-dirapi-data-contract-version: - - '1.6' + - max-age=31536000 + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-ms-ags-diagnostic: + - '{"ServerInfo":{"DataCenter":"Southeast Asia","Slice":"E","Ring":"5","ScaleUnit":"002","RoleInstance":"SG1PEPF0000252C"}}' x-ms-resource-unit: - '1' - x-powered-by: - - ASP.NET status: - code: 201 - message: Created + code: 200 + message: OK - request: body: null headers: @@ -166,21 +191,21 @@ interactions: ParameterSetName: - -n -g --aad-client-id --aad-tenant-id User-Agent: - - AZURECLI/2.34.1 azsdk-python-azure-mgmt-resource/20.0.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.38.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.9 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_stack_hci_000001?api-version=2021-04-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_stack_hci_arc_setting000001?api-version=2021-04-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_stack_hci_000001","name":"cli_test_stack_hci_000001","type":"Microsoft.Resources/resourceGroups","location":"eastus","tags":{"product":"azurecli","cause":"automation","date":"2022-03-23T07:12:21Z"},"properties":{"provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_stack_hci_arc_setting000001","name":"cli_test_stack_hci_arc_setting000001","type":"Microsoft.Resources/resourceGroups","location":"eastus","tags":{"product":"azurecli","cause":"automation","date":"2022-07-26T03:56:38Z"},"properties":{"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache content-length: - - '328' + - '350' content-type: - application/json; charset=utf-8 date: - - Wed, 23 Mar 2022 07:12:32 GMT + - Tue, 26 Jul 2022 03:56:43 GMT expires: - '-1' pragma: @@ -195,7 +220,7 @@ interactions: code: 200 message: OK - request: - body: '{"location": "eastus", "properties": {"aadClientId": "19e87cb7-6317-4e39-a358-2de5b2b3d1ec", + body: '{"location": "eastus", "properties": {"aadClientId": "bb58dfe8-db67-4d3c-bbe9-fc8ac96077a5", "aadTenantId": "54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"}}' headers: Accept: @@ -213,25 +238,27 @@ interactions: ParameterSetName: - -n -g --aad-client-id --aad-tenant-id User-Agent: - - AZURECLI/2.34.1 azsdk-python-mgmt-azurestackhci/1.0.0b1 Python/3.8.10 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.38.0 azsdk-python-mgmt-azurestackhci/1.0.0b1 Python/3.8.9 (Windows-10-10.0.22000-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_stack_hci_000001/providers/Microsoft.AzureStackHCI/clusters/cli-test-cluster?api-version=2022-01-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_stack_hci_arc_setting000001/providers/Microsoft.AzureStackHCI/clusters/cli-test-cluster?api-version=2022-05-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_stack_hci_000001/providers/Microsoft.AzureStackHCI/clusters/cli-test-cluster","name":"cli-test-cluster","type":"microsoft.azurestackhci/clusters","location":"eastus","systemData":{"createdBy":"ethanyang@microsoft.com","createdByType":"User","createdAt":"2022-03-23T07:12:38.8604825Z","lastModifiedBy":"ethanyang@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-03-23T07:12:38.8604825Z"},"properties":{"provisioningState":"Succeeded","status":"NotYetRegistered","cloudId":"35ec4bac-df03-45e1-9dde-7e30f1883b25","aadClientId":"19e87cb7-6317-4e39-a358-2de5b2b3d1ec","aadTenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","desiredProperties":{"windowsServerSubscription":"Disabled","diagnosticLevel":"Basic"},"trialDaysRemaining":60,"billingModel":"Trial"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_stack_hci_arc_setting000001/providers/Microsoft.AzureStackHCI/clusters/cli-test-cluster","name":"cli-test-cluster","type":"microsoft.azurestackhci/clusters","location":"eastus","systemData":{"createdBy":"v-jingszhang@microsoft.com","createdByType":"User","createdAt":"2022-07-26T03:56:48.4622997Z","lastModifiedBy":"v-jingszhang@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-07-26T03:56:48.4622997Z"},"properties":{"provisioningState":"Succeeded","status":"NotYetRegistered","cloudId":"a7a598ce-b711-48ab-ad68-b76940f1b0f5","aadClientId":"bb58dfe8-db67-4d3c-bbe9-fc8ac96077a5","aadTenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","desiredProperties":{"windowsServerSubscription":"Disabled","diagnosticLevel":"Basic"},"trialDaysRemaining":60,"billingModel":"Trial","serviceEndpoint":"https://dp.stackhci.azure.com/eastus/"}}' headers: cache-control: - no-cache content-length: - - '851' + - '926' content-type: - application/json; charset=utf-8 date: - - Wed, 23 Mar 2022 07:12:40 GMT + - Tue, 26 Jul 2022 03:56:49 GMT etag: - - '"8700947d-0000-0100-0000-623ac8670000"' + - '"0000c888-0000-0100-0000-62df66000000"' expires: - '-1' + mise-correlation-id: + - f8cf1302-7dec-4fab-b457-33fa202780e6 pragma: - no-cache request-context: @@ -271,25 +298,27 @@ interactions: ParameterSetName: - -n -g --cluster-name User-Agent: - - AZURECLI/2.34.1 azsdk-python-mgmt-azurestackhci/1.0.0b1 Python/3.8.10 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.38.0 azsdk-python-mgmt-azurestackhci/1.0.0b1 Python/3.8.9 (Windows-10-10.0.22000-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_stack_hci_000001/providers/Microsoft.AzureStackHCI/clusters/cli-test-cluster/arcSettings/default?api-version=2022-01-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_stack_hci_arc_setting000001/providers/Microsoft.AzureStackHCI/clusters/cli-test-cluster/arcSettings/default?api-version=2022-05-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_stack_hci_000001/providers/Microsoft.AzureStackHCI/clusters/cli-test-cluster/arcSettings/default","name":"default","type":"microsoft.azurestackhci/clusters/arcsettings","systemData":{"createdBy":"ethanyang@microsoft.com","createdByType":"User","createdAt":"2022-03-23T07:12:41.7000782Z","lastModifiedBy":"ethanyang@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-03-23T07:12:41.7000782Z"},"properties":{"provisioningState":"Succeeded","arcInstanceResourceGroup":"cli-test-cluster-35ec4bac-df03-45e1-9dde-7e30f1883b25-Arc-Infra-RG","aggregateState":"NotSpecified"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_stack_hci_arc_setting000001/providers/Microsoft.AzureStackHCI/clusters/cli-test-cluster/arcSettings/default","name":"default","type":"microsoft.azurestackhci/clusters/arcsettings","systemData":{"createdBy":"v-jingszhang@microsoft.com","createdByType":"User","createdAt":"2022-07-26T03:56:50.9309813Z","lastModifiedBy":"v-jingszhang@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-07-26T03:56:50.9309813Z"},"properties":{"connectivityProperties":{"enabled":false},"provisioningState":"Succeeded","arcInstanceResourceGroup":"cli-test-cluster-a7a598ce-b711-48ab-ad68-b76940f1b0f5-Arc-Infra-RG","aggregateState":"NotSpecified"}}' headers: cache-control: - no-cache content-length: - - '665' + - '725' content-type: - application/json; charset=utf-8 date: - - Wed, 23 Mar 2022 07:12:43 GMT + - Tue, 26 Jul 2022 03:56:52 GMT etag: - - '"15011ced-0000-0100-0000-623ac86b0000"' + - '"00009c80-0000-0100-0000-62df66040000"' expires: - '-1' + mise-correlation-id: + - df2e18bf-a4ea-4754-a9ab-77210bc9200f pragma: - no-cache request-context: @@ -305,9 +334,111 @@ interactions: x-ms-providerhub-traffic: - 'True' x-ms-ratelimit-remaining-subscription-writes: + - '1198' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - stack-hci arc-setting create-identity + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -n --cluster-name -g + User-Agent: + - AZURECLI/2.38.0 azsdk-python-mgmt-azurestackhci/1.0.0b1 Python/3.8.9 (Windows-10-10.0.22000-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_stack_hci_arc_setting000001/providers/Microsoft.AzureStackHCI/clusters/cli-test-cluster/arcSettings/default/createArcIdentity?api-version=2022-05-01 + response: + body: + string: 'null' + headers: + azure-asyncoperation: + - https://management.azure.com/providers/Microsoft.AzureStackHCI/locations/EASTUS/operationStatuses/5685c31a-7fe3-4fdc-a24a-cb41aed30ebe*3ADD1C9098DB574BD0B240D292D00900A78DBE13930E6AAD9EB22BE6FC5FBD50?api-version=2022-05-01 + cache-control: + - no-cache + content-length: + - '4' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 26 Jul 2022 03:56:53 GMT + expires: + - '-1' + location: + - https://management.azure.com/providers/Microsoft.AzureStackHCI/locations/EASTUS/operationStatuses/5685c31a-7fe3-4fdc-a24a-cb41aed30ebe*3ADD1C9098DB574BD0B240D292D00900A78DBE13930E6AAD9EB22BE6FC5FBD50?api-version=2022-05-01 + mise-correlation-id: + - 8bd9577f-029d-4446-8f74-16734f707e9c + pragma: + - no-cache + request-context: + - appId= + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-writes: - '1199' x-powered-by: - ASP.NET + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - stack-hci arc-setting create-identity + Connection: + - keep-alive + ParameterSetName: + - -n --cluster-name -g + User-Agent: + - AZURECLI/2.38.0 azsdk-python-mgmt-azurestackhci/1.0.0b1 Python/3.8.9 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/providers/Microsoft.AzureStackHCI/locations/EASTUS/operationStatuses/5685c31a-7fe3-4fdc-a24a-cb41aed30ebe*3ADD1C9098DB574BD0B240D292D00900A78DBE13930E6AAD9EB22BE6FC5FBD50?api-version=2022-05-01 + response: + body: + string: '{"id":"/providers/Microsoft.AzureStackHCI/locations/EASTUS/operationStatuses/5685c31a-7fe3-4fdc-a24a-cb41aed30ebe*3ADD1C9098DB574BD0B240D292D00900A78DBE13930E6AAD9EB22BE6FC5FBD50","name":"5685c31a-7fe3-4fdc-a24a-cb41aed30ebe*3ADD1C9098DB574BD0B240D292D00900A78DBE13930E6AAD9EB22BE6FC5FBD50","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_stack_hci_arc_setting000001/providers/Microsoft.AzureStackHCI/clusters/cli-test-cluster/arcSettings/default","status":"Succeeded","startTime":"2022-07-26T03:56:53.4493523Z","endTime":"2022-07-26T03:57:00.4341366Z","properties":null}' + headers: + cache-control: + - no-cache + content-length: + - '613' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 26 Jul 2022 03:57:23 GMT + etag: + - '"0a005248-0000-0100-0000-62df660c0000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff status: code: 200 message: OK @@ -325,23 +456,25 @@ interactions: ParameterSetName: - -g --cluster-name User-Agent: - - AZURECLI/2.34.1 azsdk-python-mgmt-azurestackhci/1.0.0b1 Python/3.8.10 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.38.0 azsdk-python-mgmt-azurestackhci/1.0.0b1 Python/3.8.9 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_stack_hci_000001/providers/Microsoft.AzureStackHCI/clusters/cli-test-cluster/arcSettings?api-version=2022-01-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_stack_hci_arc_setting000001/providers/Microsoft.AzureStackHCI/clusters/cli-test-cluster/arcSettings?api-version=2022-05-01 response: body: - string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_stack_hci_000001/providers/Microsoft.AzureStackHCI/clusters/cli-test-cluster/arcSettings/default","name":"default","type":"microsoft.azurestackhci/clusters/arcsettings","properties":{"provisioningState":"Succeeded","arcInstanceResourceGroup":"cli-test-cluster-35ec4bac-df03-45e1-9dde-7e30f1883b25-Arc-Infra-RG","aggregateState":"NotSpecified","perNodeDetails":[]}}]}' + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_stack_hci_arc_setting000001/providers/Microsoft.AzureStackHCI/clusters/cli-test-cluster/arcSettings/default","name":"default","type":"microsoft.azurestackhci/clusters/arcsettings","properties":{"connectivityProperties":{"enabled":false},"provisioningState":"Succeeded","arcInstanceResourceGroup":"cli-test-cluster-a7a598ce-b711-48ab-ad68-b76940f1b0f5-Arc-Infra-RG","aggregateState":"NotSpecified","perNodeDetails":[],"arcApplicationTenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","arcApplicationClientId":"84b95254-1a62-4d98-9500-c2590179a7ff","arcApplicationObjectId":"04885158-7cbf-44a6-b413-e00e300e9286","arcServicePrincipalObjectId":"52ed3df9-f671-4d12-9674-9e9a38c006e2"}}]}' headers: cache-control: - no-cache content-length: - - '459' + - '774' content-type: - application/json; charset=utf-8 date: - - Wed, 23 Mar 2022 07:12:45 GMT + - Tue, 26 Jul 2022 03:57:25 GMT expires: - '-1' + mise-correlation-id: + - cfce07b3-7e1b-4b2a-a9b1-a7cc81c7c5f4 pragma: - no-cache request-context: @@ -375,25 +508,27 @@ interactions: ParameterSetName: - -n -g --cluster-name User-Agent: - - AZURECLI/2.34.1 azsdk-python-mgmt-azurestackhci/1.0.0b1 Python/3.8.10 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.38.0 azsdk-python-mgmt-azurestackhci/1.0.0b1 Python/3.8.9 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_stack_hci_000001/providers/Microsoft.AzureStackHCI/clusters/cli-test-cluster/arcSettings/default?api-version=2022-01-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_stack_hci_arc_setting000001/providers/Microsoft.AzureStackHCI/clusters/cli-test-cluster/arcSettings/default?api-version=2022-05-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_stack_hci_000001/providers/Microsoft.AzureStackHCI/clusters/cli-test-cluster/arcSettings/default","name":"default","type":"microsoft.azurestackhci/clusters/arcsettings","properties":{"provisioningState":"Succeeded","arcInstanceResourceGroup":"cli-test-cluster-35ec4bac-df03-45e1-9dde-7e30f1883b25-Arc-Infra-RG","aggregateState":"NotSpecified","perNodeDetails":[]}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_stack_hci_arc_setting000001/providers/Microsoft.AzureStackHCI/clusters/cli-test-cluster/arcSettings/default","name":"default","type":"microsoft.azurestackhci/clusters/arcsettings","properties":{"connectivityProperties":{"enabled":false},"provisioningState":"Succeeded","arcInstanceResourceGroup":"cli-test-cluster-a7a598ce-b711-48ab-ad68-b76940f1b0f5-Arc-Infra-RG","aggregateState":"NotSpecified","perNodeDetails":[],"arcApplicationTenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","arcApplicationClientId":"84b95254-1a62-4d98-9500-c2590179a7ff","arcApplicationObjectId":"04885158-7cbf-44a6-b413-e00e300e9286","arcServicePrincipalObjectId":"52ed3df9-f671-4d12-9674-9e9a38c006e2"}}' headers: cache-control: - no-cache content-length: - - '447' + - '762' content-type: - application/json; charset=utf-8 date: - - Wed, 23 Mar 2022 07:12:46 GMT + - Tue, 26 Jul 2022 03:57:25 GMT etag: - - '"15011ced-0000-0100-0000-623ac86b0000"' + - '"00009f80-0000-0100-0000-62df660c0000"' expires: - '-1' + mise-correlation-id: + - f63eca11-3b58-4f1a-88e0-c0f1b157d91e pragma: - no-cache request-context: @@ -413,6 +548,62 @@ interactions: status: code: 200 message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - stack-hci arc-setting generate-password + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -n --cluster-name -g + User-Agent: + - AZURECLI/2.38.0 azsdk-python-mgmt-azurestackhci/1.0.0b1 Python/3.8.9 (Windows-10-10.0.22000-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_stack_hci_arc_setting000001/providers/Microsoft.AzureStackHCI/clusters/cli-test-cluster/arcSettings/default/generatePassword?api-version=2022-05-01 + response: + body: + string: '{"secretText":"ALv8Q~Ja~hVS_xKWK5qg~5RjRmm4fLh34Bn4icoD","startDateTime":"2022-07-26T03:57:27.3113248+00:00","endDateTime":"2024-07-26T03:57:27.3113249+00:00","keyId":"8a46c411-9a41-4b69-a425-95aa4dde92e0"}' + headers: + cache-control: + - no-cache + content-length: + - '206' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 26 Jul 2022 03:57:26 GMT + expires: + - '-1' + mise-correlation-id: + - d6baa3e1-8612-4ddb-bc15-e31748125631 + pragma: + - no-cache + request-context: + - appId= + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK - request: body: null headers: @@ -429,23 +620,35 @@ interactions: ParameterSetName: - -n -g --cluster-name --no-wait --yes User-Agent: - - AZURECLI/2.34.1 azsdk-python-mgmt-azurestackhci/1.0.0b1 Python/3.8.10 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.38.0 azsdk-python-mgmt-azurestackhci/1.0.0b1 Python/3.8.9 (Windows-10-10.0.22000-SP0) method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_stack_hci_000001/providers/Microsoft.AzureStackHCI/clusters/cli-test-cluster/arcSettings/default?api-version=2022-01-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_stack_hci_arc_setting000001/providers/Microsoft.AzureStackHCI/clusters/cli-test-cluster/arcSettings/default?api-version=2022-05-01 response: body: - string: '' + string: 'null' headers: + azure-asyncoperation: + - https://management.azure.com/providers/Microsoft.AzureStackHCI/locations/EASTUS/operationStatuses/23cfcad7-48aa-452c-8218-604012606275*3ADD1C9098DB574BD0B240D292D00900A78DBE13930E6AAD9EB22BE6FC5FBD50?api-version=2022-05-01 cache-control: - no-cache content-length: - - '0' + - '4' + content-type: + - application/json; charset=utf-8 date: - - Wed, 23 Mar 2022 07:12:47 GMT + - Tue, 26 Jul 2022 03:57:27 GMT + etag: + - '"0000a080-0000-0100-0000-62df66280000"' expires: - '-1' + location: + - https://management.azure.com/providers/Microsoft.AzureStackHCI/locations/EASTUS/operationStatuses/23cfcad7-48aa-452c-8218-604012606275*3ADD1C9098DB574BD0B240D292D00900A78DBE13930E6AAD9EB22BE6FC5FBD50?api-version=2022-05-01 + mise-correlation-id: + - e069eaa5-53ac-4731-af10-5ad067d4724f pragma: - no-cache + request-context: + - appId= strict-transport-security: - max-age=31536000; includeSubDomains x-content-type-options: @@ -454,7 +657,9 @@ interactions: - 'True' x-ms-ratelimit-remaining-subscription-deletes: - '14999' + x-powered-by: + - ASP.NET status: - code: 200 - message: OK + code: 202 + message: Accepted version: 1 diff --git a/src/stack-hci/azext_stack_hci/tests/latest/recordings/test_stack_hci_cluster_crud.yaml b/src/stack-hci/azext_stack_hci/tests/latest/recordings/test_stack_hci_cluster_crud.yaml index 747eb60797e..576517fa2a9 100644 --- a/src/stack-hci/azext_stack_hci/tests/latest/recordings/test_stack_hci_cluster_crud.yaml +++ b/src/stack-hci/azext_stack_hci/tests/latest/recordings/test_stack_hci_cluster_crud.yaml @@ -3,7 +3,7 @@ interactions: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: @@ -13,59 +13,89 @@ interactions: ParameterSetName: - --display-name User-Agent: - - python/3.8.10 (Windows-10-10.0.19044-SP0) msrest/0.6.21 msrest_azure/0.6.4 - azure-graphrbac/0.60.0 Azure-SDK-For-Python AZURECLI/2.34.1 - accept-language: - - en-US + - python/3.8.9 (Windows-10-10.0.22000-SP0) AZURECLI/2.38.0 method: GET - uri: https://graph.windows.net/00000000-0000-0000-0000-000000000000/applications?$filter=startswith%28displayName%2C%27cli-test-app%27%29&api-version=1.6 + uri: https://graph.microsoft.com/v1.0/applications?$filter=startswith%28displayName%2C%27cli-test-app%27%29 response: body: - string: '{"odata.metadata":"https://graph.windows.net/00000000-0000-0000-0000-000000000000/$metadata#directoryObjects","value":[]}' + string: '{"@odata.context":"https://graph.microsoft.com/v1.0/$metadata#applications","value":[{"id":"30c2deaa-2ea2-4208-b51d-ebe81e1c9805","deletedDateTime":null,"appId":"bb58dfe8-db67-4d3c-bbe9-fc8ac96077a5","applicationTemplateId":null,"disabledByMicrosoftStatus":null,"createdDateTime":"2022-07-22T09:07:32Z","displayName":"cli-test-app","description":null,"groupMembershipClaims":null,"identifierUris":[],"isDeviceOnlyAuthSupported":null,"isFallbackPublicClient":null,"notes":null,"publisherDomain":"AzureSDKTeam.onmicrosoft.com","serviceManagementReference":null,"signInAudience":"AzureADandPersonalMicrosoftAccount","tags":[],"tokenEncryptionKeyId":null,"samlMetadataUrl":null,"defaultRedirectUri":null,"certification":null,"optionalClaims":null,"addIns":[],"api":{"acceptMappedClaims":null,"knownClientApplications":[],"requestedAccessTokenVersion":2,"oauth2PermissionScopes":[],"preAuthorizedApplications":[]},"appRoles":[],"info":{"logoUrl":null,"marketingUrl":null,"privacyStatementUrl":null,"supportUrl":null,"termsOfServiceUrl":null},"keyCredentials":[],"parentalControlSettings":{"countriesBlockedForMinors":[],"legalAgeGroupRule":"Allow"},"passwordCredentials":[],"publicClient":{"redirectUris":[]},"requiredResourceAccess":[],"verifiedPublisher":{"displayName":null,"verifiedPublisherId":null,"addedDateTime":null},"web":{"homePageUrl":null,"logoutUrl":null,"redirectUris":[],"implicitGrantSettings":{"enableAccessTokenIssuance":false,"enableIdTokenIssuance":false}},"spa":{"redirectUris":[]}}]}' headers: - access-control-allow-origin: - - '*' cache-control: - no-cache content-length: - - '121' + - '1501' content-type: - - application/json; odata=minimalmetadata; streaming=true; charset=utf-8 - dataserviceversion: - - 3.0; + - application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8 date: - - Wed, 23 Mar 2022 07:00:16 GMT - duration: - - '1248159' - expires: - - '-1' - ocp-aad-diagnostics-server-name: - - hDkM4DKmUH+RXXxsm6yUgqndyON1tQZzu6SAVcF2+Fw= - ocp-aad-session-key: - - SSo1FX07gqAYXefPru4cKAz9nrbou2ECkAJ8cQ-LrxnqFTjtZ9IYD2X8ELMCqVRSPFKecN6qwtUJFvWaW8S0olOUXGMsN90JKkYDvRss4-IT6DIZpuSxrhOePqQUlr9sOxStE4bq0pvMpR8yDQ0UgD9DdRGgPokLP7WIFJUtihE.LQrRGFVvb4qcdPxuXxA9BVOVtsgjSnNCmYvnJmG2Rmw - pragma: + - Tue, 26 Jul 2022 03:47:35 GMT + odata-version: + - '4.0' + request-id: + - b0b2ced4-69f2-4eff-89bb-9cf6f58bf54f + strict-transport-security: + - max-age=31536000 + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-ms-ags-diagnostic: + - '{"ServerInfo":{"DataCenter":"Southeast Asia","Slice":"E","Ring":"5","ScaleUnit":"000","RoleInstance":"SI1PEPF000090C6"}}' + x-ms-resource-unit: + - '2' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - ad app create + Connection: + - keep-alive + ParameterSetName: + - --display-name + User-Agent: + - python/3.8.9 (Windows-10-10.0.22000-SP0) AZURECLI/2.38.0 + method: GET + uri: https://graph.microsoft.com/v1.0/applications?$filter=appId%20eq%20%2730c2deaa-2ea2-4208-b51d-ebe81e1c9805%27 + response: + body: + string: '{"@odata.context":"https://graph.microsoft.com/v1.0/$metadata#applications","value":[]}' + headers: + cache-control: - no-cache + content-length: + - '87' + content-type: + - application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8 + date: + - Tue, 26 Jul 2022 03:47:36 GMT + odata-version: + - '4.0' request-id: - - 3031db61-8e8a-42cd-bcf7-b9a8575c233d + - c8e8906a-9ac1-45f5-a730-258d824de17a strict-transport-security: - - max-age=31536000; includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-ms-dirapi-data-contract-version: - - '1.6' + - max-age=31536000 + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-ms-ags-diagnostic: + - '{"ServerInfo":{"DataCenter":"Southeast Asia","Slice":"E","Ring":"5","ScaleUnit":"000","RoleInstance":"SI1PEPF000090CA"}}' x-ms-resource-unit: - '2' - x-powered-by: - - ASP.NET status: code: 200 message: OK - request: - body: '{"availableToOtherTenants": false, "displayName": "cli-test-app", "identifierUris": - []}' + body: '{"displayName": "cli-test-app"}' headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: @@ -73,85 +103,80 @@ interactions: Connection: - keep-alive Content-Length: - - '87' + - '31' Content-Type: - - application/json; charset=utf-8 + - application/json ParameterSetName: - --display-name User-Agent: - - python/3.8.10 (Windows-10-10.0.19044-SP0) msrest/0.6.21 msrest_azure/0.6.4 - azure-graphrbac/0.60.0 Azure-SDK-For-Python AZURECLI/2.34.1 - accept-language: - - en-US - method: POST - uri: https://graph.windows.net/00000000-0000-0000-0000-000000000000/applications?api-version=1.6 + - python/3.8.9 (Windows-10-10.0.22000-SP0) AZURECLI/2.38.0 + method: PATCH + uri: https://graph.microsoft.com/v1.0/applications/30c2deaa-2ea2-4208-b51d-ebe81e1c9805 + response: + body: + string: '' + headers: + cache-control: + - no-cache + date: + - Tue, 26 Jul 2022 03:47:38 GMT + request-id: + - 4e2429e9-8820-43bc-ab72-df7de8bbe11a + strict-transport-security: + - max-age=31536000 + x-ms-ags-diagnostic: + - '{"ServerInfo":{"DataCenter":"Southeast Asia","Slice":"E","Ring":"5","ScaleUnit":"000","RoleInstance":"SI1PEPF000090C0"}}' + x-ms-resource-unit: + - '1' + status: + code: 204 + message: No Content +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - ad app create + Connection: + - keep-alive + ParameterSetName: + - --display-name + User-Agent: + - python/3.8.9 (Windows-10-10.0.22000-SP0) AZURECLI/2.38.0 + method: GET + uri: https://graph.microsoft.com/v1.0/applications/30c2deaa-2ea2-4208-b51d-ebe81e1c9805 response: body: - string: '{"odata.metadata": "https://graph.windows.net/00000000-0000-0000-0000-000000000000/$metadata#directoryObjects/@Element", - "odata.type": "Microsoft.DirectoryServices.Application", "objectType": "Application", - "objectId": "8ead8183-0c68-46e2-96b9-66b296e74655", "deletionTimestamp": null, - "acceptMappedClaims": null, "addIns": [], "appId": "bbc01c55-41e0-442e-9f8c-29a556c91a15", - "applicationTemplateId": null, "appRoles": [], "availableToOtherTenants": - false, "displayName": "cli-test-app", "errorUrl": null, "groupMembershipClaims": - null, "homepage": null, "identifierUris": [], "informationalUrls": {"termsOfService": - null, "support": null, "privacy": null, "marketing": null}, "isDeviceOnlyAuthSupported": - null, "keyCredentials": [], "knownClientApplications": [], "logoutUrl": null, - "logo@odata.mediaEditLink": "directoryObjects/8ead8183-0c68-46e2-96b9-66b296e74655/Microsoft.DirectoryServices.Application/logo", - "logo@odata.mediaContentType": "application/json;odata=minimalmetadata; charset=utf-8", - "logoUrl": null, "mainLogo@odata.mediaEditLink": "directoryObjects/8ead8183-0c68-46e2-96b9-66b296e74655/Microsoft.DirectoryServices.Application/mainLogo", - "oauth2AllowIdTokenImplicitFlow": true, "oauth2AllowImplicitFlow": false, - "oauth2AllowUrlPathMatching": false, "oauth2Permissions": [{"adminConsentDescription": - "Allow the application to access cli-test-app on behalf of the signed-in user.", - "adminConsentDisplayName": "Access cli-test-app", "id": "040bfe4e-8818-477f-bcb8-ce44be8c693b", - "isEnabled": true, "type": "User", "userConsentDescription": "Allow the application - to access cli-test-app on your behalf.", "userConsentDisplayName": "Access - cli-test-app", "value": "user_impersonation"}], "oauth2RequirePostResponse": - false, "optionalClaims": null, "orgRestrictions": [], "parentalControlSettings": - {"countriesBlockedForMinors": [], "legalAgeGroupRule": "Allow"}, "passwordCredentials": - [], "publicClient": null, "publisherDomain": "AzureSDKTeam.onmicrosoft.com", - "recordConsentConditions": null, "replyUrls": [], "requiredResourceAccess": - [], "samlMetadataUrl": null, "signInAudience": "AzureADMyOrg", "tokenEncryptionKeyId": - null}' + string: '{"@odata.context":"https://graph.microsoft.com/v1.0/$metadata#applications/$entity","id":"30c2deaa-2ea2-4208-b51d-ebe81e1c9805","deletedDateTime":null,"appId":"bb58dfe8-db67-4d3c-bbe9-fc8ac96077a5","applicationTemplateId":null,"disabledByMicrosoftStatus":null,"createdDateTime":"2022-07-22T09:07:32Z","displayName":"cli-test-app","description":null,"groupMembershipClaims":null,"identifierUris":[],"isDeviceOnlyAuthSupported":null,"isFallbackPublicClient":null,"notes":null,"publisherDomain":"AzureSDKTeam.onmicrosoft.com","serviceManagementReference":null,"signInAudience":"AzureADandPersonalMicrosoftAccount","tags":[],"tokenEncryptionKeyId":null,"samlMetadataUrl":null,"defaultRedirectUri":null,"certification":null,"optionalClaims":null,"addIns":[],"api":{"acceptMappedClaims":null,"knownClientApplications":[],"requestedAccessTokenVersion":2,"oauth2PermissionScopes":[],"preAuthorizedApplications":[]},"appRoles":[],"info":{"logoUrl":null,"marketingUrl":null,"privacyStatementUrl":null,"supportUrl":null,"termsOfServiceUrl":null},"keyCredentials":[],"parentalControlSettings":{"countriesBlockedForMinors":[],"legalAgeGroupRule":"Allow"},"passwordCredentials":[],"publicClient":{"redirectUris":[]},"requiredResourceAccess":[],"verifiedPublisher":{"displayName":null,"verifiedPublisherId":null,"addedDateTime":null},"web":{"homePageUrl":null,"logoutUrl":null,"redirectUris":[],"implicitGrantSettings":{"enableAccessTokenIssuance":false,"enableIdTokenIssuance":false}},"spa":{"redirectUris":[]}}' headers: - access-control-allow-origin: - - '*' cache-control: - no-cache content-length: - - '2146' + - '1497' content-type: - - application/json; odata=minimalmetadata; streaming=true; charset=utf-8 - dataserviceversion: - - 3.0; + - application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8 date: - - Wed, 23 Mar 2022 07:00:17 GMT - duration: - - '9222844' - expires: - - '-1' - location: - - https://graph.windows.net/00000000-0000-0000-0000-000000000000/directoryObjects/8ead8183-0c68-46e2-96b9-66b296e74655/Microsoft.DirectoryServices.Application - ocp-aad-diagnostics-server-name: - - bok2BU4Ji+hvjYowwnxGW3Vi6DvY04Up/6DslzKVqog= - ocp-aad-session-key: - - k_mH_GuMvUeyCSuCuws01TAEETpBbFgyfLlUvkt2ZFKTa3qzH93zSmwHxG0GYBBeuE3G9yvIiBKV3_Celdq7Lm60pvIn1BMPS58mWSQjrT4sYOLlYYxukRi2EWHMMlzW6LkEOP8RzJN7xSAma_bDppdq9WJd92drK36w3bt8Ujk.XX6hKLYaI4nDYcqu8Prl4Z8TX-Zj3FKxGDz4jKo2iF0 - pragma: - - no-cache + - Tue, 26 Jul 2022 03:47:40 GMT + odata-version: + - '4.0' request-id: - - cdac58b3-e4e1-4dac-8984-817495807677 + - 5ab896c3-8053-4f89-894e-a84f200c1ff6 strict-transport-security: - - max-age=31536000; includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-ms-dirapi-data-contract-version: - - '1.6' + - max-age=31536000 + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-ms-ags-diagnostic: + - '{"ServerInfo":{"DataCenter":"Southeast Asia","Slice":"E","Ring":"5","ScaleUnit":"000","RoleInstance":"SI1PEPF00001A30"}}' x-ms-resource-unit: - '1' - x-powered-by: - - ASP.NET status: - code: 201 - message: Created + code: 200 + message: OK - request: body: null headers: @@ -166,21 +191,21 @@ interactions: ParameterSetName: - -n -g --aad-client-id --aad-tenant-id --tags User-Agent: - - AZURECLI/2.34.1 azsdk-python-azure-mgmt-resource/20.0.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.38.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.9 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_stack_hci_000001?api-version=2021-04-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_stack_hci_cluster000001?api-version=2021-04-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_stack_hci_000001","name":"cli_test_stack_hci_000001","type":"Microsoft.Resources/resourceGroups","location":"eastus","tags":{"product":"azurecli","cause":"automation","date":"2022-03-23T07:00:12Z"},"properties":{"provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_stack_hci_cluster000001","name":"cli_test_stack_hci_cluster000001","type":"Microsoft.Resources/resourceGroups","location":"eastus","tags":{"product":"azurecli","cause":"automation","date":"2022-07-26T03:47:32Z"},"properties":{"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache content-length: - - '328' + - '342' content-type: - application/json; charset=utf-8 date: - - Wed, 23 Mar 2022 07:00:19 GMT + - Tue, 26 Jul 2022 03:47:40 GMT expires: - '-1' pragma: @@ -196,7 +221,7 @@ interactions: message: OK - request: body: '{"tags": {"key0": "value0"}, "location": "eastus", "properties": {"aadClientId": - "bbc01c55-41e0-442e-9f8c-29a556c91a15", "aadTenantId": "54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"}}' + "bb58dfe8-db67-4d3c-bbe9-fc8ac96077a5", "aadTenantId": "54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"}}' headers: Accept: - application/json @@ -213,25 +238,27 @@ interactions: ParameterSetName: - -n -g --aad-client-id --aad-tenant-id --tags User-Agent: - - AZURECLI/2.34.1 azsdk-python-mgmt-azurestackhci/1.0.0b1 Python/3.8.10 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.38.0 azsdk-python-mgmt-azurestackhci/1.0.0b1 Python/3.8.9 (Windows-10-10.0.22000-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_stack_hci_000001/providers/Microsoft.AzureStackHCI/clusters/cli-test-cluster?api-version=2022-01-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_stack_hci_cluster000001/providers/Microsoft.AzureStackHCI/clusters/cli-test-cluster?api-version=2022-05-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_stack_hci_000001/providers/Microsoft.AzureStackHCI/clusters/cli-test-cluster","name":"cli-test-cluster","type":"microsoft.azurestackhci/clusters","location":"eastus","tags":{"key0":"value0"},"systemData":{"createdBy":"ethanyang@microsoft.com","createdByType":"User","createdAt":"2022-03-23T07:00:25.0599268Z","lastModifiedBy":"ethanyang@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-03-23T07:00:25.0599268Z"},"properties":{"provisioningState":"Succeeded","status":"NotYetRegistered","cloudId":"e57bda20-ff01-4be3-870e-69a475743974","aadClientId":"bbc01c55-41e0-442e-9f8c-29a556c91a15","aadTenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","desiredProperties":{"windowsServerSubscription":"Disabled","diagnosticLevel":"Basic"},"trialDaysRemaining":60,"billingModel":"Trial"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_stack_hci_cluster000001/providers/Microsoft.AzureStackHCI/clusters/cli-test-cluster","name":"cli-test-cluster","type":"microsoft.azurestackhci/clusters","location":"eastus","tags":{"key0":"value0"},"systemData":{"createdBy":"v-jingszhang@microsoft.com","createdByType":"User","createdAt":"2022-07-26T03:47:45.1829608Z","lastModifiedBy":"v-jingszhang@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-07-26T03:47:45.1829608Z"},"properties":{"provisioningState":"Succeeded","status":"NotYetRegistered","cloudId":"faa210e5-f3a2-4842-a4d6-ac6110723cb9","aadClientId":"bb58dfe8-db67-4d3c-bbe9-fc8ac96077a5","aadTenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","desiredProperties":{"windowsServerSubscription":"Disabled","diagnosticLevel":"Basic"},"trialDaysRemaining":60,"billingModel":"Trial","serviceEndpoint":"https://dp.stackhci.azure.com/eastus/"}}' headers: cache-control: - no-cache content-length: - - '876' + - '947' content-type: - application/json; charset=utf-8 date: - - Wed, 23 Mar 2022 07:00:26 GMT + - Tue, 26 Jul 2022 03:47:47 GMT etag: - - '"8700ae64-0000-0100-0000-623ac5890000"' + - '"0000b987-0000-0100-0000-62df63e10000"' expires: - '-1' + mise-correlation-id: + - b76e5721-8b91-41fa-9e0f-54a7693c870b pragma: - no-cache request-context: @@ -247,9 +274,111 @@ interactions: x-ms-providerhub-traffic: - 'True' x-ms-ratelimit-remaining-subscription-writes: + - '1198' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - stack-hci cluster create-identity + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - --cluster-name -g + User-Agent: + - AZURECLI/2.38.0 azsdk-python-mgmt-azurestackhci/1.0.0b1 Python/3.8.9 (Windows-10-10.0.22000-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_stack_hci_cluster000001/providers/Microsoft.AzureStackHCI/clusters/cli-test-cluster/createClusterIdentity?api-version=2022-05-01 + response: + body: + string: 'null' + headers: + azure-asyncoperation: + - https://management.azure.com/providers/Microsoft.AzureStackHCI/locations/EASTUS/operationStatuses/9c2bcd12-b280-4177-9a7d-77388d84d301*353E54AAC6E19629A609A93811E23828F4A3214452793080CDF5ACD98B533EE6?api-version=2022-05-01 + cache-control: + - no-cache + content-length: + - '4' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 26 Jul 2022 03:47:49 GMT + expires: + - '-1' + location: + - https://management.azure.com/providers/Microsoft.AzureStackHCI/locations/EASTUS/operationStatuses/9c2bcd12-b280-4177-9a7d-77388d84d301*353E54AAC6E19629A609A93811E23828F4A3214452793080CDF5ACD98B533EE6?api-version=2022-05-01 + mise-correlation-id: + - 8cd6d6ea-a652-462a-83e8-ab914902f81b + pragma: + - no-cache + request-context: + - appId= + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-writes: - '1199' x-powered-by: - ASP.NET + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - stack-hci cluster create-identity + Connection: + - keep-alive + ParameterSetName: + - --cluster-name -g + User-Agent: + - AZURECLI/2.38.0 azsdk-python-mgmt-azurestackhci/1.0.0b1 Python/3.8.9 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/providers/Microsoft.AzureStackHCI/locations/EASTUS/operationStatuses/9c2bcd12-b280-4177-9a7d-77388d84d301*353E54AAC6E19629A609A93811E23828F4A3214452793080CDF5ACD98B533EE6?api-version=2022-05-01 + response: + body: + string: '{"id":"/providers/Microsoft.AzureStackHCI/locations/EASTUS/operationStatuses/9c2bcd12-b280-4177-9a7d-77388d84d301*353E54AAC6E19629A609A93811E23828F4A3214452793080CDF5ACD98B533EE6","name":"9c2bcd12-b280-4177-9a7d-77388d84d301*353E54AAC6E19629A609A93811E23828F4A3214452793080CDF5ACD98B533EE6","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_stack_hci_cluster000001/providers/Microsoft.AzureStackHCI/clusters/cli-test-cluster","status":"Succeeded","startTime":"2022-07-26T03:47:49.0622932Z","endTime":"2022-07-26T03:47:51.5785928Z","properties":null}' + headers: + cache-control: + - no-cache + content-length: + - '589' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 26 Jul 2022 03:48:19 GMT + etag: + - '"0a001346-0000-0100-0000-62df63e70000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff status: code: 200 message: OK @@ -267,21 +396,21 @@ interactions: ParameterSetName: - -g User-Agent: - - AZURECLI/2.34.1 azsdk-python-mgmt-azurestackhci/1.0.0b1 Python/3.8.10 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.38.0 azsdk-python-mgmt-azurestackhci/1.0.0b1 Python/3.8.9 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_stack_hci_000001/providers/Microsoft.AzureStackHCI/clusters?api-version=2022-01-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_stack_hci_cluster000001/providers/Microsoft.AzureStackHCI/clusters?api-version=2022-05-01 response: body: - string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_stack_hci_000001/providers/Microsoft.AzureStackHCI/clusters/cli-test-cluster","name":"cli-test-cluster","type":"microsoft.azurestackhci/clusters","location":"eastus","tags":{"key0":"value0"},"properties":{"provisioningState":"Succeeded","status":"NotYetRegistered","cloudId":"e57bda20-ff01-4be3-870e-69a475743974","aadClientId":"bbc01c55-41e0-442e-9f8c-29a556c91a15","aadTenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","desiredProperties":{"windowsServerSubscription":"Disabled","diagnosticLevel":"Basic"},"trialDaysRemaining":60,"billingModel":"Trial"}}]}' + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_stack_hci_cluster000001/providers/Microsoft.AzureStackHCI/clusters/cli-test-cluster","name":"cli-test-cluster","type":"microsoft.azurestackhci/clusters","location":"eastus","tags":{"key0":"value0"},"properties":{"provisioningState":"Succeeded","status":"NotYetRegistered","cloudId":"faa210e5-f3a2-4842-a4d6-ac6110723cb9","aadClientId":"2f7a7d2f-c0e6-4dfd-bb71-e1f2628bdcbb","aadTenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","aadServicePrincipalObjectId":"cdd33ee2-31a0-44ef-a979-af64026b5395","aadApplicationObjectId":"377c7718-8dd4-4260-9295-6006b3ba9708","desiredProperties":{"windowsServerSubscription":"Disabled","diagnosticLevel":"Basic"},"trialDaysRemaining":60,"billingModel":"Trial","serviceEndpoint":"https://dp.stackhci.azure.com/eastus/"}}]}' headers: cache-control: - no-cache content-length: - - '650' + - '848' content-type: - application/json; charset=utf-8 date: - - Wed, 23 Mar 2022 07:00:29 GMT + - Tue, 26 Jul 2022 03:48:22 GMT expires: - '-1' pragma: @@ -293,11 +422,12 @@ interactions: x-content-type-options: - nosniff x-ms-original-request-ids: - - ef365e4b-6e99-4a8a-8435-ef44aa102e22 - - a1f46255-d898-4e2a-a172-14acc9552e50 - - 0e8265da-53ba-4a2e-87d6-55923b87ff35 - - e540d1e4-3384-41fc-9013-ded14a16d282 - - a6608040-7706-4c96-b40e-961cb97b0978 + - 3c1acc34-7df8-4963-9199-5e2730a4dae7 + - c7f63503-f819-4c35-b232-2d01957a1d0f + - 5f2f22a4-97ed-4afb-bb59-d3a9e1f8c8c0 + - 02a9026e-b0ba-4cd2-bad1-c6bac84e41e5 + - a05f2692-f010-43e0-b1c7-0746b4f72f19 + - 548860b5-ad6e-48ff-9a40-0e8199006b6f status: code: 200 message: OK @@ -319,25 +449,27 @@ interactions: ParameterSetName: - -n -g --tags User-Agent: - - AZURECLI/2.34.1 azsdk-python-mgmt-azurestackhci/1.0.0b1 Python/3.8.10 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.38.0 azsdk-python-mgmt-azurestackhci/1.0.0b1 Python/3.8.9 (Windows-10-10.0.22000-SP0) method: PATCH - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_stack_hci_000001/providers/Microsoft.AzureStackHCI/clusters/cli-test-cluster?api-version=2022-01-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_stack_hci_cluster000001/providers/Microsoft.AzureStackHCI/clusters/cli-test-cluster?api-version=2022-05-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_stack_hci_000001/providers/Microsoft.AzureStackHCI/clusters/cli-test-cluster","name":"cli-test-cluster","type":"microsoft.azurestackhci/clusters","location":"eastus","tags":{"key0":"value1"},"systemData":{"createdBy":"ethanyang@microsoft.com","createdByType":"User","createdAt":"2022-03-23T07:00:25.0599268Z","lastModifiedBy":"ethanyang@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-03-23T07:00:31.1835407Z"},"properties":{"status":"NotYetRegistered","cloudId":"e57bda20-ff01-4be3-870e-69a475743974","aadClientId":"bbc01c55-41e0-442e-9f8c-29a556c91a15","aadTenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","desiredProperties":{"windowsServerSubscription":"Disabled","diagnosticLevel":"Basic"},"trialDaysRemaining":60,"billingModel":"Trial","provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_stack_hci_cluster000001/providers/Microsoft.AzureStackHCI/clusters/cli-test-cluster","name":"cli-test-cluster","type":"microsoft.azurestackhci/clusters","location":"eastus","tags":{"key0":"value1"},"systemData":{"createdBy":"v-jingszhang@microsoft.com","createdByType":"User","createdAt":"2022-07-26T03:47:45.1829608Z","lastModifiedBy":"v-jingszhang@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-07-26T03:48:24.8463408Z"},"properties":{"status":"NotYetRegistered","cloudId":"faa210e5-f3a2-4842-a4d6-ac6110723cb9","aadClientId":"2f7a7d2f-c0e6-4dfd-bb71-e1f2628bdcbb","aadTenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","aadServicePrincipalObjectId":"cdd33ee2-31a0-44ef-a979-af64026b5395","aadApplicationObjectId":"377c7718-8dd4-4260-9295-6006b3ba9708","desiredProperties":{"windowsServerSubscription":"Disabled","diagnosticLevel":"Basic"},"trialDaysRemaining":60,"billingModel":"Trial","provisioningState":"Succeeded","serviceEndpoint":"https://dp.stackhci.azure.com/eastus/"}}' headers: cache-control: - no-cache content-length: - - '876' + - '1080' content-type: - application/json; charset=utf-8 date: - - Wed, 23 Mar 2022 07:00:33 GMT + - Tue, 26 Jul 2022 03:48:27 GMT etag: - - '"8700c864-0000-0100-0000-623ac5900000"' + - '"0000bb87-0000-0100-0000-62df64090000"' expires: - '-1' + mise-correlation-id: + - a070f362-aee3-4f0e-8316-d61f2929607e pragma: - no-cache request-context: @@ -373,25 +505,27 @@ interactions: ParameterSetName: - -n -g User-Agent: - - AZURECLI/2.34.1 azsdk-python-mgmt-azurestackhci/1.0.0b1 Python/3.8.10 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.38.0 azsdk-python-mgmt-azurestackhci/1.0.0b1 Python/3.8.9 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_stack_hci_000001/providers/Microsoft.AzureStackHCI/clusters/cli-test-cluster?api-version=2022-01-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_stack_hci_cluster000001/providers/Microsoft.AzureStackHCI/clusters/cli-test-cluster?api-version=2022-05-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_stack_hci_000001/providers/Microsoft.AzureStackHCI/clusters/cli-test-cluster","name":"cli-test-cluster","type":"microsoft.azurestackhci/clusters","location":"eastus","tags":{"key0":"value1"},"properties":{"provisioningState":"Succeeded","status":"NotYetRegistered","cloudId":"e57bda20-ff01-4be3-870e-69a475743974","aadClientId":"bbc01c55-41e0-442e-9f8c-29a556c91a15","aadTenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","desiredProperties":{"windowsServerSubscription":"Disabled","diagnosticLevel":"Basic"},"trialDaysRemaining":60,"billingModel":"Trial"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_stack_hci_cluster000001/providers/Microsoft.AzureStackHCI/clusters/cli-test-cluster","name":"cli-test-cluster","type":"microsoft.azurestackhci/clusters","location":"eastus","tags":{"key0":"value1"},"properties":{"provisioningState":"Succeeded","status":"NotYetRegistered","cloudId":"faa210e5-f3a2-4842-a4d6-ac6110723cb9","aadClientId":"2f7a7d2f-c0e6-4dfd-bb71-e1f2628bdcbb","aadTenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","aadServicePrincipalObjectId":"cdd33ee2-31a0-44ef-a979-af64026b5395","aadApplicationObjectId":"377c7718-8dd4-4260-9295-6006b3ba9708","desiredProperties":{"windowsServerSubscription":"Disabled","diagnosticLevel":"Basic"},"trialDaysRemaining":60,"billingModel":"Trial","serviceEndpoint":"https://dp.stackhci.azure.com/eastus/"}}' headers: cache-control: - no-cache content-length: - - '638' + - '836' content-type: - application/json; charset=utf-8 date: - - Wed, 23 Mar 2022 07:00:35 GMT + - Tue, 26 Jul 2022 03:48:29 GMT etag: - - '"8700c864-0000-0100-0000-623ac5900000"' + - '"0000bb87-0000-0100-0000-62df64090000"' expires: - '-1' + mise-correlation-id: + - 542e6a61-58a8-4873-979c-8be7197bf4eb pragma: - no-cache request-context: @@ -427,15 +561,15 @@ interactions: ParameterSetName: - -n -g --yes User-Agent: - - AZURECLI/2.34.1 azsdk-python-mgmt-azurestackhci/1.0.0b1 Python/3.8.10 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.38.0 azsdk-python-mgmt-azurestackhci/1.0.0b1 Python/3.8.9 (Windows-10-10.0.22000-SP0) method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_stack_hci_000001/providers/Microsoft.AzureStackHCI/clusters/cli-test-cluster?api-version=2022-01-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_stack_hci_cluster000001/providers/Microsoft.AzureStackHCI/clusters/cli-test-cluster?api-version=2022-05-01 response: body: string: 'null' headers: azure-asyncoperation: - - https://management.azure.com/providers/Microsoft.AzureStackHCI/locations/EASTUS/operationStatuses/354e4dfc-c2e8-4875-9b6f-1d2d7ff3c3f5*6A7C0DC44D71D0023FCD46C34BF2EDA2815905B784D5CD4A801557854EBD15AB?api-version=2022-01-01 + - https://management.azure.com/providers/Microsoft.AzureStackHCI/locations/EASTUS/operationStatuses/4eaa945f-7363-4ea1-8ed6-07895ba23952*353E54AAC6E19629A609A93811E23828F4A3214452793080CDF5ACD98B533EE6?api-version=2022-05-01 cache-control: - no-cache content-length: @@ -443,13 +577,13 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 23 Mar 2022 07:00:37 GMT + - Tue, 26 Jul 2022 03:48:31 GMT etag: - - '"8700da64-0000-0100-0000-623ac5950000"' + - '"0000bd87-0000-0100-0000-62df640f0000"' expires: - '-1' location: - - https://management.azure.com/providers/Microsoft.AzureStackHCI/locations/EASTUS/operationStatuses/354e4dfc-c2e8-4875-9b6f-1d2d7ff3c3f5*6A7C0DC44D71D0023FCD46C34BF2EDA2815905B784D5CD4A801557854EBD15AB?api-version=2022-01-01 + - https://management.azure.com/providers/Microsoft.AzureStackHCI/locations/EASTUS/operationStatuses/4eaa945f-7363-4ea1-8ed6-07895ba23952*353E54AAC6E19629A609A93811E23828F4A3214452793080CDF5ACD98B533EE6?api-version=2022-05-01 pragma: - no-cache strict-transport-security: @@ -467,183 +601,88 @@ interactions: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: - - ad app delete + - stack-hci cluster delete Connection: - keep-alive ParameterSetName: - - --id + - -n -g --yes User-Agent: - - python/3.8.10 (Windows-10-10.0.19044-SP0) msrest/0.6.21 msrest_azure/0.6.4 - azure-graphrbac/0.60.0 Azure-SDK-For-Python AZURECLI/2.34.1 - accept-language: - - en-US + - AZURECLI/2.38.0 azsdk-python-mgmt-azurestackhci/1.0.0b1 Python/3.8.9 (Windows-10-10.0.22000-SP0) method: GET - uri: https://graph.windows.net/00000000-0000-0000-0000-000000000000/applications?$filter=identifierUris%2Fany%28s%3As%20eq%20%27bbc01c55-41e0-442e-9f8c-29a556c91a15%27%29&api-version=1.6 + uri: https://management.azure.com/providers/Microsoft.AzureStackHCI/locations/EASTUS/operationStatuses/4eaa945f-7363-4ea1-8ed6-07895ba23952*353E54AAC6E19629A609A93811E23828F4A3214452793080CDF5ACD98B533EE6?api-version=2022-05-01 response: body: - string: '{"odata.metadata":"https://graph.windows.net/00000000-0000-0000-0000-000000000000/$metadata#directoryObjects","value":[]}' + string: '{"id":"/providers/Microsoft.AzureStackHCI/locations/EASTUS/operationStatuses/4eaa945f-7363-4ea1-8ed6-07895ba23952*353E54AAC6E19629A609A93811E23828F4A3214452793080CDF5ACD98B533EE6","name":"4eaa945f-7363-4ea1-8ed6-07895ba23952*353E54AAC6E19629A609A93811E23828F4A3214452793080CDF5ACD98B533EE6","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_stack_hci_cluster000001/providers/Microsoft.AzureStackHCI/clusters/cli-test-cluster","status":"Deleting","startTime":"2022-07-26T03:48:30.887575Z"}' headers: - access-control-allow-origin: - - '*' cache-control: - no-cache content-length: - - '121' + - '528' content-type: - - application/json; odata=minimalmetadata; streaming=true; charset=utf-8 - dataserviceversion: - - 3.0; + - application/json; charset=utf-8 date: - - Wed, 23 Mar 2022 07:00:38 GMT - duration: - - '1253183' + - Tue, 26 Jul 2022 03:49:01 GMT + etag: + - '"0a004a46-0000-0100-0000-62df640e0000"' expires: - '-1' - ocp-aad-diagnostics-server-name: - - qBTzaI+s9OgEvLE9u5bpXx6gx3nR9y2WJffM9k2NZaw= - ocp-aad-session-key: - - pdOtk3zQrRS3jkE85bbOfpChc_oNMwvIPXsqlNtf8hligs9SDcZXhHbEgfCrvbU-Wyw-te5lony1F409E9Z-XDxBYj0HNaDCL6i67mZbmyNmieYWYZJbxmYBo7fHUekDBht_QoRW_hZPsjPvUfVzZqjCuzHQr4xCiscKPKhJ_eI._jlXnbqCezNz-LPVaZMuzBC3NjQEj-aRcmdqpEYV_Ao pragma: - no-cache - request-id: - - 916c805a-b5dd-4dc0-ba01-1db832d1cec0 strict-transport-security: - max-age=31536000; includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-ms-dirapi-data-contract-version: - - '1.6' - x-ms-resource-unit: - - '2' - x-powered-by: - - ASP.NET + x-content-type-options: + - nosniff status: - code: 200 - message: OK + code: 202 + message: Accepted - request: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: - - ad app delete + - stack-hci cluster delete Connection: - keep-alive ParameterSetName: - - --id + - -n -g --yes User-Agent: - - python/3.8.10 (Windows-10-10.0.19044-SP0) msrest/0.6.21 msrest_azure/0.6.4 - azure-graphrbac/0.60.0 Azure-SDK-For-Python AZURECLI/2.34.1 - accept-language: - - en-US + - AZURECLI/2.38.0 azsdk-python-mgmt-azurestackhci/1.0.0b1 Python/3.8.9 (Windows-10-10.0.22000-SP0) method: GET - uri: https://graph.windows.net/00000000-0000-0000-0000-000000000000/applications?$filter=appId%20eq%20%27bbc01c55-41e0-442e-9f8c-29a556c91a15%27&api-version=1.6 + uri: https://management.azure.com/providers/Microsoft.AzureStackHCI/locations/EASTUS/operationStatuses/4eaa945f-7363-4ea1-8ed6-07895ba23952*353E54AAC6E19629A609A93811E23828F4A3214452793080CDF5ACD98B533EE6?api-version=2022-05-01 response: body: - string: '{"odata.metadata":"https://graph.windows.net/00000000-0000-0000-0000-000000000000/$metadata#directoryObjects","value":[{"odata.type":"Microsoft.DirectoryServices.Application","objectType":"Application","objectId":"8ead8183-0c68-46e2-96b9-66b296e74655","deletionTimestamp":null,"acceptMappedClaims":null,"addIns":[],"appId":"bbc01c55-41e0-442e-9f8c-29a556c91a15","applicationTemplateId":null,"appRoles":[],"availableToOtherTenants":false,"displayName":"cli-test-app","errorUrl":null,"groupMembershipClaims":null,"homepage":null,"identifierUris":[],"informationalUrls":{"termsOfService":null,"support":null,"privacy":null,"marketing":null},"isDeviceOnlyAuthSupported":null,"keyCredentials":[],"knownClientApplications":[],"logoutUrl":null,"logo@odata.mediaEditLink":"directoryObjects/8ead8183-0c68-46e2-96b9-66b296e74655/Microsoft.DirectoryServices.Application/logo","logoUrl":null,"mainLogo@odata.mediaEditLink":"directoryObjects/8ead8183-0c68-46e2-96b9-66b296e74655/Microsoft.DirectoryServices.Application/mainLogo","oauth2AllowIdTokenImplicitFlow":true,"oauth2AllowImplicitFlow":false,"oauth2AllowUrlPathMatching":false,"oauth2Permissions":[{"adminConsentDescription":"Allow - the application to access cli-test-app on behalf of the signed-in user.","adminConsentDisplayName":"Access - cli-test-app","id":"040bfe4e-8818-477f-bcb8-ce44be8c693b","isEnabled":true,"type":"User","userConsentDescription":"Allow - the application to access cli-test-app on your behalf.","userConsentDisplayName":"Access - cli-test-app","value":"user_impersonation"}],"oauth2RequirePostResponse":false,"optionalClaims":null,"orgRestrictions":[],"parentalControlSettings":{"countriesBlockedForMinors":[],"legalAgeGroupRule":"Allow"},"passwordCredentials":[],"publicClient":null,"publisherDomain":"AzureSDKTeam.onmicrosoft.com","recordConsentConditions":null,"replyUrls":[],"requiredResourceAccess":[],"samlMetadataUrl":null,"signInAudience":"AzureADMyOrg","tokenEncryptionKeyId":null}]}' + string: '{"id":"/providers/Microsoft.AzureStackHCI/locations/EASTUS/operationStatuses/4eaa945f-7363-4ea1-8ed6-07895ba23952*353E54AAC6E19629A609A93811E23828F4A3214452793080CDF5ACD98B533EE6","name":"4eaa945f-7363-4ea1-8ed6-07895ba23952*353E54AAC6E19629A609A93811E23828F4A3214452793080CDF5ACD98B533EE6","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_stack_hci_cluster000001/providers/Microsoft.AzureStackHCI/clusters/cli-test-cluster","status":"Succeeded","startTime":"2022-07-26T03:48:30.887575Z","properties":null}' headers: - access-control-allow-origin: - - '*' cache-control: - no-cache content-length: - - '1955' + - '547' content-type: - - application/json; odata=minimalmetadata; streaming=true; charset=utf-8 - dataserviceversion: - - 3.0; + - application/json; charset=utf-8 date: - - Wed, 23 Mar 2022 07:00:39 GMT - duration: - - '6761091' + - Tue, 26 Jul 2022 03:49:31 GMT + etag: + - '"b100f605-0000-0500-0000-62df64310000"' expires: - '-1' - ocp-aad-diagnostics-server-name: - - HWBBdh+h9Y2P4ICVCYLiYcUnegArWP3IJrpm2FYEOVk= - ocp-aad-session-key: - - SWYAdCpi7TY1juvtpw0cKqDWLAHeNE4tfy5TMwG5U6hW90haFSxIsxeX5QuyV4l88qAaTD_cy4BOYenG-Iu-UMvApTif4dGvOVtdvUtcCQsxp57zt54dV3Qwjn4UtbrB4uBU5j7svNra_f569ozHzGDWeaU76ne3Xm1gj8LF1VI.-9R5NE63hUHzjmXJQ7ym-sBKJHP7-yXRg0LVB4w53dY pragma: - no-cache - request-id: - - 3d61cd98-232d-4006-a63d-bc3b69359359 strict-transport-security: - max-age=31536000; includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-ms-dirapi-data-contract-version: - - '1.6' - x-ms-resource-unit: - - '2' - x-powered-by: - - ASP.NET + transfer-encoding: + - chunked + 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: - - ad app delete - Connection: - - keep-alive - Content-Length: - - '0' - ParameterSetName: - - --id - User-Agent: - - python/3.8.10 (Windows-10-10.0.19044-SP0) msrest/0.6.21 msrest_azure/0.6.4 - azure-graphrbac/0.60.0 Azure-SDK-For-Python AZURECLI/2.34.1 - accept-language: - - en-US - method: DELETE - uri: https://graph.windows.net/00000000-0000-0000-0000-000000000000/applications/8ead8183-0c68-46e2-96b9-66b296e74655?api-version=1.6 - response: - body: - string: '' - headers: - access-control-allow-origin: - - '*' - cache-control: - - no-cache - date: - - Wed, 23 Mar 2022 07:00:40 GMT - duration: - - '2144424' - expires: - - '-1' - ocp-aad-diagnostics-server-name: - - qBTzaI+s9OgEvLE9u5bpXx6gx3nR9y2WJffM9k2NZaw= - ocp-aad-session-key: - - b1yY4KY3NRd2l3SywEqCdJd6Ylv3m5TDOZtYLACKfwNSGZ_Oiqm6hWeizau0hrCdp3aTS7E8Im4IyA9yTutcQytZR33kvTGPeRlD9WdYSo3DAPxW81_ThfCZDLnYD3BBwBfUzg0SmejGx7vgyieVcgz2Xl1f7jzkn5BaZ56_J8E.-IaTOniVEe-DDhakUbuG1LB204KzSJ5Kj0OHWwqEong - pragma: - - no-cache - request-id: - - a124deb7-aa40-4697-b616-e3256f520ab5 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-ms-dirapi-data-contract-version: - - '1.6' - x-ms-resource-unit: - - '1' - x-powered-by: - - ASP.NET - status: - code: 204 - message: No Content version: 1 diff --git a/src/stack-hci/azext_stack_hci/tests/latest/recordings/test_stack_hci_extension_crud.yaml b/src/stack-hci/azext_stack_hci/tests/latest/recordings/test_stack_hci_extension_crud.yaml index 4ca392e6fc0..a0632c1b9ce 100644 --- a/src/stack-hci/azext_stack_hci/tests/latest/recordings/test_stack_hci_extension_crud.yaml +++ b/src/stack-hci/azext_stack_hci/tests/latest/recordings/test_stack_hci_extension_crud.yaml @@ -3,72 +3,7 @@ interactions: body: null headers: Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - ad app create - Connection: - - keep-alive - ParameterSetName: - - --display-name - User-Agent: - - python/3.8.10 (Windows-10-10.0.19044-SP0) msrest/0.6.21 msrest_azure/0.6.4 - azure-graphrbac/0.60.0 Azure-SDK-For-Python AZURECLI/2.34.1 - accept-language: - - en-US - method: GET - uri: https://graph.windows.net/00000000-0000-0000-0000-000000000000/applications?$filter=startswith%28displayName%2C%27cli-test-app%27%29&api-version=1.6 - response: - body: - string: '{"odata.metadata":"https://graph.windows.net/00000000-0000-0000-0000-000000000000/$metadata#directoryObjects","value":[{"odata.type":"Microsoft.DirectoryServices.Application","objectType":"Application","objectId":"2ddd80d9-80fa-4ef6-bc07-58af0824604c","deletionTimestamp":null,"acceptMappedClaims":null,"addIns":[],"appId":"19e87cb7-6317-4e39-a358-2de5b2b3d1ec","applicationTemplateId":null,"appRoles":[],"availableToOtherTenants":false,"displayName":"cli-test-app","errorUrl":null,"groupMembershipClaims":null,"homepage":null,"identifierUris":[],"informationalUrls":{"termsOfService":null,"support":null,"privacy":null,"marketing":null},"isDeviceOnlyAuthSupported":null,"keyCredentials":[],"knownClientApplications":[],"logoutUrl":null,"logo@odata.mediaEditLink":"directoryObjects/2ddd80d9-80fa-4ef6-bc07-58af0824604c/Microsoft.DirectoryServices.Application/logo","logoUrl":null,"mainLogo@odata.mediaEditLink":"directoryObjects/2ddd80d9-80fa-4ef6-bc07-58af0824604c/Microsoft.DirectoryServices.Application/mainLogo","oauth2AllowIdTokenImplicitFlow":true,"oauth2AllowImplicitFlow":false,"oauth2AllowUrlPathMatching":false,"oauth2Permissions":[{"adminConsentDescription":"Allow - the application to access cli-test-app on behalf of the signed-in user.","adminConsentDisplayName":"Access - cli-test-app","id":"5643deba-94a1-40f2-8ff5-290c44396a5c","isEnabled":true,"type":"User","userConsentDescription":"Allow - the application to access cli-test-app on your behalf.","userConsentDisplayName":"Access - cli-test-app","value":"user_impersonation"}],"oauth2RequirePostResponse":false,"optionalClaims":null,"orgRestrictions":[],"parentalControlSettings":{"countriesBlockedForMinors":[],"legalAgeGroupRule":"Allow"},"passwordCredentials":[],"publicClient":null,"publisherDomain":"AzureSDKTeam.onmicrosoft.com","recordConsentConditions":null,"replyUrls":[],"requiredResourceAccess":[],"samlMetadataUrl":null,"signInAudience":"AzureADMyOrg","tokenEncryptionKeyId":null}]}' - headers: - access-control-allow-origin: - - '*' - cache-control: - - no-cache - content-length: - - '1955' - content-type: - - application/json; odata=minimalmetadata; streaming=true; charset=utf-8 - dataserviceversion: - - 3.0; - date: - - Fri, 01 Apr 2022 06:46:54 GMT - duration: - - '7861973' - expires: - - '-1' - ocp-aad-diagnostics-server-name: - - hDkM4DKmUH+RXXxsm6yUgqndyON1tQZzu6SAVcF2+Fw= - ocp-aad-session-key: - - oMlP1RFkNUIZNACfirzzNFK5IVELQXv9fOSvpJCjo5Qwl8L1GR3SXtvP4Mc3V8FwkM2Cr9SD9e2UK9W7KVdaoY3ZaqqVJRyHKXbt9Z4me-GPS6PKaZBa25WITK-Jg6My.5K4Rz8SkCMqbUitJzxkDktzQklCKwu6T10WwEya3TcI - pragma: - - no-cache - request-id: - - 5731117d-d352-4c8c-af8d-04e0ffd4af11 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-ms-dirapi-data-contract-version: - - '1.6' - x-ms-resource-unit: - - '2' - x-powered-by: - - ASP.NET - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: @@ -78,50 +13,35 @@ interactions: ParameterSetName: - --display-name User-Agent: - - python/3.8.10 (Windows-10-10.0.19044-SP0) msrest/0.6.21 msrest_azure/0.6.4 - azure-graphrbac/0.60.0 Azure-SDK-For-Python AZURECLI/2.34.1 - accept-language: - - en-US + - python/3.8.9 (Windows-10-10.0.22000-SP0) AZURECLI/2.38.0 method: GET - uri: https://graph.windows.net/00000000-0000-0000-0000-000000000000/applications?$filter=identifierUris%2Fany%28s%3As%20eq%20%2719e87cb7-6317-4e39-a358-2de5b2b3d1ec%27%29&api-version=1.6 + uri: https://graph.microsoft.com/v1.0/applications?$filter=startswith%28displayName%2C%27cli-test-app%27%29 response: body: - string: '{"odata.metadata":"https://graph.windows.net/00000000-0000-0000-0000-000000000000/$metadata#directoryObjects","value":[]}' + string: '{"@odata.context":"https://graph.microsoft.com/v1.0/$metadata#applications","value":[{"id":"30c2deaa-2ea2-4208-b51d-ebe81e1c9805","deletedDateTime":null,"appId":"bb58dfe8-db67-4d3c-bbe9-fc8ac96077a5","applicationTemplateId":null,"disabledByMicrosoftStatus":null,"createdDateTime":"2022-07-22T09:07:32Z","displayName":"cli-test-app","description":null,"groupMembershipClaims":null,"identifierUris":[],"isDeviceOnlyAuthSupported":null,"isFallbackPublicClient":null,"notes":null,"publisherDomain":"AzureSDKTeam.onmicrosoft.com","serviceManagementReference":null,"signInAudience":"AzureADandPersonalMicrosoftAccount","tags":[],"tokenEncryptionKeyId":null,"samlMetadataUrl":null,"defaultRedirectUri":null,"certification":null,"optionalClaims":null,"addIns":[],"api":{"acceptMappedClaims":null,"knownClientApplications":[],"requestedAccessTokenVersion":2,"oauth2PermissionScopes":[],"preAuthorizedApplications":[]},"appRoles":[],"info":{"logoUrl":null,"marketingUrl":null,"privacyStatementUrl":null,"supportUrl":null,"termsOfServiceUrl":null},"keyCredentials":[],"parentalControlSettings":{"countriesBlockedForMinors":[],"legalAgeGroupRule":"Allow"},"passwordCredentials":[],"publicClient":{"redirectUris":[]},"requiredResourceAccess":[],"verifiedPublisher":{"displayName":null,"verifiedPublisherId":null,"addedDateTime":null},"web":{"homePageUrl":null,"logoutUrl":null,"redirectUris":[],"implicitGrantSettings":{"enableAccessTokenIssuance":false,"enableIdTokenIssuance":false}},"spa":{"redirectUris":[]}}]}' headers: - access-control-allow-origin: - - '*' cache-control: - no-cache content-length: - - '121' + - '1501' content-type: - - application/json; odata=minimalmetadata; streaming=true; charset=utf-8 - dataserviceversion: - - 3.0; + - application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8 date: - - Fri, 01 Apr 2022 06:46:55 GMT - duration: - - '7073880' - expires: - - '-1' - ocp-aad-diagnostics-server-name: - - 9hRdRlWxd6Tt7PycZ2wVCdVgRYRmOH7aCJQI3NaJyoY= - ocp-aad-session-key: - - 4AuhKVNApfKoJkytv_P0UOTVy-1SZtr4GLe_UI2-FXjG-e7SU2Fit62OQvcUFMtxMXZloQkIW6auoUr5uT1z1E9twLpIvrprkXnEoiSjEvb2PuPzkdcz7GNTv7Huf3a9.GHL532zN0h2TEoZBr4_jJuHbMbm3WaMuhu8uX9Bp99c - pragma: - - no-cache + - Fri, 22 Jul 2022 09:50:11 GMT + odata-version: + - '4.0' request-id: - - 27c26416-fe5f-4c24-aa34-870c52651bb6 + - a4a83ee6-008a-4bca-8150-65e0fd5aa4a8 strict-transport-security: - - max-age=31536000; includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-ms-dirapi-data-contract-version: - - '1.6' + - max-age=31536000 + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-ms-ags-diagnostic: + - '{"ServerInfo":{"DataCenter":"Southeast Asia","Slice":"E","Ring":"5","ScaleUnit":"000","RoleInstance":"SI1PEPF000090C3"}}' x-ms-resource-unit: - '2' - x-powered-by: - - ASP.NET status: code: 200 message: OK @@ -129,7 +49,7 @@ interactions: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: @@ -139,72 +59,43 @@ interactions: ParameterSetName: - --display-name User-Agent: - - python/3.8.10 (Windows-10-10.0.19044-SP0) msrest/0.6.21 msrest_azure/0.6.4 - azure-graphrbac/0.60.0 Azure-SDK-For-Python AZURECLI/2.34.1 - accept-language: - - en-US + - python/3.8.9 (Windows-10-10.0.22000-SP0) AZURECLI/2.38.0 method: GET - uri: https://graph.windows.net/00000000-0000-0000-0000-000000000000/applications?$filter=appId%20eq%20%2719e87cb7-6317-4e39-a358-2de5b2b3d1ec%27&api-version=1.6 + uri: https://graph.microsoft.com/v1.0/applications?$filter=appId%20eq%20%2730c2deaa-2ea2-4208-b51d-ebe81e1c9805%27 response: body: - string: '{"odata.metadata":"https://graph.windows.net/00000000-0000-0000-0000-000000000000/$metadata#directoryObjects","value":[{"odata.type":"Microsoft.DirectoryServices.Application","objectType":"Application","objectId":"2ddd80d9-80fa-4ef6-bc07-58af0824604c","deletionTimestamp":null,"acceptMappedClaims":null,"addIns":[],"appId":"19e87cb7-6317-4e39-a358-2de5b2b3d1ec","applicationTemplateId":null,"appRoles":[],"availableToOtherTenants":false,"displayName":"cli-test-app","errorUrl":null,"groupMembershipClaims":null,"homepage":null,"identifierUris":[],"informationalUrls":{"termsOfService":null,"support":null,"privacy":null,"marketing":null},"isDeviceOnlyAuthSupported":null,"keyCredentials":[],"knownClientApplications":[],"logoutUrl":null,"logo@odata.mediaEditLink":"directoryObjects/2ddd80d9-80fa-4ef6-bc07-58af0824604c/Microsoft.DirectoryServices.Application/logo","logoUrl":null,"mainLogo@odata.mediaEditLink":"directoryObjects/2ddd80d9-80fa-4ef6-bc07-58af0824604c/Microsoft.DirectoryServices.Application/mainLogo","oauth2AllowIdTokenImplicitFlow":true,"oauth2AllowImplicitFlow":false,"oauth2AllowUrlPathMatching":false,"oauth2Permissions":[{"adminConsentDescription":"Allow - the application to access cli-test-app on behalf of the signed-in user.","adminConsentDisplayName":"Access - cli-test-app","id":"5643deba-94a1-40f2-8ff5-290c44396a5c","isEnabled":true,"type":"User","userConsentDescription":"Allow - the application to access cli-test-app on your behalf.","userConsentDisplayName":"Access - cli-test-app","value":"user_impersonation"}],"oauth2RequirePostResponse":false,"optionalClaims":null,"orgRestrictions":[],"parentalControlSettings":{"countriesBlockedForMinors":[],"legalAgeGroupRule":"Allow"},"passwordCredentials":[],"publicClient":null,"publisherDomain":"AzureSDKTeam.onmicrosoft.com","recordConsentConditions":null,"replyUrls":[],"requiredResourceAccess":[],"samlMetadataUrl":null,"signInAudience":"AzureADMyOrg","tokenEncryptionKeyId":null}]}' + string: '{"@odata.context":"https://graph.microsoft.com/v1.0/$metadata#applications","value":[]}' headers: - access-control-allow-origin: - - '*' cache-control: - no-cache content-length: - - '1955' + - '87' content-type: - - application/json; odata=minimalmetadata; streaming=true; charset=utf-8 - dataserviceversion: - - 3.0; + - application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8 date: - - Fri, 01 Apr 2022 06:46:56 GMT - duration: - - '7151280' - expires: - - '-1' - ocp-aad-diagnostics-server-name: - - bemZT5QaeJMNpUhF6NFf54ZoB7+Y0QaXbBw7rvGxaUM= - ocp-aad-session-key: - - Iq27GlnO8e0HeMctN_1K8mEzfkQWPlMHAPwMJEOeLwRsTqShtGxxti4SdCafJ46dmN8n4JzC2BF-aCsvzeHOm7a_mPLqJxBK8LI7vt1NqDUKzJUafDzIZoazAa2BNitI.wIs8J_PHeaUQ5oki9pfYQriDLUGf5LDMrHfe5b_KKDY - pragma: - - no-cache + - Fri, 22 Jul 2022 09:50:13 GMT + odata-version: + - '4.0' request-id: - - db8ea5b3-7b62-4b6e-a9ff-f41aa6452554 + - 8b15cf8b-e0be-4429-8eff-60a0d0a78efa strict-transport-security: - - max-age=31536000; includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-ms-dirapi-data-contract-version: - - '1.6' + - max-age=31536000 + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-ms-ags-diagnostic: + - '{"ServerInfo":{"DataCenter":"Southeast Asia","Slice":"E","Ring":"5","ScaleUnit":"000","RoleInstance":"SI1PEPF00001A30"}}' x-ms-resource-unit: - '2' - x-powered-by: - - ASP.NET status: code: 200 message: OK - request: - body: '{"appRoles": [], "availableToOtherTenants": false, "informationalUrls": - {}, "knownClientApplications": [], "oauth2AllowImplicitFlow": false, "oauth2AllowUrlPathMatching": - false, "oauth2Permissions": [{"adminConsentDescription": "Allow the application - to access cli-test-app on behalf of the signed-in user.", "adminConsentDisplayName": - "Access cli-test-app", "id": "5643deba-94a1-40f2-8ff5-290c44396a5c", "isEnabled": - true, "type": "User", "userConsentDescription": "Allow the application to access - cli-test-app on your behalf.", "userConsentDisplayName": "Access cli-test-app", - "value": "user_impersonation"}], "oauth2RequirePostResponse": false, "orgRestrictions": - [], "publisherDomain": "AzureSDKTeam.onmicrosoft.com", "replyUrls": [], "requiredResourceAccess": - [], "signInAudience": "AzureADMyOrg", "displayName": "cli-test-app", "identifierUris": - []}' + body: '{"displayName": "cli-test-app"}' headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: @@ -212,50 +103,31 @@ interactions: Connection: - keep-alive Content-Length: - - '855' + - '31' Content-Type: - - application/json; charset=utf-8 + - application/json ParameterSetName: - --display-name User-Agent: - - python/3.8.10 (Windows-10-10.0.19044-SP0) msrest/0.6.21 msrest_azure/0.6.4 - azure-graphrbac/0.60.0 Azure-SDK-For-Python AZURECLI/2.34.1 - accept-language: - - en-US + - python/3.8.9 (Windows-10-10.0.22000-SP0) AZURECLI/2.38.0 method: PATCH - uri: https://graph.windows.net/00000000-0000-0000-0000-000000000000/applications/2ddd80d9-80fa-4ef6-bc07-58af0824604c?api-version=1.6 + uri: https://graph.microsoft.com/v1.0/applications/30c2deaa-2ea2-4208-b51d-ebe81e1c9805 response: body: string: '' headers: - access-control-allow-origin: - - '*' cache-control: - no-cache date: - - Fri, 01 Apr 2022 06:46:58 GMT - duration: - - '7449072' - expires: - - '-1' - ocp-aad-diagnostics-server-name: - - MRkiVm64Jv6xR2CIcYYjPtzkhDz0WOhEAf16y1HfdVU= - ocp-aad-session-key: - - lITDDsBppu4Wf7eO5oL61G_w5O4_KCe2jeFERjABmhBZRZ83INIuvXBLy9mrtwy3EJNPZFmgwKa5fQQTBaXN-D093VRHb-ePH3fXAexyZY2pY7BfQQ5QctjwxWujVyNP.NKsDxPWyzaCaKrhSSs1Am2LE3H2JfbNx7TEXat6pCSc - pragma: - - no-cache + - Fri, 22 Jul 2022 09:50:14 GMT request-id: - - af1e7557-c436-495c-ae66-5a5e6d6d67a3 + - 91862385-7641-4e64-bb60-3c3a8f67ff83 strict-transport-security: - - max-age=31536000; includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-ms-dirapi-data-contract-version: - - '1.6' + - max-age=31536000 + x-ms-ags-diagnostic: + - '{"ServerInfo":{"DataCenter":"Southeast Asia","Slice":"E","Ring":"5","ScaleUnit":"000","RoleInstance":"SI1PEPF00001A46"}}' x-ms-resource-unit: - '1' - x-powered-by: - - ASP.NET status: code: 204 message: No Content @@ -263,68 +135,7 @@ interactions: body: null headers: Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - ad app create - Connection: - - keep-alive - ParameterSetName: - - --display-name - User-Agent: - - python/3.8.10 (Windows-10-10.0.19044-SP0) msrest/0.6.21 msrest_azure/0.6.4 - azure-graphrbac/0.60.0 Azure-SDK-For-Python AZURECLI/2.34.1 - accept-language: - - en-US - method: GET - uri: https://graph.windows.net/00000000-0000-0000-0000-000000000000/applications?$filter=identifierUris%2Fany%28s%3As%20eq%20%2719e87cb7-6317-4e39-a358-2de5b2b3d1ec%27%29&api-version=1.6 - response: - body: - string: '{"odata.metadata":"https://graph.windows.net/00000000-0000-0000-0000-000000000000/$metadata#directoryObjects","value":[]}' - headers: - access-control-allow-origin: - - '*' - cache-control: - - no-cache - content-length: - - '121' - content-type: - - application/json; odata=minimalmetadata; streaming=true; charset=utf-8 - dataserviceversion: - - 3.0; - date: - - Fri, 01 Apr 2022 06:46:59 GMT - duration: - - '1364883' - expires: - - '-1' - ocp-aad-diagnostics-server-name: - - MRkiVm64Jv6xR2CIcYYjPtzkhDz0WOhEAf16y1HfdVU= - ocp-aad-session-key: - - 8vVXANTYaeiuFUvPJDWCpFaTaMDrvQ-rTmCNYzKlnQ2szij-tEGLfLuN3nh9l8fLuXkvxSfBynK-XKu7SnG-z0LtED9apce6XG3qy3uNi3-L8m_sDW5cDa3VZ65Jxj5Q.DvCNRAMs4Gt6FpU5sJJkcgytn_3y1ev0D6YE9vFhLho - pragma: - - no-cache - request-id: - - 2febb9da-0726-4c3e-bd68-4877ab4df682 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-ms-dirapi-data-contract-version: - - '1.6' - x-ms-resource-unit: - - '2' - x-powered-by: - - ASP.NET - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: @@ -334,119 +145,35 @@ interactions: ParameterSetName: - --display-name User-Agent: - - python/3.8.10 (Windows-10-10.0.19044-SP0) msrest/0.6.21 msrest_azure/0.6.4 - azure-graphrbac/0.60.0 Azure-SDK-For-Python AZURECLI/2.34.1 - accept-language: - - en-US + - python/3.8.9 (Windows-10-10.0.22000-SP0) AZURECLI/2.38.0 method: GET - uri: https://graph.windows.net/00000000-0000-0000-0000-000000000000/applications?$filter=appId%20eq%20%2719e87cb7-6317-4e39-a358-2de5b2b3d1ec%27&api-version=1.6 + uri: https://graph.microsoft.com/v1.0/applications/30c2deaa-2ea2-4208-b51d-ebe81e1c9805 response: body: - string: '{"odata.metadata":"https://graph.windows.net/00000000-0000-0000-0000-000000000000/$metadata#directoryObjects","value":[{"odata.type":"Microsoft.DirectoryServices.Application","objectType":"Application","objectId":"2ddd80d9-80fa-4ef6-bc07-58af0824604c","deletionTimestamp":null,"acceptMappedClaims":null,"addIns":[],"appId":"19e87cb7-6317-4e39-a358-2de5b2b3d1ec","applicationTemplateId":null,"appRoles":[],"availableToOtherTenants":false,"displayName":"cli-test-app","errorUrl":null,"groupMembershipClaims":null,"homepage":null,"identifierUris":[],"informationalUrls":{"termsOfService":null,"support":null,"privacy":null,"marketing":null},"isDeviceOnlyAuthSupported":null,"keyCredentials":[],"knownClientApplications":[],"logoutUrl":null,"logo@odata.mediaEditLink":"directoryObjects/2ddd80d9-80fa-4ef6-bc07-58af0824604c/Microsoft.DirectoryServices.Application/logo","logoUrl":null,"mainLogo@odata.mediaEditLink":"directoryObjects/2ddd80d9-80fa-4ef6-bc07-58af0824604c/Microsoft.DirectoryServices.Application/mainLogo","oauth2AllowIdTokenImplicitFlow":true,"oauth2AllowImplicitFlow":false,"oauth2AllowUrlPathMatching":false,"oauth2Permissions":[{"adminConsentDescription":"Allow - the application to access cli-test-app on behalf of the signed-in user.","adminConsentDisplayName":"Access - cli-test-app","id":"5643deba-94a1-40f2-8ff5-290c44396a5c","isEnabled":true,"type":"User","userConsentDescription":"Allow - the application to access cli-test-app on your behalf.","userConsentDisplayName":"Access - cli-test-app","value":"user_impersonation"}],"oauth2RequirePostResponse":false,"optionalClaims":null,"orgRestrictions":[],"parentalControlSettings":{"countriesBlockedForMinors":[],"legalAgeGroupRule":"Allow"},"passwordCredentials":[],"publicClient":null,"publisherDomain":"AzureSDKTeam.onmicrosoft.com","recordConsentConditions":null,"replyUrls":[],"requiredResourceAccess":[],"samlMetadataUrl":null,"signInAudience":"AzureADMyOrg","tokenEncryptionKeyId":null}]}' + string: '{"@odata.context":"https://graph.microsoft.com/v1.0/$metadata#applications/$entity","id":"30c2deaa-2ea2-4208-b51d-ebe81e1c9805","deletedDateTime":null,"appId":"bb58dfe8-db67-4d3c-bbe9-fc8ac96077a5","applicationTemplateId":null,"disabledByMicrosoftStatus":null,"createdDateTime":"2022-07-22T09:07:32Z","displayName":"cli-test-app","description":null,"groupMembershipClaims":null,"identifierUris":[],"isDeviceOnlyAuthSupported":null,"isFallbackPublicClient":null,"notes":null,"publisherDomain":"AzureSDKTeam.onmicrosoft.com","serviceManagementReference":null,"signInAudience":"AzureADandPersonalMicrosoftAccount","tags":[],"tokenEncryptionKeyId":null,"samlMetadataUrl":null,"defaultRedirectUri":null,"certification":null,"optionalClaims":null,"addIns":[],"api":{"acceptMappedClaims":null,"knownClientApplications":[],"requestedAccessTokenVersion":2,"oauth2PermissionScopes":[],"preAuthorizedApplications":[]},"appRoles":[],"info":{"logoUrl":null,"marketingUrl":null,"privacyStatementUrl":null,"supportUrl":null,"termsOfServiceUrl":null},"keyCredentials":[],"parentalControlSettings":{"countriesBlockedForMinors":[],"legalAgeGroupRule":"Allow"},"passwordCredentials":[],"publicClient":{"redirectUris":[]},"requiredResourceAccess":[],"verifiedPublisher":{"displayName":null,"verifiedPublisherId":null,"addedDateTime":null},"web":{"homePageUrl":null,"logoutUrl":null,"redirectUris":[],"implicitGrantSettings":{"enableAccessTokenIssuance":false,"enableIdTokenIssuance":false}},"spa":{"redirectUris":[]}}' headers: - access-control-allow-origin: - - '*' cache-control: - no-cache content-length: - - '1955' + - '1497' content-type: - - application/json; odata=minimalmetadata; streaming=true; charset=utf-8 - dataserviceversion: - - 3.0; + - application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8 date: - - Fri, 01 Apr 2022 06:47:00 GMT - duration: - - '7158741' - expires: - - '-1' - ocp-aad-diagnostics-server-name: - - tYJ5hC4O6RQRx15hpoTmJ0Hn+BA89s4eGJzd7NU9K9U= - ocp-aad-session-key: - - ZnV6BCYYy38j_OHlxtIR9_RCMnoUIaUPWlHiT_k4HZnt_kF5Y3LSFcN5NgXlvOkl3P5kAoP_ZaTawhgu1HzH6kZIDvlcO7uL8fJcnpe42XTPew8F1HQttvCreZfgtQD5.teYspeHi6--BQJpShhwhX524hJPD215T7SW8UVjcENQ - pragma: - - no-cache + - Fri, 22 Jul 2022 09:50:16 GMT + odata-version: + - '4.0' request-id: - - 6f16b17b-63b1-43b0-b72c-317d6be27897 + - c78bfcff-6cb6-40de-8e83-0825d6529915 strict-transport-security: - - max-age=31536000; includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-ms-dirapi-data-contract-version: - - '1.6' - x-ms-resource-unit: - - '2' - x-powered-by: - - ASP.NET - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - ad app create - Connection: - - keep-alive - ParameterSetName: - - --display-name - User-Agent: - - python/3.8.10 (Windows-10-10.0.19044-SP0) msrest/0.6.21 msrest_azure/0.6.4 - azure-graphrbac/0.60.0 Azure-SDK-For-Python AZURECLI/2.34.1 - accept-language: - - en-US - method: GET - uri: https://graph.windows.net/00000000-0000-0000-0000-000000000000/applications/2ddd80d9-80fa-4ef6-bc07-58af0824604c?api-version=1.6 - response: - body: - string: '{"odata.metadata":"https://graph.windows.net/00000000-0000-0000-0000-000000000000/$metadata#directoryObjects/@Element","odata.type":"Microsoft.DirectoryServices.Application","objectType":"Application","objectId":"2ddd80d9-80fa-4ef6-bc07-58af0824604c","deletionTimestamp":null,"acceptMappedClaims":null,"addIns":[],"appId":"19e87cb7-6317-4e39-a358-2de5b2b3d1ec","applicationTemplateId":null,"appRoles":[],"availableToOtherTenants":false,"displayName":"cli-test-app","errorUrl":null,"groupMembershipClaims":null,"homepage":null,"identifierUris":[],"informationalUrls":{"termsOfService":null,"support":null,"privacy":null,"marketing":null},"isDeviceOnlyAuthSupported":null,"keyCredentials":[],"knownClientApplications":[],"logoutUrl":null,"logo@odata.mediaEditLink":"directoryObjects/2ddd80d9-80fa-4ef6-bc07-58af0824604c/Microsoft.DirectoryServices.Application/logo","logoUrl":null,"mainLogo@odata.mediaEditLink":"directoryObjects/2ddd80d9-80fa-4ef6-bc07-58af0824604c/Microsoft.DirectoryServices.Application/mainLogo","oauth2AllowIdTokenImplicitFlow":true,"oauth2AllowImplicitFlow":false,"oauth2AllowUrlPathMatching":false,"oauth2Permissions":[{"adminConsentDescription":"Allow - the application to access cli-test-app on behalf of the signed-in user.","adminConsentDisplayName":"Access - cli-test-app","id":"5643deba-94a1-40f2-8ff5-290c44396a5c","isEnabled":true,"type":"User","userConsentDescription":"Allow - the application to access cli-test-app on your behalf.","userConsentDisplayName":"Access - cli-test-app","value":"user_impersonation"}],"oauth2RequirePostResponse":false,"optionalClaims":null,"orgRestrictions":[],"parentalControlSettings":{"countriesBlockedForMinors":[],"legalAgeGroupRule":"Allow"},"passwordCredentials":[],"publicClient":null,"publisherDomain":"AzureSDKTeam.onmicrosoft.com","recordConsentConditions":null,"replyUrls":[],"requiredResourceAccess":[],"samlMetadataUrl":null,"signInAudience":"AzureADMyOrg","tokenEncryptionKeyId":null}' - headers: - access-control-allow-origin: - - '*' - cache-control: - - no-cache - content-length: - - '1952' - content-type: - - application/json; odata=minimalmetadata; streaming=true; charset=utf-8 - dataserviceversion: - - 3.0; - date: - - Fri, 01 Apr 2022 06:47:01 GMT - duration: - - '1403840' - expires: - - '-1' - ocp-aad-diagnostics-server-name: - - yr3noBVwwhfJyUxboptvYuRML/st1jb2Zzg0w8WKcb0= - ocp-aad-session-key: - - Cav6K_VzHBrE4fB5ucM8vnI3GihHiP2VJeMopYg2Ot49rfTttjH6P3R139-UVK1znKzLWYv9UP40b6gHLhnSDwUSARMzbLYgOy_-_qlNFBcOHs79A84770TXX4UMgNZh.UJM_fXY78MaEvF53TZ_eBwHXasU9Xsebd6tjrLCjwSo - pragma: - - no-cache - request-id: - - da154e53-2bd8-4d2b-a19c-efdd2395dd1d - strict-transport-security: - - max-age=31536000; includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-ms-dirapi-data-contract-version: - - '1.6' + - max-age=31536000 + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-ms-ags-diagnostic: + - '{"ServerInfo":{"DataCenter":"Southeast Asia","Slice":"E","Ring":"5","ScaleUnit":"000","RoleInstance":"SI1PEPF0000657B"}}' x-ms-resource-unit: - '1' - x-powered-by: - - ASP.NET status: code: 200 message: OK @@ -464,21 +191,21 @@ interactions: ParameterSetName: - -n -g --aad-client-id --aad-tenant-id User-Agent: - - AZURECLI/2.34.1 azsdk-python-azure-mgmt-resource/20.0.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.38.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.9 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_stack_hci_000001?api-version=2021-04-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_stack_hci_extension000001?api-version=2021-04-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_stack_hci_000001","name":"cli_test_stack_hci_000001","type":"Microsoft.Resources/resourceGroups","location":"eastus","tags":{"product":"azurecli","cause":"automation","date":"2022-04-01T06:46:49Z"},"properties":{"provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_stack_hci_extension000001","name":"cli_test_stack_hci_extension000001","type":"Microsoft.Resources/resourceGroups","location":"eastus","tags":{"product":"azurecli","cause":"automation","date":"2022-07-22T09:50:07Z"},"properties":{"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache content-length: - - '328' + - '346' content-type: - application/json; charset=utf-8 date: - - Fri, 01 Apr 2022 06:47:02 GMT + - Fri, 22 Jul 2022 09:50:17 GMT expires: - '-1' pragma: @@ -493,7 +220,7 @@ interactions: code: 200 message: OK - request: - body: '{"location": "eastus", "properties": {"aadClientId": "19e87cb7-6317-4e39-a358-2de5b2b3d1ec", + body: '{"location": "eastus", "properties": {"aadClientId": "bb58dfe8-db67-4d3c-bbe9-fc8ac96077a5", "aadTenantId": "54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"}}' headers: Accept: @@ -511,41 +238,41 @@ interactions: ParameterSetName: - -n -g --aad-client-id --aad-tenant-id User-Agent: - - AZURECLI/2.34.1 azsdk-python-mgmt-azurestackhci/1.0.0b1 Python/3.8.10 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.38.0 azsdk-python-mgmt-azurestackhci/1.0.0b1 Python/3.8.9 (Windows-10-10.0.22000-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_stack_hci_000001/providers/Microsoft.AzureStackHCI/clusters/cli-test-cluster?api-version=2022-01-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_stack_hci_extension000001/providers/Microsoft.AzureStackHCI/clusters/cli-test-cluster?api-version=2022-05-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_stack_hci_000001/providers/Microsoft.AzureStackHCI/clusters/cli-test-cluster","name":"cli-test-cluster","type":"microsoft.azurestackhci/clusters","location":"eastus","systemData":{"createdBy":"ethanyang@microsoft.com","createdByType":"User","createdAt":"2022-04-01T06:47:05.5865459Z","lastModifiedBy":"ethanyang@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-04-01T06:47:05.5865459Z"},"properties":{"provisioningState":"Succeeded","status":"NotYetRegistered","cloudId":"52769867-73ec-4343-a5af-0b2507eda5e7","aadClientId":"19e87cb7-6317-4e39-a358-2de5b2b3d1ec","aadTenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","desiredProperties":{"windowsServerSubscription":"Disabled","diagnosticLevel":"Basic"},"trialDaysRemaining":60,"billingModel":"Trial"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_stack_hci_extension000001/providers/Microsoft.AzureStackHCI/clusters/cli-test-cluster","name":"cli-test-cluster","type":"microsoft.azurestackhci/clusters","location":"eastus","systemData":{"createdBy":"v-jingszhang@microsoft.com","createdByType":"User","createdAt":"2022-07-22T09:50:22.1085393Z","lastModifiedBy":"v-jingszhang@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-07-22T09:50:22.1085393Z"},"properties":{"provisioningState":"Succeeded","status":"NotYetRegistered","cloudId":"5209e1aa-fa00-489c-8bdc-b08eac59594d","aadClientId":"bb58dfe8-db67-4d3c-bbe9-fc8ac96077a5","aadTenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","desiredProperties":{"windowsServerSubscription":"Disabled","diagnosticLevel":"Basic"},"trialDaysRemaining":60,"billingModel":"Trial","serviceEndpoint":"https://dp.stackhci.azure.com/eastus/"}}' headers: cache-control: - no-cache content-length: - - '851' + - '924' content-type: - application/json; charset=utf-8 date: - - Fri, 01 Apr 2022 06:47:07 GMT + - Fri, 22 Jul 2022 09:50:23 GMT etag: - - '"13013387-0000-0100-0000-62469fea0000"' + - '"00009d39-0000-0100-0000-62da72de0000"' expires: - '-1' + mise-correlation-id: + - a09558cd-1d8a-4d32-9ac9-3dccd82eb91b pragma: - no-cache request-context: - appId= strict-transport-security: - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked vary: - - Accept-Encoding,Accept-Encoding + - Accept-Encoding x-content-type-options: - nosniff x-ms-providerhub-traffic: - 'True' x-ms-ratelimit-remaining-subscription-writes: - - '1198' + - '1199' x-powered-by: - ASP.NET status: @@ -569,25 +296,27 @@ interactions: ParameterSetName: - -n -g --cluster-name User-Agent: - - AZURECLI/2.34.1 azsdk-python-mgmt-azurestackhci/1.0.0b1 Python/3.8.10 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.38.0 azsdk-python-mgmt-azurestackhci/1.0.0b1 Python/3.8.9 (Windows-10-10.0.22000-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_stack_hci_000001/providers/Microsoft.AzureStackHCI/clusters/cli-test-cluster/arcSettings/default?api-version=2022-01-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_stack_hci_extension000001/providers/Microsoft.AzureStackHCI/clusters/cli-test-cluster/arcSettings/default?api-version=2022-05-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_stack_hci_000001/providers/Microsoft.AzureStackHCI/clusters/cli-test-cluster/arcSettings/default","name":"default","type":"microsoft.azurestackhci/clusters/arcsettings","systemData":{"createdBy":"ethanyang@microsoft.com","createdByType":"User","createdAt":"2022-04-01T06:47:08.1186444Z","lastModifiedBy":"ethanyang@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-04-01T06:47:08.1186444Z"},"properties":{"provisioningState":"Succeeded","arcInstanceResourceGroup":"cli-test-cluster-52769867-73ec-4343-a5af-0b2507eda5e7-Arc-Infra-RG","aggregateState":"NotSpecified"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_stack_hci_extension000001/providers/Microsoft.AzureStackHCI/clusters/cli-test-cluster/arcSettings/default","name":"default","type":"microsoft.azurestackhci/clusters/arcsettings","systemData":{"createdBy":"v-jingszhang@microsoft.com","createdByType":"User","createdAt":"2022-07-22T09:50:24.4338153Z","lastModifiedBy":"v-jingszhang@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-07-22T09:50:24.4338153Z"},"properties":{"connectivityProperties":{"enabled":false},"provisioningState":"Succeeded","arcInstanceResourceGroup":"cli-test-cluster-5209e1aa-fa00-489c-8bdc-b08eac59594d-Arc-Infra-RG","aggregateState":"NotSpecified"}}' headers: cache-control: - no-cache content-length: - - '665' + - '723' content-type: - application/json; charset=utf-8 date: - - Fri, 01 Apr 2022 06:47:09 GMT + - Fri, 22 Jul 2022 09:50:25 GMT etag: - - '"2a006341-0000-0100-0000-62469fed0000"' + - '"00002133-0000-0100-0000-62da72e10000"' expires: - '-1' + mise-correlation-id: + - 85ca8e0c-38a7-4076-afe5-869b5cb57776 pragma: - no-cache request-context: @@ -603,7 +332,7 @@ interactions: x-ms-providerhub-traffic: - 'True' x-ms-ratelimit-remaining-subscription-writes: - - '1197' + - '1199' x-powered-by: - ASP.NET status: @@ -630,35 +359,35 @@ interactions: - -n -g --cluster-name --arc-setting-name --settings --protected-settings --publisher --type --type-handler-version User-Agent: - - AZURECLI/2.34.1 azsdk-python-mgmt-azurestackhci/1.0.0b1 Python/3.8.10 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.38.0 azsdk-python-mgmt-azurestackhci/1.0.0b1 Python/3.8.9 (Windows-10-10.0.22000-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_stack_hci_000001/providers/Microsoft.AzureStackHCI/clusters/cli-test-cluster/arcSettings/default/extensions/MicrosoftMonitoringAgent?api-version=2022-01-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_stack_hci_extension000001/providers/Microsoft.AzureStackHCI/clusters/cli-test-cluster/arcSettings/default/extensions/MicrosoftMonitoringAgent?api-version=2022-05-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_stack_hci_000001/providers/Microsoft.AzureStackHCI/clusters/cli-test-cluster/arcSettings/default/extensions/MicrosoftMonitoringAgent","name":"MicrosoftMonitoringAgent","type":"microsoft.azurestackhci/clusters/arcsettings/extensions","systemData":{"createdBy":"ethanyang@microsoft.com","createdByType":"User","createdAt":"2022-04-01T06:47:10.3205511Z","lastModifiedBy":"ethanyang@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-04-01T06:47:10.3205511Z"},"properties":{"provisioningState":"Succeeded","aggregateState":"NotSpecified","perNodeExtensionDetails":[],"extensionParameters":{"type":"MicrosoftMonitoringAgent","publisher":"Microsoft.Compute","autoUpgradeMinorVersion":false,"settings":{"workspaceId":"xx"}}}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_stack_hci_extension000001/providers/Microsoft.AzureStackHCI/clusters/cli-test-cluster/arcSettings/default/extensions/MicrosoftMonitoringAgent","name":"MicrosoftMonitoringAgent","type":"microsoft.azurestackhci/clusters/arcsettings/extensions","systemData":{"createdBy":"v-jingszhang@microsoft.com","createdByType":"User","createdAt":"2022-07-22T09:50:26.7960217Z","lastModifiedBy":"v-jingszhang@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-07-22T09:50:26.7960217Z"},"properties":{"provisioningState":"Succeeded","aggregateState":"NotSpecified","perNodeExtensionDetails":[],"extensionParameters":{"type":"MicrosoftMonitoringAgent","publisher":"Microsoft.Compute","autoUpgradeMinorVersion":false,"settings":{"workspaceId":"xx"}}}}' headers: cache-control: - no-cache content-length: - - '816' + - '831' content-type: - application/json; charset=utf-8 date: - - Fri, 01 Apr 2022 06:47:10 GMT + - Fri, 22 Jul 2022 09:50:27 GMT etag: - - '"2c001ead-0000-0100-0000-62469fef0000"' + - '"00003b00-0000-0100-0000-62da72e30000"' expires: - '-1' + mise-correlation-id: + - 223cb56e-ed3f-4846-95c1-128d2788cc7f pragma: - no-cache request-context: - appId= strict-transport-security: - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked vary: - - Accept-Encoding,Accept-Encoding + - Accept-Encoding x-content-type-options: - nosniff x-ms-providerhub-traffic: @@ -684,23 +413,25 @@ interactions: ParameterSetName: - -g --cluster-name --arc-setting-name User-Agent: - - AZURECLI/2.34.1 azsdk-python-mgmt-azurestackhci/1.0.0b1 Python/3.8.10 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.38.0 azsdk-python-mgmt-azurestackhci/1.0.0b1 Python/3.8.9 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_stack_hci_000001/providers/Microsoft.AzureStackHCI/clusters/cli-test-cluster/arcSettings/default/extensions?api-version=2022-01-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_stack_hci_extension000001/providers/Microsoft.AzureStackHCI/clusters/cli-test-cluster/arcSettings/default/extensions?api-version=2022-05-01 response: body: - string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_stack_hci_000001/providers/Microsoft.AzureStackHCI/clusters/cli-test-cluster/arcSettings/default/extensions/MicrosoftMonitoringAgent","name":"MicrosoftMonitoringAgent","type":"microsoft.azurestackhci/clusters/arcsettings/extensions","properties":{"provisioningState":"Succeeded","aggregateState":"NotSpecified","perNodeExtensionDetails":[],"extensionParameters":{"type":"MicrosoftMonitoringAgent","publisher":"Microsoft.Compute","autoUpgradeMinorVersion":false,"settings":{"workspaceId":"xx"}}}}]}' + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_stack_hci_extension000001/providers/Microsoft.AzureStackHCI/clusters/cli-test-cluster/arcSettings/default/extensions/MicrosoftMonitoringAgent","name":"MicrosoftMonitoringAgent","type":"microsoft.azurestackhci/clusters/arcsettings/extensions","properties":{"provisioningState":"Succeeded","aggregateState":"NotSpecified","perNodeExtensionDetails":[],"extensionParameters":{"type":"MicrosoftMonitoringAgent","publisher":"Microsoft.Compute","autoUpgradeMinorVersion":false,"settings":{"workspaceId":"xx"}}}}]}' headers: cache-control: - no-cache content-length: - - '590' + - '599' content-type: - application/json; charset=utf-8 date: - - Fri, 01 Apr 2022 06:47:12 GMT + - Fri, 22 Jul 2022 09:50:28 GMT expires: - '-1' + mise-correlation-id: + - 93796055-339a-4d3a-a783-957a1aa136f7 pragma: - no-cache request-context: @@ -734,25 +465,27 @@ interactions: ParameterSetName: - -n -g --cluster-name --arc-setting-name User-Agent: - - AZURECLI/2.34.1 azsdk-python-mgmt-azurestackhci/1.0.0b1 Python/3.8.10 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.38.0 azsdk-python-mgmt-azurestackhci/1.0.0b1 Python/3.8.9 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_stack_hci_000001/providers/Microsoft.AzureStackHCI/clusters/cli-test-cluster/arcSettings/default/extensions/MicrosoftMonitoringAgent?api-version=2022-01-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_stack_hci_extension000001/providers/Microsoft.AzureStackHCI/clusters/cli-test-cluster/arcSettings/default/extensions/MicrosoftMonitoringAgent?api-version=2022-05-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_stack_hci_000001/providers/Microsoft.AzureStackHCI/clusters/cli-test-cluster/arcSettings/default/extensions/MicrosoftMonitoringAgent","name":"MicrosoftMonitoringAgent","type":"microsoft.azurestackhci/clusters/arcsettings/extensions","properties":{"provisioningState":"Succeeded","aggregateState":"NotSpecified","perNodeExtensionDetails":[],"extensionParameters":{"type":"MicrosoftMonitoringAgent","publisher":"Microsoft.Compute","autoUpgradeMinorVersion":false,"settings":{"workspaceId":"xx"}}}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_stack_hci_extension000001/providers/Microsoft.AzureStackHCI/clusters/cli-test-cluster/arcSettings/default/extensions/MicrosoftMonitoringAgent","name":"MicrosoftMonitoringAgent","type":"microsoft.azurestackhci/clusters/arcsettings/extensions","properties":{"provisioningState":"Succeeded","aggregateState":"NotSpecified","perNodeExtensionDetails":[],"extensionParameters":{"type":"MicrosoftMonitoringAgent","publisher":"Microsoft.Compute","autoUpgradeMinorVersion":false,"settings":{"workspaceId":"xx"}}}}' headers: cache-control: - no-cache content-length: - - '578' + - '587' content-type: - application/json; charset=utf-8 date: - - Fri, 01 Apr 2022 06:47:13 GMT + - Fri, 22 Jul 2022 09:50:29 GMT etag: - - '"2c001ead-0000-0100-0000-62469fef0000"' + - '"00003b00-0000-0100-0000-62da72e30000"' expires: - '-1' + mise-correlation-id: + - 817b2d15-b258-48eb-a51d-fcfe1e4afde6 pragma: - no-cache request-context: @@ -788,9 +521,9 @@ interactions: ParameterSetName: - -n -g --cluster-name --arc-setting-name --no-wait --yes User-Agent: - - AZURECLI/2.34.1 azsdk-python-mgmt-azurestackhci/1.0.0b1 Python/3.8.10 (Windows-10-10.0.19044-SP0) + - AZURECLI/2.38.0 azsdk-python-mgmt-azurestackhci/1.0.0b1 Python/3.8.9 (Windows-10-10.0.22000-SP0) method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_stack_hci_000001/providers/Microsoft.AzureStackHCI/clusters/cli-test-cluster/arcSettings/default/extensions/MicrosoftMonitoringAgent?api-version=2022-01-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_stack_hci_extension000001/providers/Microsoft.AzureStackHCI/clusters/cli-test-cluster/arcSettings/default/extensions/MicrosoftMonitoringAgent?api-version=2022-05-01 response: body: string: '' @@ -800,9 +533,11 @@ interactions: content-length: - '0' date: - - Fri, 01 Apr 2022 06:47:15 GMT + - Fri, 22 Jul 2022 09:50:30 GMT expires: - '-1' + mise-correlation-id: + - 20c9b35f-d318-4dc4-95a6-dee1e03fb63a pragma: - no-cache request-context: diff --git a/src/stack-hci/azext_stack_hci/tests/latest/test_stack_hci_commands.py b/src/stack-hci/azext_stack_hci/tests/latest/test_stack_hci_commands.py index 6b1c4c20c7f..41b160ff09a 100644 --- a/src/stack-hci/azext_stack_hci/tests/latest/test_stack_hci_commands.py +++ b/src/stack-hci/azext_stack_hci/tests/latest/test_stack_hci_commands.py @@ -15,7 +15,7 @@ class StackHciClientTest(ScenarioTest): - @ResourceGroupPreparer(name_prefix='cli_test_stack_hci_', location='eastus') + @ResourceGroupPreparer(name_prefix='cli_test_stack_hci_cluster', location='eastus') def test_stack_hci_cluster_crud(self): self.kwargs.update({ 'cluster_name': 'cli-test-cluster', @@ -24,34 +24,27 @@ def test_stack_hci_cluster_crud(self): self.kwargs['client_id'] = self.cmd('ad app create --display-name {app_name}').get_output_in_json()['appId'] self.kwargs['tenant_id'] = self.cmd('account show').get_output_in_json()['tenantId'] - self.cmd( - 'stack-hci cluster create -n {cluster_name} -g {rg} ' - '--aad-client-id {client_id} --aad-tenant-id {tenant_id} --tags key0=value0', - checks=[ - self.check('name', '{cluster_name}'), - self.check('tags', {'key0': 'value0'}), - self.check('type', 'microsoft.azurestackhci/clusters') - ] - ) - self.cmd( - 'stack-hci cluster list -g {rg}', - checks=[ - self.check('length(@)', 1), - self.check('@[0].name', '{cluster_name}') - ] - ) + self.cmd('stack-hci cluster create -n {cluster_name} -g {rg} --aad-client-id {client_id} --aad-tenant-id {tenant_id} --tags key0=value0', checks=[ + self.check('name', '{cluster_name}'), + self.check('tags', {'key0': 'value0'}), + self.check('type', 'microsoft.azurestackhci/clusters') + ]) + self.cmd('stack-hci cluster create-identity --cluster-name {cluster_name} -g {rg}', checks=[ + self.check('status', 'Succeeded'), + ]) + self.cmd('stack-hci cluster list -g {rg}', checks=[ + self.check('length(@)', 1), + self.check('@[0].name', '{cluster_name}') + ]) self.cmd('stack-hci cluster update -n {cluster_name} -g {rg} --tags key0=value1') - self.cmd( - 'stack-hci cluster show -n {cluster_name} -g {rg}', - checks=[ - self.check('name', '{cluster_name}'), - self.check('tags', {'key0': 'value1'}), - self.check('type', 'microsoft.azurestackhci/clusters') - ] - ) + self.cmd('stack-hci cluster show -n {cluster_name} -g {rg}', checks=[ + self.check('name', '{cluster_name}'), + self.check('tags', {'key0': 'value1'}), + self.check('type', 'microsoft.azurestackhci/clusters') + ]) self.cmd('stack-hci cluster delete -n {cluster_name} -g {rg} --yes') - @ResourceGroupPreparer(name_prefix='cli_test_stack_hci_', location='eastus') + @ResourceGroupPreparer(name_prefix='cli_test_stack_hci_arc_setting', location='eastus') def test_stack_hci_arc_setting_crud(self): self.kwargs.update({ 'cluster_name': 'cli-test-cluster', @@ -61,30 +54,25 @@ def test_stack_hci_arc_setting_crud(self): self.kwargs['tenant_id'] = self.cmd('account show').get_output_in_json()['tenantId'] self.cmd('stack-hci cluster create -n {cluster_name} -g {rg} --aad-client-id {client_id} --aad-tenant-id {tenant_id}') - self.cmd( - 'stack-hci arc-setting create -n default -g {rg} --cluster-name {cluster_name}', - checks=[ - self.check('name', 'default'), - self.check('type', 'microsoft.azurestackhci/clusters/arcsettings') - ] - ) - self.cmd( - 'stack-hci arc-setting list -g {rg} --cluster-name {cluster_name}', - checks=[ - self.check('length(@)', 1), - self.check('@[0].name', 'default') - ] - ) - self.cmd( - 'stack-hci arc-setting show -n default -g {rg} --cluster-name {cluster_name}', - checks=[ - self.check('name', 'default'), - self.check('type', 'microsoft.azurestackhci/clusters/arcsettings') - ] - ) + self.cmd('stack-hci arc-setting create -n default -g {rg} --cluster-name {cluster_name}', checks=[ + self.check('name', 'default'), + self.check('type', 'microsoft.azurestackhci/clusters/arcsettings') + ]) + self.cmd('stack-hci arc-setting create-identity -n default --cluster-name {cluster_name} -g {rg}') + self.cmd('stack-hci arc-setting list -g {rg} --cluster-name {cluster_name}', checks=[ + self.check('length(@)', 1), + self.check('@[0].name', 'default') + ]) + self.cmd('stack-hci arc-setting show -n default -g {rg} --cluster-name {cluster_name}', checks=[ + self.check('name', 'default'), + self.check('type', 'microsoft.azurestackhci/clusters/arcsettings') + ]) + self.cmd('stack-hci arc-setting generate-password -n default --cluster-name {cluster_name} -g {rg}', checks=[ + self.exists('secretText') + ]) self.cmd('stack-hci arc-setting delete -n default -g {rg} --cluster-name {cluster_name} --no-wait --yes') - @ResourceGroupPreparer(name_prefix='cli_test_stack_hci_', location='eastus') + @ResourceGroupPreparer(name_prefix='cli_test_stack_hci_extension', location='eastus') def test_stack_hci_extension_crud(self): self.kwargs.update({ 'cluster_name': 'cli-test-cluster', @@ -99,27 +87,16 @@ def test_stack_hci_extension_crud(self): self.kwargs['settings'] = json.dumps({'workspaceId': 'xx'}) self.kwargs['protected_settings'] = json.dumps({'workspaceKey': 'xx'}) - self.cmd( - 'stack-hci extension create -n {type} -g {rg} --cluster-name {cluster_name} --arc-setting-name default ' - '--settings \'{settings}\' --protected-settings \'{protected_settings}\' ' - '--publisher {publisher} --type {type} --type-handler-version 1.10', - checks=[ - self.check('name', self.kwargs['type']), - self.check('type', 'microsoft.azurestackhci/clusters/arcsettings/extensions') - ] - ) - self.cmd( - 'stack-hci extension list -g {rg} --cluster-name {cluster_name} --arc-setting-name default', - checks=[ - self.check('length(@)', 1), - self.check('@[0].name', self.kwargs['type']) - ] - ) - self.cmd( - 'stack-hci extension show -n {type} -g {rg} --cluster-name {cluster_name} --arc-setting-name default', - checks=[ - self.check('name', self.kwargs['type']), - self.check('type', 'microsoft.azurestackhci/clusters/arcsettings/extensions') - ] - ) + self.cmd('stack-hci extension create -n {type} -g {rg} --cluster-name {cluster_name} --arc-setting-name default --settings \'{settings}\' --protected-settings \'{protected_settings}\' --publisher {publisher} --type {type} --type-handler-version 1.10', checks=[ + self.check('name', self.kwargs['type']), + self.check('type', 'microsoft.azurestackhci/clusters/arcsettings/extensions') + ]) + self.cmd('stack-hci extension list -g {rg} --cluster-name {cluster_name} --arc-setting-name default', checks=[ + self.check('length(@)', 1), + self.check('@[0].name', self.kwargs['type']) + ]) + self.cmd('stack-hci extension show -n {type} -g {rg} --cluster-name {cluster_name} --arc-setting-name default', checks=[ + self.check('name', self.kwargs['type']), + self.check('type', 'microsoft.azurestackhci/clusters/arcsettings/extensions') + ]) self.cmd('stack-hci extension delete -n {type} -g {rg} --cluster-name {cluster_name} --arc-setting-name default --no-wait --yes') diff --git a/src/stack-hci/azext_stack_hci/vendored_sdks/azurestackhci/_configuration.py b/src/stack-hci/azext_stack_hci/vendored_sdks/azurestackhci/_configuration.py index cd3699da378..9cc76634021 100644 --- a/src/stack-hci/azext_stack_hci/vendored_sdks/azurestackhci/_configuration.py +++ b/src/stack-hci/azext_stack_hci/vendored_sdks/azurestackhci/_configuration.py @@ -48,7 +48,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id - self.api_version = "2022-01-01" + self.api_version = "2022-05-01" self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-azurestackhci/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/src/stack-hci/azext_stack_hci/vendored_sdks/azurestackhci/aio/_configuration.py b/src/stack-hci/azext_stack_hci/vendored_sdks/azurestackhci/aio/_configuration.py index 7db26273804..12d17e138ab 100644 --- a/src/stack-hci/azext_stack_hci/vendored_sdks/azurestackhci/aio/_configuration.py +++ b/src/stack-hci/azext_stack_hci/vendored_sdks/azurestackhci/aio/_configuration.py @@ -45,7 +45,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id - self.api_version = "2022-01-01" + self.api_version = "2022-05-01" self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-azurestackhci/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/src/stack-hci/azext_stack_hci/vendored_sdks/azurestackhci/aio/operations/_arc_settings_operations.py b/src/stack-hci/azext_stack_hci/vendored_sdks/azurestackhci/aio/operations/_arc_settings_operations.py index 30a175976ed..79d9cfcb919 100644 --- a/src/stack-hci/azext_stack_hci/vendored_sdks/azurestackhci/aio/operations/_arc_settings_operations.py +++ b/src/stack-hci/azext_stack_hci/vendored_sdks/azurestackhci/aio/operations/_arc_settings_operations.py @@ -65,7 +65,7 @@ def list_by_cluster( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-01-01" + api_version = "2022-05-01" accept = "application/json" def prepare_request(next_link=None): @@ -144,7 +144,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-01-01" + api_version = "2022-05-01" accept = "application/json" # Construct URL @@ -211,7 +211,7 @@ async def create( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-01-01" + api_version = "2022-05-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -254,6 +254,78 @@ async def create( return deserialized create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/arcSettings/{arcSettingName}'} # type: ignore + async def update( + self, + resource_group_name: str, + cluster_name: str, + arc_setting_name: str, + arc_setting: "models.ArcSettingsPatch", + **kwargs + ) -> "models.ArcSetting": + """Update ArcSettings for HCI cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param cluster_name: The name of the cluster. + :type cluster_name: str + :param arc_setting_name: The name of the proxy resource holding details of HCI ArcSetting + information. + :type arc_setting_name: str + :param arc_setting: ArcSettings parameters that needs to be updated. + :type arc_setting: ~azure.mgmt.azurestackhci.models.ArcSettingsPatch + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ArcSetting, or the result of cls(response) + :rtype: ~azure.mgmt.azurestackhci.models.ArcSetting + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.ArcSetting"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2022-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), + 'arcSettingName': self._serialize.url("arc_setting_name", arc_setting_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(arc_setting, 'ArcSettingsPatch') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ArcSetting', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/arcSettings/{arcSettingName}'} # type: ignore + async def _delete_initial( self, resource_group_name: str, @@ -266,7 +338,7 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-01-01" + api_version = "2022-05-01" accept = "application/json" # Construct URL @@ -370,3 +442,192 @@ def get_long_running_output(pipeline_response): else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/arcSettings/{arcSettingName}'} # type: ignore + + async def generate_password( + self, + resource_group_name: str, + cluster_name: str, + arc_setting_name: str, + **kwargs + ) -> "models.PasswordCredential": + """Generate password for arc settings. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param cluster_name: The name of the cluster. + :type cluster_name: str + :param arc_setting_name: The name of the proxy resource holding details of HCI ArcSetting + information. + :type arc_setting_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PasswordCredential, or the result of cls(response) + :rtype: ~azure.mgmt.azurestackhci.models.PasswordCredential + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.PasswordCredential"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2022-05-01" + accept = "application/json" + + # Construct URL + url = self.generate_password.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), + 'arcSettingName': self._serialize.url("arc_setting_name", arc_setting_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PasswordCredential', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + generate_password.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/arcSettings/{arcSettingName}/generatePassword'} # type: ignore + + async def _create_identity_initial( + self, + resource_group_name: str, + cluster_name: str, + arc_setting_name: str, + **kwargs + ) -> Optional["models.ArcIdentityResponse"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.ArcIdentityResponse"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2022-05-01" + accept = "application/json" + + # Construct URL + url = self._create_identity_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), + 'arcSettingName': self._serialize.url("arc_setting_name", arc_setting_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ArcIdentityResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_identity_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/arcSettings/{arcSettingName}/createArcIdentity'} # type: ignore + + async def begin_create_identity( + self, + resource_group_name: str, + cluster_name: str, + arc_setting_name: str, + **kwargs + ) -> AsyncLROPoller["models.ArcIdentityResponse"]: + """Create Aad identity for arc settings. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param cluster_name: The name of the cluster. + :type cluster_name: str + :param arc_setting_name: The name of the proxy resource holding details of HCI ArcSetting + information. + :type arc_setting_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ArcIdentityResponse or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.azurestackhci.models.ArcIdentityResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["models.ArcIdentityResponse"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_identity_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + arc_setting_name=arc_setting_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('ArcIdentityResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), + 'arcSettingName': self._serialize.url("arc_setting_name", arc_setting_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_identity.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/arcSettings/{arcSettingName}/createArcIdentity'} # type: ignore diff --git a/src/stack-hci/azext_stack_hci/vendored_sdks/azurestackhci/aio/operations/_clusters_operations.py b/src/stack-hci/azext_stack_hci/vendored_sdks/azurestackhci/aio/operations/_clusters_operations.py index 4d95b87d660..933c6538e90 100644 --- a/src/stack-hci/azext_stack_hci/vendored_sdks/azurestackhci/aio/operations/_clusters_operations.py +++ b/src/stack-hci/azext_stack_hci/vendored_sdks/azurestackhci/aio/operations/_clusters_operations.py @@ -5,14 +5,16 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models @@ -57,7 +59,7 @@ def list_by_subscription( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-01-01" + api_version = "2022-05-01" accept = "application/json" def prepare_request(next_link=None): @@ -127,7 +129,7 @@ def list_by_resource_group( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-01-01" + api_version = "2022-05-01" accept = "application/json" def prepare_request(next_link=None): @@ -201,7 +203,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-01-01" + api_version = "2022-05-01" accept = "application/json" # Construct URL @@ -263,7 +265,7 @@ async def create( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-01-01" + api_version = "2022-05-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -330,7 +332,7 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-01-01" + api_version = "2022-05-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -372,12 +374,57 @@ async def update( return deserialized update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}'} # type: ignore - async def delete( + async def _delete_initial( self, resource_group_name: str, cluster_name: str, **kwargs ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2022-05-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}'} # type: ignore + + async def begin_delete( + self, + resource_group_name: str, + cluster_name: str, + **kwargs + ) -> AsyncLROPoller[None]: """Delete an HCI cluster. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -385,20 +432,75 @@ async def delete( :param cluster_name: The name of the cluster. :type cluster_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}'} # type: ignore + + async def _upload_certificate_initial( + self, + resource_group_name: str, + cluster_name: str, + upload_certificate_request: "models.UploadCertificateRequest", + **kwargs + ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-01-01" + api_version = "2022-05-01" + content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL - url = self.delete.metadata['url'] # type: ignore + url = self._upload_certificate_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), @@ -412,13 +514,17 @@ async def delete( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - request = self._client.delete(url, query_parameters, header_parameters) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(upload_certificate_request, 'UploadCertificateRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 204]: + if response.status_code not in [202]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -426,4 +532,189 @@ async def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}'} # type: ignore + _upload_certificate_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/uploadCertificate'} # type: ignore + + async def begin_upload_certificate( + self, + resource_group_name: str, + cluster_name: str, + upload_certificate_request: "models.UploadCertificateRequest", + **kwargs + ) -> AsyncLROPoller[None]: + """Upload certificate. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param cluster_name: The name of the cluster. + :type cluster_name: str + :param upload_certificate_request: Upload certificate request. + :type upload_certificate_request: ~azure.mgmt.azurestackhci.models.UploadCertificateRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._upload_certificate_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + upload_certificate_request=upload_certificate_request, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_upload_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/uploadCertificate'} # type: ignore + + async def _create_identity_initial( + self, + resource_group_name: str, + cluster_name: str, + **kwargs + ) -> Optional["models.ClusterIdentityResponse"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.ClusterIdentityResponse"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2022-05-01" + accept = "application/json" + + # Construct URL + url = self._create_identity_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ClusterIdentityResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_identity_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/createClusterIdentity'} # type: ignore + + async def begin_create_identity( + self, + resource_group_name: str, + cluster_name: str, + **kwargs + ) -> AsyncLROPoller["models.ClusterIdentityResponse"]: + """Create cluster identity. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param cluster_name: The name of the cluster. + :type cluster_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ClusterIdentityResponse or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.azurestackhci.models.ClusterIdentityResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["models.ClusterIdentityResponse"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_identity_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('ClusterIdentityResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_identity.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/createClusterIdentity'} # type: ignore diff --git a/src/stack-hci/azext_stack_hci/vendored_sdks/azurestackhci/aio/operations/_extensions_operations.py b/src/stack-hci/azext_stack_hci/vendored_sdks/azurestackhci/aio/operations/_extensions_operations.py index 9693cd7a6bd..901fc52f8a5 100644 --- a/src/stack-hci/azext_stack_hci/vendored_sdks/azurestackhci/aio/operations/_extensions_operations.py +++ b/src/stack-hci/azext_stack_hci/vendored_sdks/azurestackhci/aio/operations/_extensions_operations.py @@ -69,7 +69,7 @@ def list_by_arc_setting( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-01-01" + api_version = "2022-05-01" accept = "application/json" def prepare_request(next_link=None): @@ -152,7 +152,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-01-01" + api_version = "2022-05-01" accept = "application/json" # Construct URL @@ -205,7 +205,7 @@ async def _create_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-01-01" + api_version = "2022-05-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -343,13 +343,13 @@ async def _update_initial( extension_name: str, extension: "models.Extension", **kwargs - ) -> "models.Extension": - cls = kwargs.pop('cls', None) # type: ClsType["models.Extension"] + ) -> Optional["models.Extension"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.Extension"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-01-01" + api_version = "2022-05-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -380,12 +380,14 @@ async def _update_initial( pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [201]: + if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('Extension', pipeline_response) + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Extension', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -488,7 +490,7 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-01-01" + api_version = "2022-05-01" accept = "application/json" # Construct URL diff --git a/src/stack-hci/azext_stack_hci/vendored_sdks/azurestackhci/aio/operations/_operations.py b/src/stack-hci/azext_stack_hci/vendored_sdks/azurestackhci/aio/operations/_operations.py index 0faad22d217..cab32ef3634 100644 --- a/src/stack-hci/azext_stack_hci/vendored_sdks/azurestackhci/aio/operations/_operations.py +++ b/src/stack-hci/azext_stack_hci/vendored_sdks/azurestackhci/aio/operations/_operations.py @@ -56,7 +56,7 @@ async def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-01-01" + api_version = "2022-05-01" accept = "application/json" # Construct URL diff --git a/src/stack-hci/azext_stack_hci/vendored_sdks/azurestackhci/models/__init__.py b/src/stack-hci/azext_stack_hci/vendored_sdks/azurestackhci/models/__init__.py index 8bff1c1473d..d50ecc3cf91 100644 --- a/src/stack-hci/azext_stack_hci/vendored_sdks/azurestackhci/models/__init__.py +++ b/src/stack-hci/azext_stack_hci/vendored_sdks/azurestackhci/models/__init__.py @@ -7,10 +7,14 @@ # -------------------------------------------------------------------------- try: + from ._models_py3 import ArcConnectivityProperties + from ._models_py3 import ArcIdentityResponse from ._models_py3 import ArcSetting from ._models_py3 import ArcSettingList + from ._models_py3 import ArcSettingsPatch from ._models_py3 import Cluster from ._models_py3 import ClusterDesiredProperties + from ._models_py3 import ClusterIdentityResponse from ._models_py3 import ClusterList from ._models_py3 import ClusterNode from ._models_py3 import ClusterPatch @@ -23,16 +27,23 @@ from ._models_py3 import Operation from ._models_py3 import OperationDisplay from ._models_py3 import OperationListResult + from ._models_py3 import PasswordCredential from ._models_py3 import PerNodeExtensionState from ._models_py3 import PerNodeState from ._models_py3 import ProxyResource + from ._models_py3 import RawCertificateData from ._models_py3 import Resource from ._models_py3 import TrackedResource + from ._models_py3 import UploadCertificateRequest except (SyntaxError, ImportError): + from ._models import ArcConnectivityProperties # type: ignore + from ._models import ArcIdentityResponse # type: ignore from ._models import ArcSetting # type: ignore from ._models import ArcSettingList # type: ignore + from ._models import ArcSettingsPatch # type: ignore from ._models import Cluster # type: ignore from ._models import ClusterDesiredProperties # type: ignore + from ._models import ClusterIdentityResponse # type: ignore from ._models import ClusterList # type: ignore from ._models import ClusterNode # type: ignore from ._models import ClusterPatch # type: ignore @@ -45,11 +56,14 @@ from ._models import Operation # type: ignore from ._models import OperationDisplay # type: ignore from ._models import OperationListResult # type: ignore + from ._models import PasswordCredential # type: ignore from ._models import PerNodeExtensionState # type: ignore from ._models import PerNodeState # type: ignore from ._models import ProxyResource # type: ignore + from ._models import RawCertificateData # type: ignore from ._models import Resource # type: ignore from ._models import TrackedResource # type: ignore + from ._models import UploadCertificateRequest # type: ignore from ._azure_stack_hci_client_enums import ( ActionType, @@ -67,10 +81,14 @@ ) __all__ = [ + 'ArcConnectivityProperties', + 'ArcIdentityResponse', 'ArcSetting', 'ArcSettingList', + 'ArcSettingsPatch', 'Cluster', 'ClusterDesiredProperties', + 'ClusterIdentityResponse', 'ClusterList', 'ClusterNode', 'ClusterPatch', @@ -83,11 +101,14 @@ 'Operation', 'OperationDisplay', 'OperationListResult', + 'PasswordCredential', 'PerNodeExtensionState', 'PerNodeState', 'ProxyResource', + 'RawCertificateData', 'Resource', 'TrackedResource', + 'UploadCertificateRequest', 'ActionType', 'ArcSettingAggregateState', 'CreatedByType', diff --git a/src/stack-hci/azext_stack_hci/vendored_sdks/azurestackhci/models/_models.py b/src/stack-hci/azext_stack_hci/vendored_sdks/azurestackhci/models/_models.py index 64c0a6fe2e8..dab7e430419 100644 --- a/src/stack-hci/azext_stack_hci/vendored_sdks/azurestackhci/models/_models.py +++ b/src/stack-hci/azext_stack_hci/vendored_sdks/azurestackhci/models/_models.py @@ -10,6 +10,56 @@ import msrest.serialization +class ArcConnectivityProperties(msrest.serialization.Model): + """Connectivity related configuration required by arc server. + + :param enabled: True indicates ARC connectivity is enabled. + :type enabled: bool + """ + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(ArcConnectivityProperties, self).__init__(**kwargs) + self.enabled = kwargs.get('enabled', None) + + +class ArcIdentityResponse(msrest.serialization.Model): + """ArcIdentity details. + + :param arc_application_client_id: + :type arc_application_client_id: str + :param arc_application_tenant_id: + :type arc_application_tenant_id: str + :param arc_service_principal_object_id: + :type arc_service_principal_object_id: str + :param arc_application_object_id: + :type arc_application_object_id: str + """ + + _attribute_map = { + 'arc_application_client_id': {'key': 'properties.arcApplicationClientId', 'type': 'str'}, + 'arc_application_tenant_id': {'key': 'properties.arcApplicationTenantId', 'type': 'str'}, + 'arc_service_principal_object_id': {'key': 'properties.arcServicePrincipalObjectId', 'type': 'str'}, + 'arc_application_object_id': {'key': 'properties.arcApplicationObjectId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ArcIdentityResponse, self).__init__(**kwargs) + self.arc_application_client_id = kwargs.get('arc_application_client_id', None) + self.arc_application_tenant_id = kwargs.get('arc_application_tenant_id', None) + self.arc_service_principal_object_id = kwargs.get('arc_service_principal_object_id', None) + self.arc_application_object_id = kwargs.get('arc_application_object_id', None) + + class Resource(msrest.serialization.Model): """Common fields that are returned in the response for all Azure Resource Manager resources. @@ -66,6 +116,14 @@ class ArcSetting(Resource): :param arc_instance_resource_group: The resource group that hosts the Arc agents, ie. Hybrid Compute Machine resources. :type arc_instance_resource_group: str + :param arc_application_client_id: App id of arc AAD identity. + :type arc_application_client_id: str + :param arc_application_tenant_id: Tenant id of arc AAD identity. + :type arc_application_tenant_id: str + :param arc_service_principal_object_id: Object id of arc AAD service principal. + :type arc_service_principal_object_id: str + :param arc_application_object_id: Object id of arc AAD identity. + :type arc_application_object_id: str :ivar aggregate_state: Aggregate state of Arc agent across the nodes in this HCI cluster. Possible values include: "NotSpecified", "Error", "Succeeded", "Canceled", "Failed", "Connected", "Disconnected", "Deleted", "Creating", "Updating", "Deleting", "Moving", @@ -73,6 +131,8 @@ class ArcSetting(Resource): :vartype aggregate_state: str or ~azure.mgmt.azurestackhci.models.ArcSettingAggregateState :ivar per_node_details: State of Arc agent in each of the nodes. :vartype per_node_details: list[~azure.mgmt.azurestackhci.models.PerNodeState] + :param connectivity_properties: contains connectivity related configuration for ARC resources. + :type connectivity_properties: object :param created_by: The identity that created the resource. :type created_by: str :param created_by_type: The type of identity that created the resource. Possible values @@ -104,8 +164,13 @@ class ArcSetting(Resource): 'type': {'key': 'type', 'type': 'str'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'arc_instance_resource_group': {'key': 'properties.arcInstanceResourceGroup', 'type': 'str'}, + 'arc_application_client_id': {'key': 'properties.arcApplicationClientId', 'type': 'str'}, + 'arc_application_tenant_id': {'key': 'properties.arcApplicationTenantId', 'type': 'str'}, + 'arc_service_principal_object_id': {'key': 'properties.arcServicePrincipalObjectId', 'type': 'str'}, + 'arc_application_object_id': {'key': 'properties.arcApplicationObjectId', 'type': 'str'}, 'aggregate_state': {'key': 'properties.aggregateState', 'type': 'str'}, 'per_node_details': {'key': 'properties.perNodeDetails', 'type': '[PerNodeState]'}, + 'connectivity_properties': {'key': 'properties.connectivityProperties', 'type': 'object'}, 'created_by': {'key': 'systemData.createdBy', 'type': 'str'}, 'created_by_type': {'key': 'systemData.createdByType', 'type': 'str'}, 'created_at': {'key': 'systemData.createdAt', 'type': 'iso-8601'}, @@ -121,8 +186,13 @@ def __init__( super(ArcSetting, self).__init__(**kwargs) self.provisioning_state = None self.arc_instance_resource_group = kwargs.get('arc_instance_resource_group', None) + self.arc_application_client_id = kwargs.get('arc_application_client_id', None) + self.arc_application_tenant_id = kwargs.get('arc_application_tenant_id', None) + self.arc_service_principal_object_id = kwargs.get('arc_service_principal_object_id', None) + self.arc_application_object_id = kwargs.get('arc_application_object_id', None) self.aggregate_state = None self.per_node_details = None + self.connectivity_properties = kwargs.get('connectivity_properties', None) self.created_by = kwargs.get('created_by', None) self.created_by_type = kwargs.get('created_by_type', None) self.created_at = kwargs.get('created_at', None) @@ -161,6 +231,29 @@ def __init__( self.next_link = None +class ArcSettingsPatch(msrest.serialization.Model): + """ArcSetting details to update. + + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param connectivity_properties: contains connectivity related configuration for ARC resources. + :type connectivity_properties: object + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'connectivity_properties': {'key': 'properties.connectivityProperties', 'type': 'object'}, + } + + def __init__( + self, + **kwargs + ): + super(ArcSettingsPatch, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.connectivity_properties = kwargs.get('connectivity_properties', None) + + class TrackedResource(Resource): """The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'. @@ -239,6 +332,10 @@ class Cluster(TrackedResource): :type aad_client_id: str :param aad_tenant_id: Tenant id of cluster AAD identity. :type aad_tenant_id: str + :param aad_application_object_id: Object id of cluster AAD identity. + :type aad_application_object_id: str + :param aad_service_principal_object_id: Id of cluster identity service principal. + :type aad_service_principal_object_id: str :param desired_properties: Desired properties of the cluster. :type desired_properties: ~azure.mgmt.azurestackhci.models.ClusterDesiredProperties :ivar reported_properties: Properties reported by cluster agent. @@ -253,6 +350,8 @@ class Cluster(TrackedResource): :vartype last_sync_timestamp: ~datetime.datetime :ivar last_billing_timestamp: Most recent billing meter timestamp. :vartype last_billing_timestamp: ~datetime.datetime + :ivar service_endpoint: Region specific DataPath Endpoint of the cluster. + :vartype service_endpoint: str :param created_by: The identity that created the resource. :type created_by: str :param created_by_type: The type of identity that created the resource. Possible values @@ -283,6 +382,7 @@ class Cluster(TrackedResource): 'registration_timestamp': {'readonly': True}, 'last_sync_timestamp': {'readonly': True}, 'last_billing_timestamp': {'readonly': True}, + 'service_endpoint': {'readonly': True}, } _attribute_map = { @@ -297,6 +397,8 @@ class Cluster(TrackedResource): 'cloud_management_endpoint': {'key': 'properties.cloudManagementEndpoint', 'type': 'str'}, 'aad_client_id': {'key': 'properties.aadClientId', 'type': 'str'}, 'aad_tenant_id': {'key': 'properties.aadTenantId', 'type': 'str'}, + 'aad_application_object_id': {'key': 'properties.aadApplicationObjectId', 'type': 'str'}, + 'aad_service_principal_object_id': {'key': 'properties.aadServicePrincipalObjectId', 'type': 'str'}, 'desired_properties': {'key': 'properties.desiredProperties', 'type': 'ClusterDesiredProperties'}, 'reported_properties': {'key': 'properties.reportedProperties', 'type': 'ClusterReportedProperties'}, 'trial_days_remaining': {'key': 'properties.trialDaysRemaining', 'type': 'float'}, @@ -304,6 +406,7 @@ class Cluster(TrackedResource): 'registration_timestamp': {'key': 'properties.registrationTimestamp', 'type': 'iso-8601'}, 'last_sync_timestamp': {'key': 'properties.lastSyncTimestamp', 'type': 'iso-8601'}, 'last_billing_timestamp': {'key': 'properties.lastBillingTimestamp', 'type': 'iso-8601'}, + 'service_endpoint': {'key': 'properties.serviceEndpoint', 'type': 'str'}, 'created_by': {'key': 'systemData.createdBy', 'type': 'str'}, 'created_by_type': {'key': 'systemData.createdByType', 'type': 'str'}, 'created_at': {'key': 'systemData.createdAt', 'type': 'iso-8601'}, @@ -323,6 +426,8 @@ def __init__( self.cloud_management_endpoint = kwargs.get('cloud_management_endpoint', None) self.aad_client_id = kwargs.get('aad_client_id', None) self.aad_tenant_id = kwargs.get('aad_tenant_id', None) + self.aad_application_object_id = kwargs.get('aad_application_object_id', None) + self.aad_service_principal_object_id = kwargs.get('aad_service_principal_object_id', None) self.desired_properties = kwargs.get('desired_properties', None) self.reported_properties = None self.trial_days_remaining = None @@ -330,6 +435,7 @@ def __init__( self.registration_timestamp = None self.last_sync_timestamp = None self.last_billing_timestamp = None + self.service_endpoint = None self.created_by = kwargs.get('created_by', None) self.created_by_type = kwargs.get('created_by_type', None) self.created_at = kwargs.get('created_at', None) @@ -364,6 +470,37 @@ def __init__( self.diagnostic_level = kwargs.get('diagnostic_level', None) +class ClusterIdentityResponse(msrest.serialization.Model): + """Cluster Identity details. + + :param aad_client_id: + :type aad_client_id: str + :param aad_tenant_id: + :type aad_tenant_id: str + :param aad_service_principal_object_id: + :type aad_service_principal_object_id: str + :param aad_application_object_id: + :type aad_application_object_id: str + """ + + _attribute_map = { + 'aad_client_id': {'key': 'properties.aadClientId', 'type': 'str'}, + 'aad_tenant_id': {'key': 'properties.aadTenantId', 'type': 'str'}, + 'aad_service_principal_object_id': {'key': 'properties.aadServicePrincipalObjectId', 'type': 'str'}, + 'aad_application_object_id': {'key': 'properties.aadApplicationObjectId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ClusterIdentityResponse, self).__init__(**kwargs) + self.aad_client_id = kwargs.get('aad_client_id', None) + self.aad_tenant_id = kwargs.get('aad_tenant_id', None) + self.aad_service_principal_object_id = kwargs.get('aad_service_principal_object_id', None) + self.aad_application_object_id = kwargs.get('aad_application_object_id', None) + + class ClusterList(msrest.serialization.Model): """List of clusters. @@ -915,6 +1052,37 @@ def __init__( self.next_link = None +class PasswordCredential(msrest.serialization.Model): + """PasswordCredential. + + :param secret_text: + :type secret_text: str + :param key_id: + :type key_id: str + :param start_date_time: + :type start_date_time: ~datetime.datetime + :param end_date_time: + :type end_date_time: ~datetime.datetime + """ + + _attribute_map = { + 'secret_text': {'key': 'secretText', 'type': 'str'}, + 'key_id': {'key': 'keyId', 'type': 'str'}, + 'start_date_time': {'key': 'startDateTime', 'type': 'iso-8601'}, + 'end_date_time': {'key': 'endDateTime', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + super(PasswordCredential, self).__init__(**kwargs) + self.secret_text = kwargs.get('secret_text', None) + self.key_id = kwargs.get('key_id', None) + self.start_date_time = kwargs.get('start_date_time', None) + self.end_date_time = kwargs.get('end_date_time', None) + + class PerNodeExtensionState(msrest.serialization.Model): """Status of Arc Extension for a particular node in HCI Cluster. @@ -1021,3 +1189,41 @@ def __init__( **kwargs ): super(ProxyResource, self).__init__(**kwargs) + + +class RawCertificateData(msrest.serialization.Model): + """RawCertificateData. + + :param certificates: + :type certificates: list[str] + """ + + _attribute_map = { + 'certificates': {'key': 'certificates', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(RawCertificateData, self).__init__(**kwargs) + self.certificates = kwargs.get('certificates', None) + + +class UploadCertificateRequest(msrest.serialization.Model): + """UploadCertificateRequest. + + :param properties: + :type properties: ~azure.mgmt.azurestackhci.models.RawCertificateData + """ + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'RawCertificateData'}, + } + + def __init__( + self, + **kwargs + ): + super(UploadCertificateRequest, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) diff --git a/src/stack-hci/azext_stack_hci/vendored_sdks/azurestackhci/models/_models_py3.py b/src/stack-hci/azext_stack_hci/vendored_sdks/azurestackhci/models/_models_py3.py index 5fe79ad7684..1388655a701 100644 --- a/src/stack-hci/azext_stack_hci/vendored_sdks/azurestackhci/models/_models_py3.py +++ b/src/stack-hci/azext_stack_hci/vendored_sdks/azurestackhci/models/_models_py3.py @@ -15,6 +15,63 @@ from ._azure_stack_hci_client_enums import * +class ArcConnectivityProperties(msrest.serialization.Model): + """Connectivity related configuration required by arc server. + + :param enabled: True indicates ARC connectivity is enabled. + :type enabled: bool + """ + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + } + + def __init__( + self, + *, + enabled: Optional[bool] = None, + **kwargs + ): + super(ArcConnectivityProperties, self).__init__(**kwargs) + self.enabled = enabled + + +class ArcIdentityResponse(msrest.serialization.Model): + """ArcIdentity details. + + :param arc_application_client_id: + :type arc_application_client_id: str + :param arc_application_tenant_id: + :type arc_application_tenant_id: str + :param arc_service_principal_object_id: + :type arc_service_principal_object_id: str + :param arc_application_object_id: + :type arc_application_object_id: str + """ + + _attribute_map = { + 'arc_application_client_id': {'key': 'properties.arcApplicationClientId', 'type': 'str'}, + 'arc_application_tenant_id': {'key': 'properties.arcApplicationTenantId', 'type': 'str'}, + 'arc_service_principal_object_id': {'key': 'properties.arcServicePrincipalObjectId', 'type': 'str'}, + 'arc_application_object_id': {'key': 'properties.arcApplicationObjectId', 'type': 'str'}, + } + + def __init__( + self, + *, + arc_application_client_id: Optional[str] = None, + arc_application_tenant_id: Optional[str] = None, + arc_service_principal_object_id: Optional[str] = None, + arc_application_object_id: Optional[str] = None, + **kwargs + ): + super(ArcIdentityResponse, self).__init__(**kwargs) + self.arc_application_client_id = arc_application_client_id + self.arc_application_tenant_id = arc_application_tenant_id + self.arc_service_principal_object_id = arc_service_principal_object_id + self.arc_application_object_id = arc_application_object_id + + class Resource(msrest.serialization.Model): """Common fields that are returned in the response for all Azure Resource Manager resources. @@ -71,6 +128,14 @@ class ArcSetting(Resource): :param arc_instance_resource_group: The resource group that hosts the Arc agents, ie. Hybrid Compute Machine resources. :type arc_instance_resource_group: str + :param arc_application_client_id: App id of arc AAD identity. + :type arc_application_client_id: str + :param arc_application_tenant_id: Tenant id of arc AAD identity. + :type arc_application_tenant_id: str + :param arc_service_principal_object_id: Object id of arc AAD service principal. + :type arc_service_principal_object_id: str + :param arc_application_object_id: Object id of arc AAD identity. + :type arc_application_object_id: str :ivar aggregate_state: Aggregate state of Arc agent across the nodes in this HCI cluster. Possible values include: "NotSpecified", "Error", "Succeeded", "Canceled", "Failed", "Connected", "Disconnected", "Deleted", "Creating", "Updating", "Deleting", "Moving", @@ -78,6 +143,8 @@ class ArcSetting(Resource): :vartype aggregate_state: str or ~azure.mgmt.azurestackhci.models.ArcSettingAggregateState :ivar per_node_details: State of Arc agent in each of the nodes. :vartype per_node_details: list[~azure.mgmt.azurestackhci.models.PerNodeState] + :param connectivity_properties: contains connectivity related configuration for ARC resources. + :type connectivity_properties: object :param created_by: The identity that created the resource. :type created_by: str :param created_by_type: The type of identity that created the resource. Possible values @@ -109,8 +176,13 @@ class ArcSetting(Resource): 'type': {'key': 'type', 'type': 'str'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'arc_instance_resource_group': {'key': 'properties.arcInstanceResourceGroup', 'type': 'str'}, + 'arc_application_client_id': {'key': 'properties.arcApplicationClientId', 'type': 'str'}, + 'arc_application_tenant_id': {'key': 'properties.arcApplicationTenantId', 'type': 'str'}, + 'arc_service_principal_object_id': {'key': 'properties.arcServicePrincipalObjectId', 'type': 'str'}, + 'arc_application_object_id': {'key': 'properties.arcApplicationObjectId', 'type': 'str'}, 'aggregate_state': {'key': 'properties.aggregateState', 'type': 'str'}, 'per_node_details': {'key': 'properties.perNodeDetails', 'type': '[PerNodeState]'}, + 'connectivity_properties': {'key': 'properties.connectivityProperties', 'type': 'object'}, 'created_by': {'key': 'systemData.createdBy', 'type': 'str'}, 'created_by_type': {'key': 'systemData.createdByType', 'type': 'str'}, 'created_at': {'key': 'systemData.createdAt', 'type': 'iso-8601'}, @@ -123,6 +195,11 @@ def __init__( self, *, arc_instance_resource_group: Optional[str] = None, + arc_application_client_id: Optional[str] = None, + arc_application_tenant_id: Optional[str] = None, + arc_service_principal_object_id: Optional[str] = None, + arc_application_object_id: Optional[str] = None, + connectivity_properties: Optional[object] = None, created_by: Optional[str] = None, created_by_type: Optional[Union[str, "CreatedByType"]] = None, created_at: Optional[datetime.datetime] = None, @@ -134,8 +211,13 @@ def __init__( super(ArcSetting, self).__init__(**kwargs) self.provisioning_state = None self.arc_instance_resource_group = arc_instance_resource_group + self.arc_application_client_id = arc_application_client_id + self.arc_application_tenant_id = arc_application_tenant_id + self.arc_service_principal_object_id = arc_service_principal_object_id + self.arc_application_object_id = arc_application_object_id self.aggregate_state = None self.per_node_details = None + self.connectivity_properties = connectivity_properties self.created_by = created_by self.created_by_type = created_by_type self.created_at = created_at @@ -174,6 +256,32 @@ def __init__( self.next_link = None +class ArcSettingsPatch(msrest.serialization.Model): + """ArcSetting details to update. + + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param connectivity_properties: contains connectivity related configuration for ARC resources. + :type connectivity_properties: object + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'connectivity_properties': {'key': 'properties.connectivityProperties', 'type': 'object'}, + } + + def __init__( + self, + *, + tags: Optional[Dict[str, str]] = None, + connectivity_properties: Optional[object] = None, + **kwargs + ): + super(ArcSettingsPatch, self).__init__(**kwargs) + self.tags = tags + self.connectivity_properties = connectivity_properties + + class TrackedResource(Resource): """The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'. @@ -255,6 +363,10 @@ class Cluster(TrackedResource): :type aad_client_id: str :param aad_tenant_id: Tenant id of cluster AAD identity. :type aad_tenant_id: str + :param aad_application_object_id: Object id of cluster AAD identity. + :type aad_application_object_id: str + :param aad_service_principal_object_id: Id of cluster identity service principal. + :type aad_service_principal_object_id: str :param desired_properties: Desired properties of the cluster. :type desired_properties: ~azure.mgmt.azurestackhci.models.ClusterDesiredProperties :ivar reported_properties: Properties reported by cluster agent. @@ -269,6 +381,8 @@ class Cluster(TrackedResource): :vartype last_sync_timestamp: ~datetime.datetime :ivar last_billing_timestamp: Most recent billing meter timestamp. :vartype last_billing_timestamp: ~datetime.datetime + :ivar service_endpoint: Region specific DataPath Endpoint of the cluster. + :vartype service_endpoint: str :param created_by: The identity that created the resource. :type created_by: str :param created_by_type: The type of identity that created the resource. Possible values @@ -299,6 +413,7 @@ class Cluster(TrackedResource): 'registration_timestamp': {'readonly': True}, 'last_sync_timestamp': {'readonly': True}, 'last_billing_timestamp': {'readonly': True}, + 'service_endpoint': {'readonly': True}, } _attribute_map = { @@ -313,6 +428,8 @@ class Cluster(TrackedResource): 'cloud_management_endpoint': {'key': 'properties.cloudManagementEndpoint', 'type': 'str'}, 'aad_client_id': {'key': 'properties.aadClientId', 'type': 'str'}, 'aad_tenant_id': {'key': 'properties.aadTenantId', 'type': 'str'}, + 'aad_application_object_id': {'key': 'properties.aadApplicationObjectId', 'type': 'str'}, + 'aad_service_principal_object_id': {'key': 'properties.aadServicePrincipalObjectId', 'type': 'str'}, 'desired_properties': {'key': 'properties.desiredProperties', 'type': 'ClusterDesiredProperties'}, 'reported_properties': {'key': 'properties.reportedProperties', 'type': 'ClusterReportedProperties'}, 'trial_days_remaining': {'key': 'properties.trialDaysRemaining', 'type': 'float'}, @@ -320,6 +437,7 @@ class Cluster(TrackedResource): 'registration_timestamp': {'key': 'properties.registrationTimestamp', 'type': 'iso-8601'}, 'last_sync_timestamp': {'key': 'properties.lastSyncTimestamp', 'type': 'iso-8601'}, 'last_billing_timestamp': {'key': 'properties.lastBillingTimestamp', 'type': 'iso-8601'}, + 'service_endpoint': {'key': 'properties.serviceEndpoint', 'type': 'str'}, 'created_by': {'key': 'systemData.createdBy', 'type': 'str'}, 'created_by_type': {'key': 'systemData.createdByType', 'type': 'str'}, 'created_at': {'key': 'systemData.createdAt', 'type': 'iso-8601'}, @@ -336,6 +454,8 @@ def __init__( cloud_management_endpoint: Optional[str] = None, aad_client_id: Optional[str] = None, aad_tenant_id: Optional[str] = None, + aad_application_object_id: Optional[str] = None, + aad_service_principal_object_id: Optional[str] = None, desired_properties: Optional["ClusterDesiredProperties"] = None, created_by: Optional[str] = None, created_by_type: Optional[Union[str, "CreatedByType"]] = None, @@ -352,6 +472,8 @@ def __init__( self.cloud_management_endpoint = cloud_management_endpoint self.aad_client_id = aad_client_id self.aad_tenant_id = aad_tenant_id + self.aad_application_object_id = aad_application_object_id + self.aad_service_principal_object_id = aad_service_principal_object_id self.desired_properties = desired_properties self.reported_properties = None self.trial_days_remaining = None @@ -359,6 +481,7 @@ def __init__( self.registration_timestamp = None self.last_sync_timestamp = None self.last_billing_timestamp = None + self.service_endpoint = None self.created_by = created_by self.created_by_type = created_by_type self.created_at = created_at @@ -396,6 +519,42 @@ def __init__( self.diagnostic_level = diagnostic_level +class ClusterIdentityResponse(msrest.serialization.Model): + """Cluster Identity details. + + :param aad_client_id: + :type aad_client_id: str + :param aad_tenant_id: + :type aad_tenant_id: str + :param aad_service_principal_object_id: + :type aad_service_principal_object_id: str + :param aad_application_object_id: + :type aad_application_object_id: str + """ + + _attribute_map = { + 'aad_client_id': {'key': 'properties.aadClientId', 'type': 'str'}, + 'aad_tenant_id': {'key': 'properties.aadTenantId', 'type': 'str'}, + 'aad_service_principal_object_id': {'key': 'properties.aadServicePrincipalObjectId', 'type': 'str'}, + 'aad_application_object_id': {'key': 'properties.aadApplicationObjectId', 'type': 'str'}, + } + + def __init__( + self, + *, + aad_client_id: Optional[str] = None, + aad_tenant_id: Optional[str] = None, + aad_service_principal_object_id: Optional[str] = None, + aad_application_object_id: Optional[str] = None, + **kwargs + ): + super(ClusterIdentityResponse, self).__init__(**kwargs) + self.aad_client_id = aad_client_id + self.aad_tenant_id = aad_tenant_id + self.aad_service_principal_object_id = aad_service_principal_object_id + self.aad_application_object_id = aad_application_object_id + + class ClusterList(msrest.serialization.Model): """List of clusters. @@ -975,6 +1134,42 @@ def __init__( self.next_link = None +class PasswordCredential(msrest.serialization.Model): + """PasswordCredential. + + :param secret_text: + :type secret_text: str + :param key_id: + :type key_id: str + :param start_date_time: + :type start_date_time: ~datetime.datetime + :param end_date_time: + :type end_date_time: ~datetime.datetime + """ + + _attribute_map = { + 'secret_text': {'key': 'secretText', 'type': 'str'}, + 'key_id': {'key': 'keyId', 'type': 'str'}, + 'start_date_time': {'key': 'startDateTime', 'type': 'iso-8601'}, + 'end_date_time': {'key': 'endDateTime', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + secret_text: Optional[str] = None, + key_id: Optional[str] = None, + start_date_time: Optional[datetime.datetime] = None, + end_date_time: Optional[datetime.datetime] = None, + **kwargs + ): + super(PasswordCredential, self).__init__(**kwargs) + self.secret_text = secret_text + self.key_id = key_id + self.start_date_time = start_date_time + self.end_date_time = end_date_time + + class PerNodeExtensionState(msrest.serialization.Model): """Status of Arc Extension for a particular node in HCI Cluster. @@ -1081,3 +1276,45 @@ def __init__( **kwargs ): super(ProxyResource, self).__init__(**kwargs) + + +class RawCertificateData(msrest.serialization.Model): + """RawCertificateData. + + :param certificates: + :type certificates: list[str] + """ + + _attribute_map = { + 'certificates': {'key': 'certificates', 'type': '[str]'}, + } + + def __init__( + self, + *, + certificates: Optional[List[str]] = None, + **kwargs + ): + super(RawCertificateData, self).__init__(**kwargs) + self.certificates = certificates + + +class UploadCertificateRequest(msrest.serialization.Model): + """UploadCertificateRequest. + + :param properties: + :type properties: ~azure.mgmt.azurestackhci.models.RawCertificateData + """ + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'RawCertificateData'}, + } + + def __init__( + self, + *, + properties: Optional["RawCertificateData"] = None, + **kwargs + ): + super(UploadCertificateRequest, self).__init__(**kwargs) + self.properties = properties diff --git a/src/stack-hci/azext_stack_hci/vendored_sdks/azurestackhci/operations/_arc_settings_operations.py b/src/stack-hci/azext_stack_hci/vendored_sdks/azurestackhci/operations/_arc_settings_operations.py index d071419f97b..e34c150d9ba 100644 --- a/src/stack-hci/azext_stack_hci/vendored_sdks/azurestackhci/operations/_arc_settings_operations.py +++ b/src/stack-hci/azext_stack_hci/vendored_sdks/azurestackhci/operations/_arc_settings_operations.py @@ -70,7 +70,7 @@ def list_by_cluster( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-01-01" + api_version = "2022-05-01" accept = "application/json" def prepare_request(next_link=None): @@ -150,7 +150,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-01-01" + api_version = "2022-05-01" accept = "application/json" # Construct URL @@ -218,7 +218,7 @@ def create( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-01-01" + api_version = "2022-05-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -261,6 +261,79 @@ def create( return deserialized create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/arcSettings/{arcSettingName}'} # type: ignore + def update( + self, + resource_group_name, # type: str + cluster_name, # type: str + arc_setting_name, # type: str + arc_setting, # type: "models.ArcSettingsPatch" + **kwargs # type: Any + ): + # type: (...) -> "models.ArcSetting" + """Update ArcSettings for HCI cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param cluster_name: The name of the cluster. + :type cluster_name: str + :param arc_setting_name: The name of the proxy resource holding details of HCI ArcSetting + information. + :type arc_setting_name: str + :param arc_setting: ArcSettings parameters that needs to be updated. + :type arc_setting: ~azure.mgmt.azurestackhci.models.ArcSettingsPatch + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ArcSetting, or the result of cls(response) + :rtype: ~azure.mgmt.azurestackhci.models.ArcSetting + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.ArcSetting"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2022-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), + 'arcSettingName': self._serialize.url("arc_setting_name", arc_setting_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(arc_setting, 'ArcSettingsPatch') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ArcSetting', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/arcSettings/{arcSettingName}'} # type: ignore + def _delete_initial( self, resource_group_name, # type: str @@ -274,7 +347,7 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-01-01" + api_version = "2022-05-01" accept = "application/json" # Construct URL @@ -379,3 +452,195 @@ def get_long_running_output(pipeline_response): else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/arcSettings/{arcSettingName}'} # type: ignore + + def generate_password( + self, + resource_group_name, # type: str + cluster_name, # type: str + arc_setting_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "models.PasswordCredential" + """Generate password for arc settings. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param cluster_name: The name of the cluster. + :type cluster_name: str + :param arc_setting_name: The name of the proxy resource holding details of HCI ArcSetting + information. + :type arc_setting_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PasswordCredential, or the result of cls(response) + :rtype: ~azure.mgmt.azurestackhci.models.PasswordCredential + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.PasswordCredential"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2022-05-01" + accept = "application/json" + + # Construct URL + url = self.generate_password.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), + 'arcSettingName': self._serialize.url("arc_setting_name", arc_setting_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PasswordCredential', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + generate_password.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/arcSettings/{arcSettingName}/generatePassword'} # type: ignore + + def _create_identity_initial( + self, + resource_group_name, # type: str + cluster_name, # type: str + arc_setting_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Optional["models.ArcIdentityResponse"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.ArcIdentityResponse"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2022-05-01" + accept = "application/json" + + # Construct URL + url = self._create_identity_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), + 'arcSettingName': self._serialize.url("arc_setting_name", arc_setting_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ArcIdentityResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_identity_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/arcSettings/{arcSettingName}/createArcIdentity'} # type: ignore + + def begin_create_identity( + self, + resource_group_name, # type: str + cluster_name, # type: str + arc_setting_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller["models.ArcIdentityResponse"] + """Create Aad identity for arc settings. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param cluster_name: The name of the cluster. + :type cluster_name: str + :param arc_setting_name: The name of the proxy resource holding details of HCI ArcSetting + information. + :type arc_setting_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either ArcIdentityResponse or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.azurestackhci.models.ArcIdentityResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["models.ArcIdentityResponse"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_identity_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + arc_setting_name=arc_setting_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('ArcIdentityResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), + 'arcSettingName': self._serialize.url("arc_setting_name", arc_setting_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_identity.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/arcSettings/{arcSettingName}/createArcIdentity'} # type: ignore diff --git a/src/stack-hci/azext_stack_hci/vendored_sdks/azurestackhci/operations/_clusters_operations.py b/src/stack-hci/azext_stack_hci/vendored_sdks/azurestackhci/operations/_clusters_operations.py index d6e655d7c4d..0e83b6637f8 100644 --- a/src/stack-hci/azext_stack_hci/vendored_sdks/azurestackhci/operations/_clusters_operations.py +++ b/src/stack-hci/azext_stack_hci/vendored_sdks/azurestackhci/operations/_clusters_operations.py @@ -12,13 +12,15 @@ from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -62,7 +64,7 @@ def list_by_subscription( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-01-01" + api_version = "2022-05-01" accept = "application/json" def prepare_request(next_link=None): @@ -133,7 +135,7 @@ def list_by_resource_group( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-01-01" + api_version = "2022-05-01" accept = "application/json" def prepare_request(next_link=None): @@ -208,7 +210,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-01-01" + api_version = "2022-05-01" accept = "application/json" # Construct URL @@ -271,7 +273,7 @@ def create( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-01-01" + api_version = "2022-05-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -339,7 +341,7 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-01-01" + api_version = "2022-05-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -381,13 +383,59 @@ def update( return deserialized update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}'} # type: ignore - def delete( + def _delete_initial( self, resource_group_name, # type: str cluster_name, # type: str **kwargs # type: Any ): # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2022-05-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}'} # type: ignore + + def begin_delete( + self, + resource_group_name, # type: str + cluster_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] """Delete an HCI cluster. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -395,20 +443,76 @@ def delete( :param cluster_name: The name of the cluster. :type cluster_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}'} # type: ignore + + def _upload_certificate_initial( + self, + resource_group_name, # type: str + cluster_name, # type: str + upload_certificate_request, # type: "models.UploadCertificateRequest" + **kwargs # type: Any + ): + # type: (...) -> None cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-01-01" + api_version = "2022-05-01" + content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL - url = self.delete.metadata['url'] # type: ignore + url = self._upload_certificate_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), @@ -422,13 +526,17 @@ def delete( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - request = self._client.delete(url, query_parameters, header_parameters) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(upload_certificate_request, 'UploadCertificateRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 202, 204]: + if response.status_code not in [202]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -436,4 +544,192 @@ def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}'} # type: ignore + _upload_certificate_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/uploadCertificate'} # type: ignore + + def begin_upload_certificate( + self, + resource_group_name, # type: str + cluster_name, # type: str + upload_certificate_request, # type: "models.UploadCertificateRequest" + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Upload certificate. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param cluster_name: The name of the cluster. + :type cluster_name: str + :param upload_certificate_request: Upload certificate request. + :type upload_certificate_request: ~azure.mgmt.azurestackhci.models.UploadCertificateRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._upload_certificate_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + upload_certificate_request=upload_certificate_request, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_upload_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/uploadCertificate'} # type: ignore + + def _create_identity_initial( + self, + resource_group_name, # type: str + cluster_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Optional["models.ClusterIdentityResponse"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.ClusterIdentityResponse"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2022-05-01" + accept = "application/json" + + # Construct URL + url = self._create_identity_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ClusterIdentityResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_identity_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/createClusterIdentity'} # type: ignore + + def begin_create_identity( + self, + resource_group_name, # type: str + cluster_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller["models.ClusterIdentityResponse"] + """Create cluster identity. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param cluster_name: The name of the cluster. + :type cluster_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either ClusterIdentityResponse or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.azurestackhci.models.ClusterIdentityResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["models.ClusterIdentityResponse"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_identity_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('ClusterIdentityResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_identity.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/createClusterIdentity'} # type: ignore diff --git a/src/stack-hci/azext_stack_hci/vendored_sdks/azurestackhci/operations/_extensions_operations.py b/src/stack-hci/azext_stack_hci/vendored_sdks/azurestackhci/operations/_extensions_operations.py index ecbabfe37c1..d9ca4d8002e 100644 --- a/src/stack-hci/azext_stack_hci/vendored_sdks/azurestackhci/operations/_extensions_operations.py +++ b/src/stack-hci/azext_stack_hci/vendored_sdks/azurestackhci/operations/_extensions_operations.py @@ -74,7 +74,7 @@ def list_by_arc_setting( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-01-01" + api_version = "2022-05-01" accept = "application/json" def prepare_request(next_link=None): @@ -158,7 +158,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-01-01" + api_version = "2022-05-01" accept = "application/json" # Construct URL @@ -212,7 +212,7 @@ def _create_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-01-01" + api_version = "2022-05-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -352,13 +352,13 @@ def _update_initial( extension, # type: "models.Extension" **kwargs # type: Any ): - # type: (...) -> "models.Extension" - cls = kwargs.pop('cls', None) # type: ClsType["models.Extension"] + # type: (...) -> Optional["models.Extension"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.Extension"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-01-01" + api_version = "2022-05-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -389,12 +389,14 @@ def _update_initial( pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [201]: + if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('Extension', pipeline_response) + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Extension', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -499,7 +501,7 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-01-01" + api_version = "2022-05-01" accept = "application/json" # Construct URL diff --git a/src/stack-hci/azext_stack_hci/vendored_sdks/azurestackhci/operations/_operations.py b/src/stack-hci/azext_stack_hci/vendored_sdks/azurestackhci/operations/_operations.py index be6380ba26b..efde5084b5b 100644 --- a/src/stack-hci/azext_stack_hci/vendored_sdks/azurestackhci/operations/_operations.py +++ b/src/stack-hci/azext_stack_hci/vendored_sdks/azurestackhci/operations/_operations.py @@ -61,7 +61,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-01-01" + api_version = "2022-05-01" accept = "application/json" # Construct URL diff --git a/src/stack-hci/setup.py b/src/stack-hci/setup.py index 0bb9366ab4d..afd68e0284d 100644 --- a/src/stack-hci/setup.py +++ b/src/stack-hci/setup.py @@ -10,7 +10,7 @@ from setuptools import setup, find_packages # HISTORY.rst entry. -VERSION = '0.1.5' +VERSION = '0.1.6' try: from azext_stack_hci.manual.version import VERSION except ImportError: