From bcb4d836a0327f241ebab43818d5b94a56f5ef9f Mon Sep 17 00:00:00 2001 From: songlu <442586197@qq.com> Date: Wed, 20 Jul 2022 10:51:04 +0800 Subject: [PATCH 1/4] stack-hci --- linter_exclusions.yml | 30 + src/stack-hci/HISTORY.rst | 4 + src/stack-hci/README.md | 102 +- .../azext_stack_hci/generated/_help.py | 70 + .../azext_stack_hci/generated/_params.py | 50 +- .../azext_stack_hci/generated/action.py | 30 + .../azext_stack_hci/generated/commands.py | 10 +- .../azext_stack_hci/generated/custom.py | 93 +- src/stack-hci/azext_stack_hci/manual/_help.py | 24 - .../tests/latest/example_steps.py | 230 +++ .../recordings/test_stack_hci_Scenario.yaml | 1359 +++++++++++++++++ .../test_stack_hci_arc_setting_crud.yaml | 460 ------ .../test_stack_hci_cluster_crud.yaml | 649 -------- .../test_stack_hci_extension_crud.yaml | 825 ---------- .../tests/latest/test_stack_hci_commands.py | 125 -- .../tests/latest/test_stack_hci_scenario.py | 125 ++ .../azurestackhci/_configuration.py | 2 +- .../azurestackhci/aio/_configuration.py | 2 +- .../operations/_arc_settings_operations.py | 269 +++- .../aio/operations/_clusters_operations.py | 321 +++- .../aio/operations/_extensions_operations.py | 20 +- .../aio/operations/_operations.py | 2 +- .../azurestackhci/models/__init__.py | 21 + .../azurestackhci/models/_models.py | 206 +++ .../azurestackhci/models/_models_py3.py | 237 +++ .../operations/_arc_settings_operations.py | 273 +++- .../operations/_clusters_operations.py | 326 +++- .../operations/_extensions_operations.py | 20 +- .../azurestackhci/operations/_operations.py | 2 +- src/stack-hci/setup.py | 2 +- 30 files changed, 3713 insertions(+), 2176 deletions(-) delete mode 100644 src/stack-hci/azext_stack_hci/manual/_help.py create mode 100644 src/stack-hci/azext_stack_hci/tests/latest/example_steps.py create mode 100644 src/stack-hci/azext_stack_hci/tests/latest/recordings/test_stack_hci_Scenario.yaml delete mode 100644 src/stack-hci/azext_stack_hci/tests/latest/recordings/test_stack_hci_arc_setting_crud.yaml delete mode 100644 src/stack-hci/azext_stack_hci/tests/latest/recordings/test_stack_hci_cluster_crud.yaml delete mode 100644 src/stack-hci/azext_stack_hci/tests/latest/recordings/test_stack_hci_extension_crud.yaml delete mode 100644 src/stack-hci/azext_stack_hci/tests/latest/test_stack_hci_commands.py create mode 100644 src/stack-hci/azext_stack_hci/tests/latest/test_stack_hci_scenario.py 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..3dfa72be226 100644 --- a/src/stack-hci/HISTORY.rst +++ b/src/stack-hci/HISTORY.rst @@ -3,6 +3,10 @@ Release History =============== +0.1.6 +++++++ +* Upgrade api-version to 2022-05-01 + 0.1.5 ++++++ * Support arc setting management diff --git a/src/stack-hci/README.md b/src/stack-hci/README.md index 68264818f33..6bbc5cee047 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,95 @@ 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 cluster list +az stack-hci arc-setting list --cluster-name "myCluster" --resource-group "test-rg" ``` +##### Update ##### ``` -az stack-hci cluster list --resource-group "test-rg" +az stack-hci arc-setting update --connectivity-properties "{\\"enabled\\":true}" --name "default" \ + --cluster-name "myCluster" --resource-group "test-rg" ``` +##### Create-identity ##### ``` -az stack-hci cluster list --subscription "test-sub" +az stack-hci arc-setting create-identity --name "default" --cluster-name "myCluster" --resource-group "test-rg" ``` - -##### Get details about the specified HCI cluster +##### 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" +``` +#### 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 create-identity --name "myCluster" --resource-group "test-rg" +``` +##### Upload-certificate ##### +``` +az stack-hci cluster upload-certificate --name "myCluster" --resource-group "test-rg" \ + --properties certificates="base64cert" certificates="base64cert" +``` +##### Delete ##### +``` +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..8bae1d6097d 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,42 @@ 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 upload-certificate'] = """ + type: command + short-summary: "Upload certificate." + parameters: + - name: --properties + long-summary: | + Usage: --properties certificates=XX + + examples: + - name: Upload certificate + text: |- + az stack-hci cluster upload-certificate --name "myCluster" --resource-group "test-rg" --properties \ +certificates="base64cert" certificates="base64cert" +""" + +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..71cca63e5a7 100644 --- a/src/stack-hci/azext_stack_hci/generated/_params.py +++ b/src/stack-hci/azext_stack_hci/generated/_params.py @@ -21,7 +21,10 @@ get_default_location_from_resource_group, validate_file_or_dict ) -from azext_stack_hci.action import AddDesiredProperties +from azext_stack_hci.action import ( + AddDesiredProperties, + AddProperties +) def load_arguments(self, _): @@ -43,6 +46,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 +63,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 +115,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 +147,22 @@ 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 upload-certificate') 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') + c.argument('properties', action=AddProperties, nargs='+', help='') + + 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/action.py b/src/stack-hci/azext_stack_hci/generated/action.py index 38d679a5ccc..42aab6f381c 100644 --- a/src/stack-hci/azext_stack_hci/generated/action.py +++ b/src/stack-hci/azext_stack_hci/generated/action.py @@ -50,3 +50,33 @@ def get_action(self, values, option_string): ) return d + + +class AddProperties(argparse.Action): + def __call__(self, parser, namespace, values, option_string=None): + action = self.get_action(values, option_string) + namespace.properties = action + + def get_action(self, values, option_string): + try: + properties = defaultdict(list) + for (k, v) in (x.split('=', 1) for x in values): + properties[k].append(v) + properties = dict(properties) + except ValueError: + raise CLIError('usage error: {} [KEY=VALUE ...]'.format(option_string)) + d = {} + for k in properties: + kl = k.lower() + v = properties[k] + + if kl == 'certificates': + d['certificates'] = v + + else: + raise CLIError( + 'Unsupported Key {} is provided for parameter properties. All possible keys are: certificates' + .format(k) + ) + + return d diff --git a/src/stack-hci/azext_stack_hci/generated/commands.py b/src/stack-hci/azext_stack_hci/generated/commands.py index b3519a515a8..750e373e748 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,16 @@ 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) + 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..dae88a64f06 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, + properties=None, + no_wait=False): + upload_certificate_request = {} + if properties is not None: + upload_certificate_request['properties'] = properties + 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/example_steps.py b/src/stack-hci/azext_stack_hci/tests/latest/example_steps.py new file mode 100644 index 00000000000..c71aa1d2d15 --- /dev/null +++ b/src/stack-hci/azext_stack_hci/tests/latest/example_steps.py @@ -0,0 +1,230 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + + +from .. import try_manual + + +# EXAMPLE: /Clusters/put/Create cluster +@try_manual +def step_cluster_create(test, checks=None): + if checks is None: + checks = [] + test.cmd('az stack-hci cluster create ' + '--location "East US" ' + '--name "{myCluster}" ' + '--resource-group "{rg}"', + checks=checks) + + +# EXAMPLE: /Clusters/get/Get cluster +@try_manual +def step_cluster_show(test, checks=None): + if checks is None: + checks = [] + test.cmd('az stack-hci cluster show ' + '--name "{myCluster}" ' + '--resource-group "{rg}"', + checks=checks) + + +# EXAMPLE: /Clusters/get/List clusters in a given resource group +@try_manual +def step_cluster_list(test, checks=None): + if checks is None: + checks = [] + test.cmd('az stack-hci cluster list ' + '--resource-group "{rg}"', + checks=checks) + + +# EXAMPLE: /Clusters/get/List clusters in a given subscription +@try_manual +def step_cluster_list2(test, checks=None): + if checks is None: + checks = [] + test.cmd('az stack-hci cluster list ' + '-g ""', + checks=checks) + + +# EXAMPLE: /Clusters/patch/Update cluster +@try_manual +def step_cluster_update(test, checks=None): + if checks is None: + checks = [] + test.cmd('az stack-hci cluster update ' + '--desired-properties diagnostic-level="Basic" windows-server-subscription="Enabled" ' + '--tags tag1="value1" tag2="value2" ' + '--name "{myCluster}" ' + '--resource-group "{rg}"', + checks=checks) + + +# EXAMPLE: /Clusters/post/Create cluster Identity +@try_manual +def step_cluster_create_identity(test, checks=None): + if checks is None: + checks = [] + test.cmd('az stack-hci cluster create-identity ' + '--name "{myCluster}" ' + '--resource-group "{rg}"', + checks=checks) + + +# EXAMPLE: /ArcSettings/put/Create ArcSetting +@try_manual +def step_arc_setting_create(test, checks=None): + if checks is None: + checks = [] + test.cmd('az stack-hci arc-setting create ' + '--name "{myArcSetting}" ' + '--cluster-name "{myCluster}" ' + '--resource-group "{rg}"', + checks=checks) + + +# EXAMPLE: /ArcSettings/get/Get ArcSetting +@try_manual +def step_arc_setting_show(test, checks=None): + if checks is None: + checks = [] + test.cmd('az stack-hci arc-setting show ' + '--name "{myArcSetting}" ' + '--cluster-name "{myCluster}" ' + '--resource-group "{rg}"', + checks=checks) + + +# EXAMPLE: /ArcSettings/get/List ArcSetting resources by HCI Cluster +@try_manual +def step_arc_setting_list(test, checks=None): + if checks is None: + checks = [] + test.cmd('az stack-hci arc-setting list ' + '--cluster-name "{myCluster}" ' + '--resource-group "{rg}"', + checks=checks) + + +# EXAMPLE: /ArcSettings/patch/Patch ArcSetting +@try_manual +def step_arc_setting_update(test, checks=None): + if checks is None: + checks = [] + test.cmd('az stack-hci arc-setting update ' + '--connectivity-properties "{{\\"enabled\\":true}}" ' + '--name "{myArcSetting}" ' + '--cluster-name "{myCluster}" ' + '--resource-group "{rg}"', + checks=checks) + + +# EXAMPLE: /ArcSettings/post/Create Arc Identity +@try_manual +def step_arc_setting_create_identity(test, checks=None): + if checks is None: + checks = [] + test.cmd('az stack-hci arc-setting create-identity ' + '--name "{myArcSetting}" ' + '--cluster-name "{myCluster}" ' + '--resource-group "{rg}"', + checks=checks) + + +# EXAMPLE: /ArcSettings/post/Generate Password +@try_manual +def step_arc_setting_generate_password(test, checks=None): + if checks is None: + checks = [] + test.cmd('az stack-hci arc-setting generate-password ' + '--name "{myArcSetting}" ' + '--cluster-name "{myCluster}" ' + '--resource-group "{rg}"', + checks=checks) + + +# EXAMPLE: /Extensions/put/Create Arc Extension +@try_manual +def step_extension_create(test, checks=None): + if checks is None: + checks = [] + test.cmd('az stack-hci extension create ' + '--arc-setting-name "{myArcSetting}" ' + '--cluster-name "{myCluster}" ' + '--type "{myExtension}" ' + '--protected-settings "{{\\"workspaceKey\\":\\"xx\\"}}" ' + '--publisher "Microsoft.Compute" ' + '--settings "{{\\"workspaceId\\":\\"xx\\"}}" ' + '--type-handler-version "1.10" ' + '--name "{myExtension}" ' + '--resource-group "{rg}"', + checks=[]) + + +# EXAMPLE: /Extensions/get/Get ArcSettings Extension +@try_manual +def step_extension_show(test, checks=None): + if checks is None: + checks = [] + test.cmd('az stack-hci extension show ' + '--arc-setting-name "{myArcSetting}" ' + '--cluster-name "{myCluster}" ' + '--name "{myExtension}" ' + '--resource-group "{rg}"', + checks=checks) + + +# EXAMPLE: /Extensions/get/List Extensions under ArcSetting resource +@try_manual +def step_extension_list(test, checks=None): + if checks is None: + checks = [] + test.cmd('az stack-hci extension list ' + '--arc-setting-name "{myArcSetting}" ' + '--cluster-name "{myCluster}" ' + '--resource-group "{rg}"', + checks=checks) + + +# EXAMPLE: /Extensions/delete/Delete Arc Extension +@try_manual +def step_extension_delete(test, checks=None): + if checks is None: + checks = [] + test.cmd('az stack-hci extension delete -y ' + '--arc-setting-name "{myArcSetting}" ' + '--cluster-name "{myCluster}" ' + '--name "{myExtension}" ' + '--resource-group "{rg}"', + checks=checks) + + +# EXAMPLE: /ArcSettings/delete/Delete ArcSetting +@try_manual +def step_arc_setting_delete(test, checks=None): + if checks is None: + checks = [] + test.cmd('az stack-hci arc-setting delete -y ' + '--name "{myArcSetting}" ' + '--cluster-name "{myCluster}" ' + '--resource-group "{rg}"', + checks=checks) + + +# EXAMPLE: /Clusters/delete/Delete cluster +@try_manual +def step_cluster_delete(test, checks=None): + if checks is None: + checks = [] + test.cmd('az stack-hci cluster delete -y ' + '--name "{myCluster}" ' + '--resource-group "{rg}"', + checks=checks) diff --git a/src/stack-hci/azext_stack_hci/tests/latest/recordings/test_stack_hci_Scenario.yaml b/src/stack-hci/azext_stack_hci/tests/latest/recordings/test_stack_hci_Scenario.yaml new file mode 100644 index 00000000000..87cb716c991 --- /dev/null +++ b/src/stack-hci/azext_stack_hci/tests/latest/recordings/test_stack_hci_Scenario.yaml @@ -0,0 +1,1359 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - unknown + Connection: + - keep-alive + User-Agent: + - 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/locations?api-version=2019-11-01 + response: + body: + string: "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus\",\"name\":\"eastus\",\"displayName\":\"East + US\",\"regionalDisplayName\":\"(US) East US\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Recommended\",\"geographyGroup\":\"US\",\"longitude\":\"-79.8164\",\"latitude\":\"37.3719\",\"physicalLocation\":\"Virginia\",\"pairedRegion\":[{\"name\":\"westus\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/westus\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus2\",\"name\":\"eastus2\",\"displayName\":\"East + US 2\",\"regionalDisplayName\":\"(US) East US 2\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Recommended\",\"geographyGroup\":\"US\",\"longitude\":\"-78.3889\",\"latitude\":\"36.6681\",\"physicalLocation\":\"Virginia\",\"pairedRegion\":[{\"name\":\"centralus\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/centralus\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/southcentralus\",\"name\":\"southcentralus\",\"displayName\":\"South + Central US\",\"regionalDisplayName\":\"(US) South Central US\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Recommended\",\"geographyGroup\":\"US\",\"longitude\":\"-98.5\",\"latitude\":\"29.4167\",\"physicalLocation\":\"Texas\",\"pairedRegion\":[{\"name\":\"northcentralus\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/northcentralus\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/westus2\",\"name\":\"westus2\",\"displayName\":\"West + US 2\",\"regionalDisplayName\":\"(US) West US 2\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Recommended\",\"geographyGroup\":\"US\",\"longitude\":\"-119.852\",\"latitude\":\"47.233\",\"physicalLocation\":\"Washington\",\"pairedRegion\":[{\"name\":\"westcentralus\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/westcentralus\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/westus3\",\"name\":\"westus3\",\"displayName\":\"West + US 3\",\"regionalDisplayName\":\"(US) West US 3\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Recommended\",\"geographyGroup\":\"US\",\"longitude\":\"-112.074036\",\"latitude\":\"33.448376\",\"physicalLocation\":\"Phoenix\",\"pairedRegion\":[{\"name\":\"eastus\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/australiaeast\",\"name\":\"australiaeast\",\"displayName\":\"Australia + East\",\"regionalDisplayName\":\"(Asia Pacific) Australia East\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Recommended\",\"geographyGroup\":\"Asia + Pacific\",\"longitude\":\"151.2094\",\"latitude\":\"-33.86\",\"physicalLocation\":\"New + South Wales\",\"pairedRegion\":[{\"name\":\"australiasoutheast\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/australiasoutheast\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/southeastasia\",\"name\":\"southeastasia\",\"displayName\":\"Southeast + Asia\",\"regionalDisplayName\":\"(Asia Pacific) Southeast Asia\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Recommended\",\"geographyGroup\":\"Asia + Pacific\",\"longitude\":\"103.833\",\"latitude\":\"1.283\",\"physicalLocation\":\"Singapore\",\"pairedRegion\":[{\"name\":\"eastasia\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastasia\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/northeurope\",\"name\":\"northeurope\",\"displayName\":\"North + Europe\",\"regionalDisplayName\":\"(Europe) North Europe\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Recommended\",\"geographyGroup\":\"Europe\",\"longitude\":\"-6.2597\",\"latitude\":\"53.3478\",\"physicalLocation\":\"Ireland\",\"pairedRegion\":[{\"name\":\"westeurope\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/westeurope\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/swedencentral\",\"name\":\"swedencentral\",\"displayName\":\"Sweden + Central\",\"regionalDisplayName\":\"(Europe) Sweden Central\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Recommended\",\"geographyGroup\":\"Europe\",\"longitude\":\"17.14127\",\"latitude\":\"60.67488\",\"physicalLocation\":\"G\xE4vle\",\"pairedRegion\":[{\"name\":\"swedensouth\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/swedensouth\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/uksouth\",\"name\":\"uksouth\",\"displayName\":\"UK + South\",\"regionalDisplayName\":\"(Europe) UK South\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Recommended\",\"geographyGroup\":\"Europe\",\"longitude\":\"-0.799\",\"latitude\":\"50.941\",\"physicalLocation\":\"London\",\"pairedRegion\":[{\"name\":\"ukwest\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/ukwest\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/westeurope\",\"name\":\"westeurope\",\"displayName\":\"West + Europe\",\"regionalDisplayName\":\"(Europe) West Europe\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Recommended\",\"geographyGroup\":\"Europe\",\"longitude\":\"4.9\",\"latitude\":\"52.3667\",\"physicalLocation\":\"Netherlands\",\"pairedRegion\":[{\"name\":\"northeurope\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/northeurope\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/centralus\",\"name\":\"centralus\",\"displayName\":\"Central + US\",\"regionalDisplayName\":\"(US) Central US\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Recommended\",\"geographyGroup\":\"US\",\"longitude\":\"-93.6208\",\"latitude\":\"41.5908\",\"physicalLocation\":\"Iowa\",\"pairedRegion\":[{\"name\":\"eastus2\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus2\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/southafricanorth\",\"name\":\"southafricanorth\",\"displayName\":\"South + Africa North\",\"regionalDisplayName\":\"(Africa) South Africa North\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Recommended\",\"geographyGroup\":\"Africa\",\"longitude\":\"28.218370\",\"latitude\":\"-25.731340\",\"physicalLocation\":\"Johannesburg\",\"pairedRegion\":[{\"name\":\"southafricawest\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/southafricawest\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/centralindia\",\"name\":\"centralindia\",\"displayName\":\"Central + India\",\"regionalDisplayName\":\"(Asia Pacific) Central India\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Recommended\",\"geographyGroup\":\"Asia + Pacific\",\"longitude\":\"73.9197\",\"latitude\":\"18.5822\",\"physicalLocation\":\"Pune\",\"pairedRegion\":[{\"name\":\"southindia\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/southindia\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastasia\",\"name\":\"eastasia\",\"displayName\":\"East + Asia\",\"regionalDisplayName\":\"(Asia Pacific) East Asia\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Recommended\",\"geographyGroup\":\"Asia + Pacific\",\"longitude\":\"114.188\",\"latitude\":\"22.267\",\"physicalLocation\":\"Hong + Kong\",\"pairedRegion\":[{\"name\":\"southeastasia\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/southeastasia\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/japaneast\",\"name\":\"japaneast\",\"displayName\":\"Japan + East\",\"regionalDisplayName\":\"(Asia Pacific) Japan East\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Recommended\",\"geographyGroup\":\"Asia + Pacific\",\"longitude\":\"139.77\",\"latitude\":\"35.68\",\"physicalLocation\":\"Tokyo, + Saitama\",\"pairedRegion\":[{\"name\":\"japanwest\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/japanwest\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/koreacentral\",\"name\":\"koreacentral\",\"displayName\":\"Korea + Central\",\"regionalDisplayName\":\"(Asia Pacific) Korea Central\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Recommended\",\"geographyGroup\":\"Asia + Pacific\",\"longitude\":\"126.9780\",\"latitude\":\"37.5665\",\"physicalLocation\":\"Seoul\",\"pairedRegion\":[{\"name\":\"koreasouth\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/koreasouth\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/canadacentral\",\"name\":\"canadacentral\",\"displayName\":\"Canada + Central\",\"regionalDisplayName\":\"(Canada) Canada Central\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Recommended\",\"geographyGroup\":\"Canada\",\"longitude\":\"-79.383\",\"latitude\":\"43.653\",\"physicalLocation\":\"Toronto\",\"pairedRegion\":[{\"name\":\"canadaeast\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/canadaeast\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/francecentral\",\"name\":\"francecentral\",\"displayName\":\"France + Central\",\"regionalDisplayName\":\"(Europe) France Central\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Recommended\",\"geographyGroup\":\"Europe\",\"longitude\":\"2.3730\",\"latitude\":\"46.3772\",\"physicalLocation\":\"Paris\",\"pairedRegion\":[{\"name\":\"francesouth\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/francesouth\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/germanywestcentral\",\"name\":\"germanywestcentral\",\"displayName\":\"Germany + West Central\",\"regionalDisplayName\":\"(Europe) Germany West Central\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Recommended\",\"geographyGroup\":\"Europe\",\"longitude\":\"8.682127\",\"latitude\":\"50.110924\",\"physicalLocation\":\"Frankfurt\",\"pairedRegion\":[{\"name\":\"germanynorth\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/germanynorth\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/norwayeast\",\"name\":\"norwayeast\",\"displayName\":\"Norway + East\",\"regionalDisplayName\":\"(Europe) Norway East\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Recommended\",\"geographyGroup\":\"Europe\",\"longitude\":\"10.752245\",\"latitude\":\"59.913868\",\"physicalLocation\":\"Norway\",\"pairedRegion\":[{\"name\":\"norwaywest\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/norwaywest\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/switzerlandnorth\",\"name\":\"switzerlandnorth\",\"displayName\":\"Switzerland + North\",\"regionalDisplayName\":\"(Europe) Switzerland North\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Recommended\",\"geographyGroup\":\"Europe\",\"longitude\":\"8.564572\",\"latitude\":\"47.451542\",\"physicalLocation\":\"Zurich\",\"pairedRegion\":[{\"name\":\"switzerlandwest\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/switzerlandwest\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/brazilsouth\",\"name\":\"brazilsouth\",\"displayName\":\"Brazil + South\",\"regionalDisplayName\":\"(South America) Brazil South\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Recommended\",\"geographyGroup\":\"South + America\",\"longitude\":\"-46.633\",\"latitude\":\"-23.55\",\"physicalLocation\":\"Sao + Paulo State\",\"pairedRegion\":[{\"name\":\"southcentralus\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/southcentralus\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus2euap\",\"name\":\"eastus2euap\",\"displayName\":\"East + US 2 EUAP\",\"regionalDisplayName\":\"(US) East US 2 EUAP\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Recommended\",\"geographyGroup\":\"US\",\"longitude\":\"-78.3889\",\"latitude\":\"36.6681\",\"pairedRegion\":[{\"name\":\"centraluseuap\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/centraluseuap\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/centralusstage\",\"name\":\"centralusstage\",\"displayName\":\"Central + US (Stage)\",\"regionalDisplayName\":\"(US) Central US (Stage)\",\"metadata\":{\"regionType\":\"Logical\",\"regionCategory\":\"Other\",\"geographyGroup\":\"US\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastusstage\",\"name\":\"eastusstage\",\"displayName\":\"East + US (Stage)\",\"regionalDisplayName\":\"(US) East US (Stage)\",\"metadata\":{\"regionType\":\"Logical\",\"regionCategory\":\"Other\",\"geographyGroup\":\"US\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus2stage\",\"name\":\"eastus2stage\",\"displayName\":\"East + US 2 (Stage)\",\"regionalDisplayName\":\"(US) East US 2 (Stage)\",\"metadata\":{\"regionType\":\"Logical\",\"regionCategory\":\"Other\",\"geographyGroup\":\"US\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/northcentralusstage\",\"name\":\"northcentralusstage\",\"displayName\":\"North + Central US (Stage)\",\"regionalDisplayName\":\"(US) North Central US (Stage)\",\"metadata\":{\"regionType\":\"Logical\",\"regionCategory\":\"Other\",\"geographyGroup\":\"US\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/southcentralusstage\",\"name\":\"southcentralusstage\",\"displayName\":\"South + Central US (Stage)\",\"regionalDisplayName\":\"(US) South Central US (Stage)\",\"metadata\":{\"regionType\":\"Logical\",\"regionCategory\":\"Other\",\"geographyGroup\":\"US\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/westusstage\",\"name\":\"westusstage\",\"displayName\":\"West + US (Stage)\",\"regionalDisplayName\":\"(US) West US (Stage)\",\"metadata\":{\"regionType\":\"Logical\",\"regionCategory\":\"Other\",\"geographyGroup\":\"US\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/westus2stage\",\"name\":\"westus2stage\",\"displayName\":\"West + US 2 (Stage)\",\"regionalDisplayName\":\"(US) West US 2 (Stage)\",\"metadata\":{\"regionType\":\"Logical\",\"regionCategory\":\"Other\",\"geographyGroup\":\"US\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/asia\",\"name\":\"asia\",\"displayName\":\"Asia\",\"regionalDisplayName\":\"Asia\",\"metadata\":{\"regionType\":\"Logical\",\"regionCategory\":\"Other\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/asiapacific\",\"name\":\"asiapacific\",\"displayName\":\"Asia + Pacific\",\"regionalDisplayName\":\"Asia Pacific\",\"metadata\":{\"regionType\":\"Logical\",\"regionCategory\":\"Other\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/australia\",\"name\":\"australia\",\"displayName\":\"Australia\",\"regionalDisplayName\":\"Australia\",\"metadata\":{\"regionType\":\"Logical\",\"regionCategory\":\"Other\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/brazil\",\"name\":\"brazil\",\"displayName\":\"Brazil\",\"regionalDisplayName\":\"Brazil\",\"metadata\":{\"regionType\":\"Logical\",\"regionCategory\":\"Other\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/canada\",\"name\":\"canada\",\"displayName\":\"Canada\",\"regionalDisplayName\":\"Canada\",\"metadata\":{\"regionType\":\"Logical\",\"regionCategory\":\"Other\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/europe\",\"name\":\"europe\",\"displayName\":\"Europe\",\"regionalDisplayName\":\"Europe\",\"metadata\":{\"regionType\":\"Logical\",\"regionCategory\":\"Other\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/france\",\"name\":\"france\",\"displayName\":\"France\",\"regionalDisplayName\":\"France\",\"metadata\":{\"regionType\":\"Logical\",\"regionCategory\":\"Other\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/germany\",\"name\":\"germany\",\"displayName\":\"Germany\",\"regionalDisplayName\":\"Germany\",\"metadata\":{\"regionType\":\"Logical\",\"regionCategory\":\"Other\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/global\",\"name\":\"global\",\"displayName\":\"Global\",\"regionalDisplayName\":\"Global\",\"metadata\":{\"regionType\":\"Logical\",\"regionCategory\":\"Other\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/india\",\"name\":\"india\",\"displayName\":\"India\",\"regionalDisplayName\":\"India\",\"metadata\":{\"regionType\":\"Logical\",\"regionCategory\":\"Other\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/japan\",\"name\":\"japan\",\"displayName\":\"Japan\",\"regionalDisplayName\":\"Japan\",\"metadata\":{\"regionType\":\"Logical\",\"regionCategory\":\"Other\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/korea\",\"name\":\"korea\",\"displayName\":\"Korea\",\"regionalDisplayName\":\"Korea\",\"metadata\":{\"regionType\":\"Logical\",\"regionCategory\":\"Other\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/norway\",\"name\":\"norway\",\"displayName\":\"Norway\",\"regionalDisplayName\":\"Norway\",\"metadata\":{\"regionType\":\"Logical\",\"regionCategory\":\"Other\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/singapore\",\"name\":\"singapore\",\"displayName\":\"Singapore\",\"regionalDisplayName\":\"Singapore\",\"metadata\":{\"regionType\":\"Logical\",\"regionCategory\":\"Other\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/southafrica\",\"name\":\"southafrica\",\"displayName\":\"South + Africa\",\"regionalDisplayName\":\"South Africa\",\"metadata\":{\"regionType\":\"Logical\",\"regionCategory\":\"Other\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/switzerland\",\"name\":\"switzerland\",\"displayName\":\"Switzerland\",\"regionalDisplayName\":\"Switzerland\",\"metadata\":{\"regionType\":\"Logical\",\"regionCategory\":\"Other\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/uae\",\"name\":\"uae\",\"displayName\":\"United + Arab Emirates\",\"regionalDisplayName\":\"United Arab Emirates\",\"metadata\":{\"regionType\":\"Logical\",\"regionCategory\":\"Other\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/uk\",\"name\":\"uk\",\"displayName\":\"United + Kingdom\",\"regionalDisplayName\":\"United Kingdom\",\"metadata\":{\"regionType\":\"Logical\",\"regionCategory\":\"Other\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/unitedstates\",\"name\":\"unitedstates\",\"displayName\":\"United + States\",\"regionalDisplayName\":\"United States\",\"metadata\":{\"regionType\":\"Logical\",\"regionCategory\":\"Other\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/unitedstateseuap\",\"name\":\"unitedstateseuap\",\"displayName\":\"United + States EUAP\",\"regionalDisplayName\":\"United States EUAP\",\"metadata\":{\"regionType\":\"Logical\",\"regionCategory\":\"Other\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastasiastage\",\"name\":\"eastasiastage\",\"displayName\":\"East + Asia (Stage)\",\"regionalDisplayName\":\"(Asia Pacific) East Asia (Stage)\",\"metadata\":{\"regionType\":\"Logical\",\"regionCategory\":\"Other\",\"geographyGroup\":\"Asia + Pacific\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/southeastasiastage\",\"name\":\"southeastasiastage\",\"displayName\":\"Southeast + Asia (Stage)\",\"regionalDisplayName\":\"(Asia Pacific) Southeast Asia (Stage)\",\"metadata\":{\"regionType\":\"Logical\",\"regionCategory\":\"Other\",\"geographyGroup\":\"Asia + Pacific\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/northcentralus\",\"name\":\"northcentralus\",\"displayName\":\"North + Central US\",\"regionalDisplayName\":\"(US) North Central US\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Other\",\"geographyGroup\":\"US\",\"longitude\":\"-87.6278\",\"latitude\":\"41.8819\",\"physicalLocation\":\"Illinois\",\"pairedRegion\":[{\"name\":\"southcentralus\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/southcentralus\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/westus\",\"name\":\"westus\",\"displayName\":\"West + US\",\"regionalDisplayName\":\"(US) West US\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Other\",\"geographyGroup\":\"US\",\"longitude\":\"-122.417\",\"latitude\":\"37.783\",\"physicalLocation\":\"California\",\"pairedRegion\":[{\"name\":\"eastus\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/jioindiawest\",\"name\":\"jioindiawest\",\"displayName\":\"Jio + India West\",\"regionalDisplayName\":\"(Asia Pacific) Jio India West\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Other\",\"geographyGroup\":\"Asia + Pacific\",\"longitude\":\"70.05773\",\"latitude\":\"22.470701\",\"physicalLocation\":\"Jamnagar\",\"pairedRegion\":[{\"name\":\"jioindiacentral\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/jioindiacentral\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/uaenorth\",\"name\":\"uaenorth\",\"displayName\":\"UAE + North\",\"regionalDisplayName\":\"(Middle East) UAE North\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Other\",\"geographyGroup\":\"Middle + East\",\"longitude\":\"55.316666\",\"latitude\":\"25.266666\",\"physicalLocation\":\"Dubai\",\"pairedRegion\":[{\"name\":\"uaecentral\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/uaecentral\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/centraluseuap\",\"name\":\"centraluseuap\",\"displayName\":\"Central + US EUAP\",\"regionalDisplayName\":\"(US) Central US EUAP\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Other\",\"geographyGroup\":\"US\",\"longitude\":\"-93.6208\",\"latitude\":\"41.5908\",\"pairedRegion\":[{\"name\":\"eastus2euap\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus2euap\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/westcentralus\",\"name\":\"westcentralus\",\"displayName\":\"West + Central US\",\"regionalDisplayName\":\"(US) West Central US\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Other\",\"geographyGroup\":\"US\",\"longitude\":\"-110.234\",\"latitude\":\"40.890\",\"physicalLocation\":\"Wyoming\",\"pairedRegion\":[{\"name\":\"westus2\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/westus2\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/southafricawest\",\"name\":\"southafricawest\",\"displayName\":\"South + Africa West\",\"regionalDisplayName\":\"(Africa) South Africa West\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Other\",\"geographyGroup\":\"Africa\",\"longitude\":\"18.843266\",\"latitude\":\"-34.075691\",\"physicalLocation\":\"Cape + Town\",\"pairedRegion\":[{\"name\":\"southafricanorth\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/southafricanorth\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/australiacentral\",\"name\":\"australiacentral\",\"displayName\":\"Australia + Central\",\"regionalDisplayName\":\"(Asia Pacific) Australia Central\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Other\",\"geographyGroup\":\"Asia + Pacific\",\"longitude\":\"149.1244\",\"latitude\":\"-35.3075\",\"physicalLocation\":\"Canberra\",\"pairedRegion\":[{\"name\":\"australiacentral\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/australiacentral\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/australiacentral2\",\"name\":\"australiacentral2\",\"displayName\":\"Australia + Central 2\",\"regionalDisplayName\":\"(Asia Pacific) Australia Central 2\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Other\",\"geographyGroup\":\"Asia + Pacific\",\"longitude\":\"149.1244\",\"latitude\":\"-35.3075\",\"physicalLocation\":\"Canberra\",\"pairedRegion\":[{\"name\":\"australiacentral2\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/australiacentral2\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/australiasoutheast\",\"name\":\"australiasoutheast\",\"displayName\":\"Australia + Southeast\",\"regionalDisplayName\":\"(Asia Pacific) Australia Southeast\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Other\",\"geographyGroup\":\"Asia + Pacific\",\"longitude\":\"144.9631\",\"latitude\":\"-37.8136\",\"physicalLocation\":\"Victoria\",\"pairedRegion\":[{\"name\":\"australiaeast\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/australiaeast\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/japanwest\",\"name\":\"japanwest\",\"displayName\":\"Japan + West\",\"regionalDisplayName\":\"(Asia Pacific) Japan West\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Other\",\"geographyGroup\":\"Asia + Pacific\",\"longitude\":\"135.5022\",\"latitude\":\"34.6939\",\"physicalLocation\":\"Osaka\",\"pairedRegion\":[{\"name\":\"japaneast\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/japaneast\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/jioindiacentral\",\"name\":\"jioindiacentral\",\"displayName\":\"Jio + India Central\",\"regionalDisplayName\":\"(Asia Pacific) Jio India Central\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Other\",\"geographyGroup\":\"Asia + Pacific\",\"longitude\":\"79.08886\",\"latitude\":\"21.146633\",\"physicalLocation\":\"Nagpur\",\"pairedRegion\":[{\"name\":\"jioindiawest\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/jioindiawest\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/koreasouth\",\"name\":\"koreasouth\",\"displayName\":\"Korea + South\",\"regionalDisplayName\":\"(Asia Pacific) Korea South\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Other\",\"geographyGroup\":\"Asia + Pacific\",\"longitude\":\"129.0756\",\"latitude\":\"35.1796\",\"physicalLocation\":\"Busan\",\"pairedRegion\":[{\"name\":\"koreacentral\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/koreacentral\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/southindia\",\"name\":\"southindia\",\"displayName\":\"South + India\",\"regionalDisplayName\":\"(Asia Pacific) South India\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Other\",\"geographyGroup\":\"Asia + Pacific\",\"longitude\":\"80.1636\",\"latitude\":\"12.9822\",\"physicalLocation\":\"Chennai\",\"pairedRegion\":[{\"name\":\"centralindia\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/centralindia\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/westindia\",\"name\":\"westindia\",\"displayName\":\"West + India\",\"regionalDisplayName\":\"(Asia Pacific) West India\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Other\",\"geographyGroup\":\"Asia + Pacific\",\"longitude\":\"72.868\",\"latitude\":\"19.088\",\"physicalLocation\":\"Mumbai\",\"pairedRegion\":[{\"name\":\"southindia\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/southindia\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/canadaeast\",\"name\":\"canadaeast\",\"displayName\":\"Canada + East\",\"regionalDisplayName\":\"(Canada) Canada East\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Other\",\"geographyGroup\":\"Canada\",\"longitude\":\"-71.217\",\"latitude\":\"46.817\",\"physicalLocation\":\"Quebec\",\"pairedRegion\":[{\"name\":\"canadacentral\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/canadacentral\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/francesouth\",\"name\":\"francesouth\",\"displayName\":\"France + South\",\"regionalDisplayName\":\"(Europe) France South\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Other\",\"geographyGroup\":\"Europe\",\"longitude\":\"2.1972\",\"latitude\":\"43.8345\",\"physicalLocation\":\"Marseille\",\"pairedRegion\":[{\"name\":\"francecentral\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/francecentral\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/germanynorth\",\"name\":\"germanynorth\",\"displayName\":\"Germany + North\",\"regionalDisplayName\":\"(Europe) Germany North\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Other\",\"geographyGroup\":\"Europe\",\"longitude\":\"8.806422\",\"latitude\":\"53.073635\",\"physicalLocation\":\"Berlin\",\"pairedRegion\":[{\"name\":\"germanywestcentral\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/germanywestcentral\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/norwaywest\",\"name\":\"norwaywest\",\"displayName\":\"Norway + West\",\"regionalDisplayName\":\"(Europe) Norway West\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Other\",\"geographyGroup\":\"Europe\",\"longitude\":\"5.733107\",\"latitude\":\"58.969975\",\"physicalLocation\":\"Norway\",\"pairedRegion\":[{\"name\":\"norwayeast\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/norwayeast\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/swedensouth\",\"name\":\"swedensouth\",\"displayName\":\"Sweden + South\",\"regionalDisplayName\":\"(Europe) Sweden South\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Other\",\"geographyGroup\":\"Europe\",\"longitude\":\"13.0007\",\"latitude\":\"55.6059\",\"physicalLocation\":\"Malmo\",\"pairedRegion\":[{\"name\":\"swedencentral\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/swedencentral\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/switzerlandwest\",\"name\":\"switzerlandwest\",\"displayName\":\"Switzerland + West\",\"regionalDisplayName\":\"(Europe) Switzerland West\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Other\",\"geographyGroup\":\"Europe\",\"longitude\":\"6.143158\",\"latitude\":\"46.204391\",\"physicalLocation\":\"Geneva\",\"pairedRegion\":[{\"name\":\"switzerlandnorth\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/switzerlandnorth\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/ukwest\",\"name\":\"ukwest\",\"displayName\":\"UK + West\",\"regionalDisplayName\":\"(Europe) UK West\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Other\",\"geographyGroup\":\"Europe\",\"longitude\":\"-3.084\",\"latitude\":\"53.427\",\"physicalLocation\":\"Cardiff\",\"pairedRegion\":[{\"name\":\"uksouth\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/uksouth\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/uaecentral\",\"name\":\"uaecentral\",\"displayName\":\"UAE + Central\",\"regionalDisplayName\":\"(Middle East) UAE Central\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Other\",\"geographyGroup\":\"Middle + East\",\"longitude\":\"54.366669\",\"latitude\":\"24.466667\",\"physicalLocation\":\"Abu + Dhabi\",\"pairedRegion\":[{\"name\":\"uaenorth\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/uaenorth\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/brazilsoutheast\",\"name\":\"brazilsoutheast\",\"displayName\":\"Brazil + Southeast\",\"regionalDisplayName\":\"(South America) Brazil Southeast\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Other\",\"geographyGroup\":\"South + America\",\"longitude\":\"-43.2075\",\"latitude\":\"-22.90278\",\"physicalLocation\":\"Rio\",\"pairedRegion\":[{\"name\":\"brazilsouth\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/brazilsouth\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/polandcentral\",\"name\":\"polandcentral\",\"displayName\":\"Poland + Central\",\"regionalDisplayName\":\"(Europe) Poland Central\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Other\",\"geographyGroup\":\"Europe\",\"longitude\":\"14.6512702\",\"latitude\":\"51.8685079\",\"physicalLocation\":\"Warsaw\",\"pairedRegion\":[{\"name\":\"swedencentral\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/swedencentral\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/qatarcentral\",\"name\":\"qatarcentral\",\"displayName\":\"Qatar + Central\",\"regionalDisplayName\":\"(Middle East) Qatar Central\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Other\",\"geographyGroup\":\"Middle + East\",\"longitude\":\"51.439327\",\"latitude\":\"25.551462\",\"physicalLocation\":\"Doha\",\"pairedRegion\":[{\"name\":\"westeurope\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/westeurope\"}]}}]}" + headers: + cache-control: + - no-cache + content-length: + - '30397' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 20 Jul 2022 01:52:02 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"location": "eastus"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - stack-hci cluster create + Connection: + - keep-alive + Content-Length: + - '22' + Content-Type: + - application/json + ParameterSetName: + - --location --name --resource-group + User-Agent: + - 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/clitest000001/providers/Microsoft.AzureStackHCI/clusters/myCluster?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.AzureStackHCI/clusters/myCluster","name":"myCluster","type":"microsoft.azurestackhci/clusters","location":"eastus","systemData":{"createdBy":"v-jingszhang@microsoft.com","createdByType":"User","createdAt":"2022-07-20T01:52:09.6667871Z","lastModifiedBy":"v-jingszhang@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-07-20T01:52:09.6667871Z"},"properties":{"provisioningState":"Succeeded","status":"NotYetRegistered","cloudId":"1c4d3332-456d-4b9a-9eeb-bcb90fd8e41b","desiredProperties":{"windowsServerSubscription":"Disabled","diagnosticLevel":"Basic"},"trialDaysRemaining":60,"billingModel":"Trial","serviceEndpoint":"https://dp.stackhci.azure.com/eastus/"}}' + headers: + cache-control: + - no-cache + content-length: + - '783' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 20 Jul 2022 01:52:11 GMT + etag: + - '"2c00634f-0000-0100-0000-62d75fca0000"' + expires: + - '-1' + mise-correlation-id: + - 7bfa1f20-04b0-4d10-b35e-e9b8b44b7025 + 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: + - '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 show + Connection: + - keep-alive + ParameterSetName: + - --name --resource-group + 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/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.AzureStackHCI/clusters/myCluster?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.AzureStackHCI/clusters/myCluster","name":"myCluster","type":"microsoft.azurestackhci/clusters","location":"eastus","properties":{"provisioningState":"Succeeded","status":"NotYetRegistered","cloudId":"1c4d3332-456d-4b9a-9eeb-bcb90fd8e41b","desiredProperties":{"windowsServerSubscription":"Disabled","diagnosticLevel":"Basic"},"trialDaysRemaining":60,"billingModel":"Trial","serviceEndpoint":"https://dp.stackhci.azure.com/eastus/"}}' + headers: + cache-control: + - no-cache + content-length: + - '539' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 20 Jul 2022 01:52:13 GMT + etag: + - '"2c00634f-0000-0100-0000-62d75fca0000"' + expires: + - '-1' + mise-correlation-id: + - 87715708-0b63-4aec-b515-a01a2f93ac22 + 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-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - stack-hci cluster list + Connection: + - keep-alive + ParameterSetName: + - --resource-group + 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/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.AzureStackHCI/clusters?api-version=2022-05-01 + response: + body: + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.AzureStackHCI/clusters/myCluster","name":"myCluster","type":"microsoft.azurestackhci/clusters","location":"eastus","properties":{"provisioningState":"Succeeded","status":"NotYetRegistered","cloudId":"1c4d3332-456d-4b9a-9eeb-bcb90fd8e41b","desiredProperties":{"windowsServerSubscription":"Disabled","diagnosticLevel":"Basic"},"trialDaysRemaining":60,"billingModel":"Trial","serviceEndpoint":"https://dp.stackhci.azure.com/eastus/"}}]}' + headers: + cache-control: + - no-cache + content-length: + - '551' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 20 Jul 2022 01:52:14 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-original-request-ids: + - b06ea900-6a89-4e53-9531-877e27719046 + - 38ebb04e-d242-4550-bd8f-362661a12b71 + - c3be7901-fb4b-40b6-a092-7c4a89395204 + - 0373973d-34a3-41ff-9dc8-f69d16e027ce + - af684f5b-7b4f-47be-8a83-1a57ebb78d30 + - b2b47965-9854-4f7d-9899-4ac7fda36bfa + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - stack-hci cluster list + Connection: + - keep-alive + ParameterSetName: + - -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/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.AzureStackHCI/clusters?api-version=2022-05-01 + response: + body: + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitestbycd4lzz3e4coc777vzetrzn33jblunmjk5deejsymcetrf2dvhabkdk3h75af56vnk6/providers/Microsoft.AzureStackHCI/clusters/myCluster","name":"myCluster","type":"microsoft.azurestackhci/clusters","location":"eastus","tags":{"tag1":"value1","tag2":"value2"},"properties":{"provisioningState":"Succeeded","status":"NotYetRegistered","cloudId":"3692b051-b6f6-4ef5-946a-cf46bd9a8516","aadClientId":"017cc058-9a60-4de0-aabd-3f1f9c0fd2b7","aadTenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","aadServicePrincipalObjectId":"bd8c8844-90d9-4486-af7c-79654d426b0e","aadApplicationObjectId":"35a1e02f-df57-4d0a-8ebf-f09f85fcdf7e","desiredProperties":{"windowsServerSubscription":"Enabled","diagnosticLevel":"Basic"},"trialDaysRemaining":60,"billingModel":"Trial","serviceEndpoint":"https://dp.stackhci.azure.com/eastus/"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitestj2hqo3exocwv5dasn7k5erq5zqhrhl2lz4eqgfi6yfmetpul54yebibkejxquul5oh4a/providers/Microsoft.AzureStackHCI/clusters/myCluster","name":"myCluster","type":"microsoft.azurestackhci/clusters","location":"eastus","tags":{"tag1":"value1","tag2":"value2"},"properties":{"provisioningState":"Succeeded","status":"NotYetRegistered","cloudId":"50643ddf-a5cd-41d7-a45c-d288c63ecea6","aadClientId":"5d304473-c489-4228-8544-576e72118831","aadTenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","aadServicePrincipalObjectId":"502436e0-0691-4711-bf27-7512366b5a25","aadApplicationObjectId":"c550cafd-2311-4a2f-9582-c33f58dba4d4","desiredProperties":{"windowsServerSubscription":"Enabled","diagnosticLevel":"Basic"},"trialDaysRemaining":60,"billingModel":"Trial","serviceEndpoint":"https://dp.stackhci.azure.com/eastus/"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.AzureStackHCI/clusters/myCluster","name":"myCluster","type":"microsoft.azurestackhci/clusters","location":"eastus","properties":{"provisioningState":"Succeeded","status":"NotYetRegistered","cloudId":"1c4d3332-456d-4b9a-9eeb-bcb90fd8e41b","desiredProperties":{"windowsServerSubscription":"Disabled","diagnosticLevel":"Basic"},"trialDaysRemaining":60,"billingModel":"Trial","serviceEndpoint":"https://dp.stackhci.azure.com/eastus/"}}]}' + headers: + cache-control: + - no-cache + content-length: + - '2313' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 20 Jul 2022 01:52:16 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-original-request-ids: + - 28e7f752-c959-48f7-913c-5f778f9f4e92 + - 5fe95e5e-3e4a-4226-bfb9-a151add99544 + - 7ad9fa61-592b-42fe-a40c-1be9f7ebb409 + - 16d0ab13-1df3-4f66-adf4-23b5496b8623 + - 5af0635f-fe81-4408-9fc3-262acf827024 + - db8f0b31-d21a-404b-86b5-64cb7d416e3b + status: + code: 200 + message: OK +- request: + body: '{"tags": {"tag1": "value1", "tag2": "value2"}, "properties": {"desiredProperties": + {"windowsServerSubscription": "Enabled", "diagnosticLevel": "Basic"}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - stack-hci cluster update + Connection: + - keep-alive + Content-Length: + - '153' + Content-Type: + - application/json + ParameterSetName: + - --desired-properties --tags --name --resource-group + User-Agent: + - 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/clitest000001/providers/Microsoft.AzureStackHCI/clusters/myCluster?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.AzureStackHCI/clusters/myCluster","name":"myCluster","type":"microsoft.azurestackhci/clusters","location":"eastus","tags":{"tag1":"value1","tag2":"value2"},"systemData":{"createdBy":"v-jingszhang@microsoft.com","createdByType":"User","createdAt":"2022-07-20T01:52:09.6667871Z","lastModifiedBy":"v-jingszhang@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-07-20T01:52:19.8458448Z"},"properties":{"status":"NotYetRegistered","cloudId":"1c4d3332-456d-4b9a-9eeb-bcb90fd8e41b","desiredProperties":{"windowsServerSubscription":"Enabled","diagnosticLevel":"Basic"},"trialDaysRemaining":60,"billingModel":"Trial","provisioningState":"Succeeded","serviceEndpoint":"https://dp.stackhci.azure.com/eastus/"}}' + headers: + cache-control: + - no-cache + content-length: + - '823' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 20 Jul 2022 01:52:21 GMT + etag: + - '"2c002450-0000-0100-0000-62d75fd40000"' + expires: + - '-1' + mise-correlation-id: + - 6f6c50ce-2ae4-4044-8618-6eea972f1526 + 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: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - stack-hci cluster create-identity + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - --name --resource-group + 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/clitest000001/providers/Microsoft.AzureStackHCI/clusters/myCluster/createClusterIdentity?api-version=2022-05-01 + response: + body: + string: 'null' + headers: + azure-asyncoperation: + - https://management.azure.com/providers/Microsoft.AzureStackHCI/locations/EASTUS/operationStatuses/9db4fb55-caf0-4cc9-a3eb-56b28d83cf8d*90283A4681E7F4963778567E9AC5316185DA9052F98E0432D2B27CBD3521C580?api-version=2022-05-01 + cache-control: + - no-cache + content-length: + - '4' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 20 Jul 2022 01:52:22 GMT + expires: + - '-1' + location: + - https://management.azure.com/providers/Microsoft.AzureStackHCI/locations/EASTUS/operationStatuses/9db4fb55-caf0-4cc9-a3eb-56b28d83cf8d*90283A4681E7F4963778567E9AC5316185DA9052F98E0432D2B27CBD3521C580?api-version=2022-05-01 + mise-correlation-id: + - ad5761c9-92f7-4832-987c-34a23ee04bc7 + 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: + - --name --resource-group + 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/9db4fb55-caf0-4cc9-a3eb-56b28d83cf8d*90283A4681E7F4963778567E9AC5316185DA9052F98E0432D2B27CBD3521C580?api-version=2022-05-01 + response: + body: + string: '{"id":"/providers/Microsoft.AzureStackHCI/locations/EASTUS/operationStatuses/9db4fb55-caf0-4cc9-a3eb-56b28d83cf8d*90283A4681E7F4963778567E9AC5316185DA9052F98E0432D2B27CBD3521C580","name":"9db4fb55-caf0-4cc9-a3eb-56b28d83cf8d*90283A4681E7F4963778567E9AC5316185DA9052F98E0432D2B27CBD3521C580","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.AzureStackHCI/clusters/myCluster","status":"Succeeded","startTime":"2022-07-20T01:52:22.8084604Z","endTime":"2022-07-20T01:52:27.3105467Z","properties":null}' + headers: + cache-control: + - no-cache + content-length: + - '563' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 20 Jul 2022 01:52:52 GMT + etag: + - '"4a002019-0000-0100-0000-62d75fdb0000"' + 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 +- request: + body: '{}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - stack-hci arc-setting create + Connection: + - keep-alive + Content-Length: + - '2' + Content-Type: + - application/json + ParameterSetName: + - --name --cluster-name --resource-group + User-Agent: + - 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/clitest000001/providers/Microsoft.AzureStackHCI/clusters/myCluster/arcSettings/default?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.AzureStackHCI/clusters/myCluster/arcSettings/default","name":"default","type":"microsoft.azurestackhci/clusters/arcsettings","systemData":{"createdBy":"v-jingszhang@microsoft.com","createdByType":"User","createdAt":"2022-07-20T01:52:54.2993828Z","lastModifiedBy":"v-jingszhang@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-07-20T01:52:54.2993828Z"},"properties":{"connectivityProperties":{"enabled":false},"provisioningState":"Succeeded","arcInstanceResourceGroup":"myCluster-1c4d3332-456d-4b9a-9eeb-bcb90fd8e41b-Arc-Infra-RG","aggregateState":"NotSpecified"}}' + headers: + cache-control: + - no-cache + content-length: + - '688' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 20 Jul 2022 01:52:55 GMT + etag: + - '"06000515-0000-0100-0000-62d75ff70000"' + expires: + - '-1' + mise-correlation-id: + - a166c427-f637-4dbd-87fc-5d6dd3dc1a84 + 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: + - '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 show + Connection: + - keep-alive + ParameterSetName: + - --name --cluster-name --resource-group + 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/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.AzureStackHCI/clusters/myCluster/arcSettings/default?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.AzureStackHCI/clusters/myCluster/arcSettings/default","name":"default","type":"microsoft.azurestackhci/clusters/arcsettings","properties":{"connectivityProperties":{"enabled":false},"provisioningState":"Succeeded","arcInstanceResourceGroup":"myCluster-1c4d3332-456d-4b9a-9eeb-bcb90fd8e41b-Arc-Infra-RG","aggregateState":"NotSpecified","perNodeDetails":[]}}' + headers: + cache-control: + - no-cache + content-length: + - '464' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 20 Jul 2022 01:52:57 GMT + etag: + - '"06000515-0000-0100-0000-62d75ff70000"' + expires: + - '-1' + mise-correlation-id: + - 9d3f3888-47b1-4e9c-ac74-7d3377cf1010 + 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-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 list + Connection: + - keep-alive + ParameterSetName: + - --cluster-name --resource-group + 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/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.AzureStackHCI/clusters/myCluster/arcSettings?api-version=2022-05-01 + response: + body: + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.AzureStackHCI/clusters/myCluster/arcSettings/default","name":"default","type":"microsoft.azurestackhci/clusters/arcsettings","properties":{"connectivityProperties":{"enabled":false},"provisioningState":"Succeeded","arcInstanceResourceGroup":"myCluster-1c4d3332-456d-4b9a-9eeb-bcb90fd8e41b-Arc-Infra-RG","aggregateState":"NotSpecified","perNodeDetails":[]}}]}' + headers: + cache-control: + - no-cache + content-length: + - '476' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 20 Jul 2022 01:52:57 GMT + expires: + - '-1' + mise-correlation-id: + - ed424a4b-97a3-403a-b262-9316011a798f + 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-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: '{"properties": {"connectivityProperties": {"enabled": true}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - stack-hci arc-setting update + Connection: + - keep-alive + Content-Length: + - '61' + Content-Type: + - application/json + ParameterSetName: + - --connectivity-properties --name --cluster-name --resource-group + User-Agent: + - 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/clitest000001/providers/Microsoft.AzureStackHCI/clusters/myCluster/arcSettings/default?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.AzureStackHCI/clusters/myCluster/arcSettings/default","name":"default","type":"microsoft.azurestackhci/clusters/arcsettings","systemData":{"createdBy":"v-jingszhang@microsoft.com","createdByType":"User","createdAt":"2022-07-20T01:52:54.2993828Z","lastModifiedBy":"v-jingszhang@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-07-20T01:52:58.8262237Z"},"properties":{"connectivityProperties":{"enabled":true},"provisioningState":"Succeeded","arcInstanceResourceGroup":"myCluster-1c4d3332-456d-4b9a-9eeb-bcb90fd8e41b-Arc-Infra-RG","aggregateState":"NotSpecified"}}' + headers: + cache-control: + - no-cache + content-length: + - '687' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 20 Jul 2022 01:52:59 GMT + etag: + - '"06000615-0000-0100-0000-62d75ffb0000"' + expires: + - '-1' + mise-correlation-id: + - 095f5f76-5508-4536-a71b-c2fe60ee569a + 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: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - stack-hci arc-setting create-identity + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - --name --cluster-name --resource-group + 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/clitest000001/providers/Microsoft.AzureStackHCI/clusters/myCluster/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/dc6b98f2-f591-42c5-b43e-9e655b1003d1*9EFE1DB79834CC1A33471FDD71C825A68CD98E843DBFA4137F8FFBED5EA879AF?api-version=2022-05-01 + cache-control: + - no-cache + content-length: + - '4' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 20 Jul 2022 01:53:00 GMT + expires: + - '-1' + location: + - https://management.azure.com/providers/Microsoft.AzureStackHCI/locations/EASTUS/operationStatuses/dc6b98f2-f591-42c5-b43e-9e655b1003d1*9EFE1DB79834CC1A33471FDD71C825A68CD98E843DBFA4137F8FFBED5EA879AF?api-version=2022-05-01 + mise-correlation-id: + - 70b14ce7-4e80-43de-812e-672ca5b04145 + 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: + - --name --cluster-name --resource-group + 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/dc6b98f2-f591-42c5-b43e-9e655b1003d1*9EFE1DB79834CC1A33471FDD71C825A68CD98E843DBFA4137F8FFBED5EA879AF?api-version=2022-05-01 + response: + body: + string: '{"id":"/providers/Microsoft.AzureStackHCI/locations/EASTUS/operationStatuses/dc6b98f2-f591-42c5-b43e-9e655b1003d1*9EFE1DB79834CC1A33471FDD71C825A68CD98E843DBFA4137F8FFBED5EA879AF","name":"dc6b98f2-f591-42c5-b43e-9e655b1003d1*9EFE1DB79834CC1A33471FDD71C825A68CD98E843DBFA4137F8FFBED5EA879AF","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.AzureStackHCI/clusters/myCluster/arcSettings/default","status":"Succeeded","startTime":"2022-07-20T01:53:00.7389751Z","endTime":"2022-07-20T01:53:02.6240872Z","properties":null}' + headers: + cache-control: + - no-cache + content-length: + - '583' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 20 Jul 2022 01:53:31 GMT + etag: + - '"4a004b19-0000-0100-0000-62d75ffe0000"' + 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 +- 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: + - --name --cluster-name --resource-group + 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/clitest000001/providers/Microsoft.AzureStackHCI/clusters/myCluster/arcSettings/default/generatePassword?api-version=2022-05-01 + response: + body: + string: '{"secretText":"qrT8Q~gbhxOpZUZjs2ImFFfnpOQPIz~_3RQFHbpj","startDateTime":"2022-07-20T01:53:33.3170953+00:00","endDateTime":"2024-07-20T01:53:33.3170954+00:00","keyId":"41bee461-c93b-4d05-8a42-58863994265c"}' + headers: + cache-control: + - no-cache + content-length: + - '206' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 20 Jul 2022 01:53:32 GMT + expires: + - '-1' + mise-correlation-id: + - e66090b7-5b0b-498f-b7a7-5d7479266f24 + 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: '{"properties": {"extensionParameters": {"publisher": "Microsoft.Compute", + "type": "MicrosoftMonitoringAgent", "typeHandlerVersion": "1.10", "settings": + {"workspaceId": "xx"}, "protectedSettings": {"workspaceKey": "xx"}}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - stack-hci extension create + Connection: + - keep-alive + Content-Length: + - '221' + Content-Type: + - application/json + ParameterSetName: + - --arc-setting-name --cluster-name --type --protected-settings --publisher + --settings --type-handler-version --name --resource-group + User-Agent: + - 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/clitest000001/providers/Microsoft.AzureStackHCI/clusters/myCluster/arcSettings/default/extensions/MicrosoftMonitoringAgent?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.AzureStackHCI/clusters/myCluster/arcSettings/default/extensions/MicrosoftMonitoringAgent","name":"MicrosoftMonitoringAgent","type":"microsoft.azurestackhci/clusters/arcsettings/extensions","systemData":{"createdBy":"v-jingszhang@microsoft.com","createdByType":"User","createdAt":"2022-07-20T01:53:34.2610758Z","lastModifiedBy":"v-jingszhang@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-07-20T01:53:34.2610758Z"},"properties":{"provisioningState":"Succeeded","aggregateState":"NotSpecified","perNodeExtensionDetails":[],"extensionParameters":{"type":"MicrosoftMonitoringAgent","publisher":"Microsoft.Compute","autoUpgradeMinorVersion":false,"settings":{"workspaceId":"xx"}}}}' + headers: + cache-control: + - no-cache + content-length: + - '803' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 20 Jul 2022 01:53:35 GMT + etag: + - '"0e002215-0000-0100-0000-62d7601e0000"' + expires: + - '-1' + mise-correlation-id: + - 0dd37aeb-bba2-4245-9f47-0ebb37812cb8 + 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: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - stack-hci extension show + Connection: + - keep-alive + ParameterSetName: + - --arc-setting-name --cluster-name --name --resource-group + 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/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.AzureStackHCI/clusters/myCluster/arcSettings/default/extensions/MicrosoftMonitoringAgent?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.AzureStackHCI/clusters/myCluster/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: + - '559' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 20 Jul 2022 01:53:36 GMT + etag: + - '"0e002215-0000-0100-0000-62d7601e0000"' + expires: + - '-1' + mise-correlation-id: + - 54726263-2629-4d89-8afd-42be50ab9d98 + 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-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - stack-hci extension list + Connection: + - keep-alive + ParameterSetName: + - --arc-setting-name --cluster-name --resource-group + 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/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.AzureStackHCI/clusters/myCluster/arcSettings/default/extensions?api-version=2022-05-01 + response: + body: + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.AzureStackHCI/clusters/myCluster/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: + - '571' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 20 Jul 2022 01:53:37 GMT + expires: + - '-1' + mise-correlation-id: + - 31cf709e-6480-44ac-bde7-6256271dae01 + 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-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - stack-hci extension delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -y --arc-setting-name --cluster-name --name --resource-group + User-Agent: + - 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/clitest000001/providers/Microsoft.AzureStackHCI/clusters/myCluster/arcSettings/default/extensions/MicrosoftMonitoringAgent?api-version=2022-05-01 + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Wed, 20 Jul 2022 01:53:38 GMT + expires: + - '-1' + mise-correlation-id: + - 3d9f6ea5-2b86-4d2c-8103-861d4a88f5a5 + pragma: + - no-cache + request-context: + - appId= + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' + 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 delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -y --name --cluster-name --resource-group + User-Agent: + - 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/clitest000001/providers/Microsoft.AzureStackHCI/clusters/myCluster/arcSettings/default?api-version=2022-05-01 + response: + body: + string: 'null' + headers: + azure-asyncoperation: + - https://management.azure.com/providers/Microsoft.AzureStackHCI/locations/EASTUS/operationStatuses/625d3a74-b208-4620-8995-14653fe6a01a*9EFE1DB79834CC1A33471FDD71C825A68CD98E843DBFA4137F8FFBED5EA879AF?api-version=2022-05-01 + cache-control: + - no-cache + content-length: + - '4' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 20 Jul 2022 01:53:39 GMT + etag: + - '"06001215-0000-0100-0000-62d760240000"' + expires: + - '-1' + location: + - https://management.azure.com/providers/Microsoft.AzureStackHCI/locations/EASTUS/operationStatuses/625d3a74-b208-4620-8995-14653fe6a01a*9EFE1DB79834CC1A33471FDD71C825A68CD98E843DBFA4137F8FFBED5EA879AF?api-version=2022-05-01 + mise-correlation-id: + - 36e9e536-6ac8-465f-b05c-f7b2172454d2 + 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-deletes: + - '14999' + x-powered-by: + - ASP.NET + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - stack-hci arc-setting delete + Connection: + - keep-alive + ParameterSetName: + - -y --name --cluster-name --resource-group + 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/625d3a74-b208-4620-8995-14653fe6a01a*9EFE1DB79834CC1A33471FDD71C825A68CD98E843DBFA4137F8FFBED5EA879AF?api-version=2022-05-01 + response: + body: + string: '{"id":"/providers/Microsoft.AzureStackHCI/locations/EASTUS/operationStatuses/625d3a74-b208-4620-8995-14653fe6a01a*9EFE1DB79834CC1A33471FDD71C825A68CD98E843DBFA4137F8FFBED5EA879AF","name":"625d3a74-b208-4620-8995-14653fe6a01a*9EFE1DB79834CC1A33471FDD71C825A68CD98E843DBFA4137F8FFBED5EA879AF","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.AzureStackHCI/clusters/myCluster/arcSettings/default","status":"Succeeded","startTime":"2022-07-20T01:53:40.1196175Z","endTime":"2022-07-20T01:53:40.7062765Z","properties":null}' + headers: + cache-control: + - no-cache + content-length: + - '583' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 20 Jul 2022 01:54:09 GMT + etag: + - '"4a008519-0000-0100-0000-62d760240000"' + 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 +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - stack-hci cluster delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -y --name --resource-group + User-Agent: + - 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/clitest000001/providers/Microsoft.AzureStackHCI/clusters/myCluster?api-version=2022-05-01 + response: + body: + string: 'null' + headers: + azure-asyncoperation: + - https://management.azure.com/providers/Microsoft.AzureStackHCI/locations/EASTUS/operationStatuses/21cd4c51-6eb4-46e3-ad03-23cd63d4e50a*90283A4681E7F4963778567E9AC5316185DA9052F98E0432D2B27CBD3521C580?api-version=2022-05-01 + cache-control: + - no-cache + content-length: + - '4' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 20 Jul 2022 01:54:12 GMT + etag: + - '"2c00525a-0000-0100-0000-62d760440000"' + expires: + - '-1' + location: + - https://management.azure.com/providers/Microsoft.AzureStackHCI/locations/EASTUS/operationStatuses/21cd4c51-6eb4-46e3-ad03-23cd63d4e50a*90283A4681E7F4963778567E9AC5316185DA9052F98E0432D2B27CBD3521C580?api-version=2022-05-01 + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - stack-hci cluster delete + Connection: + - keep-alive + ParameterSetName: + - -y --name --resource-group + 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/21cd4c51-6eb4-46e3-ad03-23cd63d4e50a*90283A4681E7F4963778567E9AC5316185DA9052F98E0432D2B27CBD3521C580?api-version=2022-05-01 + response: + body: + string: '{"id":"/providers/Microsoft.AzureStackHCI/locations/EASTUS/operationStatuses/21cd4c51-6eb4-46e3-ad03-23cd63d4e50a*90283A4681E7F4963778567E9AC5316185DA9052F98E0432D2B27CBD3521C580","name":"21cd4c51-6eb4-46e3-ad03-23cd63d4e50a*90283A4681E7F4963778567E9AC5316185DA9052F98E0432D2B27CBD3521C580","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.AzureStackHCI/clusters/myCluster","status":"Deleting","startTime":"2022-07-20T01:54:12.3786663Z"}' + headers: + cache-control: + - no-cache + content-length: + - '503' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 20 Jul 2022 01:54:43 GMT + etag: + - '"4a00ac19-0000-0100-0000-62d760440000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - stack-hci cluster delete + Connection: + - keep-alive + ParameterSetName: + - -y --name --resource-group + 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/21cd4c51-6eb4-46e3-ad03-23cd63d4e50a*90283A4681E7F4963778567E9AC5316185DA9052F98E0432D2B27CBD3521C580?api-version=2022-05-01 + response: + body: + string: '{"id":"/providers/Microsoft.AzureStackHCI/locations/EASTUS/operationStatuses/21cd4c51-6eb4-46e3-ad03-23cd63d4e50a*90283A4681E7F4963778567E9AC5316185DA9052F98E0432D2B27CBD3521C580","name":"21cd4c51-6eb4-46e3-ad03-23cd63d4e50a*90283A4681E7F4963778567E9AC5316185DA9052F98E0432D2B27CBD3521C580","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.AzureStackHCI/clusters/myCluster","status":"Succeeded","startTime":"2022-07-20T01:54:12.3786663Z","properties":null}' + headers: + cache-control: + - no-cache + content-length: + - '522' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 20 Jul 2022 01:55:13 GMT + etag: + - '"8500a08c-0000-0500-0000-62d760670000"' + 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 +version: 1 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 deleted file mode 100644 index 11437255979..00000000000 --- a/src/stack-hci/azext_stack_hci/tests/latest/recordings/test_stack_hci_arc_setting_crud.yaml +++ /dev/null @@ -1,460 +0,0 @@ -interactions: -- 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?$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":[]}' - 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: - - 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: - - no-cache - request-id: - - 534efc32-37a4-458d-b90a-6f320f20a7c9 - 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: '{"availableToOtherTenants": false, "displayName": "cli-test-app", "identifierUris": - []}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - ad app create - Connection: - - keep-alive - Content-Length: - - '87' - Content-Type: - - application/json; charset=utf-8 - 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 - 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}' - headers: - access-control-allow-origin: - - '*' - cache-control: - - no-cache - content-length: - - '2146' - content-type: - - application/json; odata=minimalmetadata; streaming=true; charset=utf-8 - dataserviceversion: - - 3.0; - 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 - request-id: - - 10739001-d7b6-48ff-a062-6dea72128864 - 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: 201 - message: Created -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - stack-hci cluster create - Connection: - - keep-alive - 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) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_stack_hci_000001?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"}}' - headers: - cache-control: - - no-cache - content-length: - - '328' - content-type: - - application/json; charset=utf-8 - date: - - Wed, 23 Mar 2022 07:12:32 GMT - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: '{"location": "eastus", "properties": {"aadClientId": "19e87cb7-6317-4e39-a358-2de5b2b3d1ec", - "aadTenantId": "54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - stack-hci cluster create - Connection: - - keep-alive - Content-Length: - - '148' - Content-Type: - - application/json - 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) - 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 - 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"}}' - headers: - cache-control: - - no-cache - content-length: - - '851' - content-type: - - application/json; charset=utf-8 - date: - - Wed, 23 Mar 2022 07:12:40 GMT - etag: - - '"8700947d-0000-0100-0000-623ac8670000"' - expires: - - '-1' - 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: '{}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - stack-hci arc-setting create - Connection: - - keep-alive - Content-Length: - - '2' - Content-Type: - - application/json - 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) - 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 - 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"}}' - headers: - cache-control: - - no-cache - content-length: - - '665' - content-type: - - application/json; charset=utf-8 - date: - - Wed, 23 Mar 2022 07:12:43 GMT - etag: - - '"15011ced-0000-0100-0000-623ac86b0000"' - expires: - - '-1' - 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: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - stack-hci arc-setting list - Connection: - - keep-alive - 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) - 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 - 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":[]}}]}' - headers: - cache-control: - - no-cache - content-length: - - '459' - content-type: - - application/json; charset=utf-8 - date: - - Wed, 23 Mar 2022 07:12:45 GMT - expires: - - '-1' - 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-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 show - Connection: - - keep-alive - 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) - 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 - 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":[]}}' - headers: - cache-control: - - no-cache - content-length: - - '447' - content-type: - - application/json; charset=utf-8 - date: - - Wed, 23 Mar 2022 07:12:46 GMT - etag: - - '"15011ced-0000-0100-0000-623ac86b0000"' - expires: - - '-1' - 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-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 delete - Connection: - - keep-alive - Content-Length: - - '0' - 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) - 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 - response: - body: - string: '' - headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Wed, 23 Mar 2022 07:12:47 GMT - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-providerhub-traffic: - - 'True' - x-ms-ratelimit-remaining-subscription-deletes: - - '14999' - status: - code: 200 - message: OK -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 deleted file mode 100644 index 747eb60797e..00000000000 --- a/src/stack-hci/azext_stack_hci/tests/latest/recordings/test_stack_hci_cluster_crud.yaml +++ /dev/null @@ -1,649 +0,0 @@ -interactions: -- 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?$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":[]}' - 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: - - 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: - - no-cache - request-id: - - 3031db61-8e8a-42cd-bcf7-b9a8575c233d - 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: '{"availableToOtherTenants": false, "displayName": "cli-test-app", "identifierUris": - []}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - ad app create - Connection: - - keep-alive - Content-Length: - - '87' - Content-Type: - - application/json; charset=utf-8 - 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 - 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}' - headers: - access-control-allow-origin: - - '*' - cache-control: - - no-cache - content-length: - - '2146' - content-type: - - application/json; odata=minimalmetadata; streaming=true; charset=utf-8 - dataserviceversion: - - 3.0; - 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 - request-id: - - cdac58b3-e4e1-4dac-8984-817495807677 - 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: 201 - message: Created -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - stack-hci cluster create - Connection: - - keep-alive - 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) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_stack_hci_000001?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"}}' - headers: - cache-control: - - no-cache - content-length: - - '328' - content-type: - - application/json; charset=utf-8 - date: - - Wed, 23 Mar 2022 07:00:19 GMT - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: '{"tags": {"key0": "value0"}, "location": "eastus", "properties": {"aadClientId": - "bbc01c55-41e0-442e-9f8c-29a556c91a15", "aadTenantId": "54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - stack-hci cluster create - Connection: - - keep-alive - Content-Length: - - '176' - Content-Type: - - application/json - 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) - 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 - 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"}}' - headers: - cache-control: - - no-cache - content-length: - - '876' - content-type: - - application/json; charset=utf-8 - date: - - Wed, 23 Mar 2022 07:00:26 GMT - etag: - - '"8700ae64-0000-0100-0000-623ac5890000"' - expires: - - '-1' - 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: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - stack-hci cluster list - Connection: - - keep-alive - 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) - 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 - 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"}}]}' - headers: - cache-control: - - no-cache - content-length: - - '650' - content-type: - - application/json; charset=utf-8 - date: - - Wed, 23 Mar 2022 07:00:29 GMT - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - vary: - - Accept-Encoding - 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 - status: - code: 200 - message: OK -- request: - body: '{"tags": {"key0": "value1"}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - stack-hci cluster update - Connection: - - keep-alive - Content-Length: - - '28' - Content-Type: - - application/json - 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) - 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 - 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"}}' - headers: - cache-control: - - no-cache - content-length: - - '876' - content-type: - - application/json; charset=utf-8 - date: - - Wed, 23 Mar 2022 07:00:33 GMT - etag: - - '"8700c864-0000-0100-0000-623ac5900000"' - expires: - - '-1' - 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: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - stack-hci cluster show - Connection: - - keep-alive - 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) - 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 - 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"}}' - headers: - cache-control: - - no-cache - content-length: - - '638' - content-type: - - application/json; charset=utf-8 - date: - - Wed, 23 Mar 2022 07:00:35 GMT - etag: - - '"8700c864-0000-0100-0000-623ac5900000"' - expires: - - '-1' - 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-powered-by: - - ASP.NET - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - stack-hci cluster delete - Connection: - - keep-alive - Content-Length: - - '0' - 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) - 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 - 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 - cache-control: - - no-cache - content-length: - - '4' - content-type: - - application/json; charset=utf-8 - date: - - Wed, 23 Mar 2022 07:00:37 GMT - etag: - - '"8700da64-0000-0100-0000-623ac5950000"' - expires: - - '-1' - location: - - https://management.azure.com/providers/Microsoft.AzureStackHCI/locations/EASTUS/operationStatuses/354e4dfc-c2e8-4875-9b6f-1d2d7ff3c3f5*6A7C0DC44D71D0023FCD46C34BF2EDA2815905B784D5CD4A801557854EBD15AB?api-version=2022-01-01 - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-providerhub-traffic: - - 'True' - x-ms-ratelimit-remaining-subscription-deletes: - - '14999' - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - ad app delete - Connection: - - keep-alive - 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: 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 - 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: - - Wed, 23 Mar 2022 07:00:38 GMT - duration: - - '1253183' - 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 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - ad app delete - Connection: - - keep-alive - 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: 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 - 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}]}' - 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: - - Wed, 23 Mar 2022 07:00:39 GMT - duration: - - '6761091' - 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 - 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 deleted file mode 100644 index 4ca392e6fc0..00000000000 --- a/src/stack-hci/azext_stack_hci/tests/latest/recordings/test_stack_hci_extension_crud.yaml +++ /dev/null @@ -1,825 +0,0 @@ -interactions: -- 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?$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: - - 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: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 - request-id: - - 27c26416-fe5f-4c24-aa34-870c52651bb6 - 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?$filter=appId%20eq%20%2719e87cb7-6317-4e39-a358-2de5b2b3d1ec%27&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: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 - request-id: - - db8ea5b3-7b62-4b6e-a9ff-f41aa6452554 - 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: '{"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": - []}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - ad app create - Connection: - - keep-alive - Content-Length: - - '855' - Content-Type: - - application/json; charset=utf-8 - 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: PATCH - uri: https://graph.windows.net/00000000-0000-0000-0000-000000000000/applications/2ddd80d9-80fa-4ef6-bc07-58af0824604c?api-version=1.6 - 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 - request-id: - - af1e7557-c436-495c-ae66-5a5e6d6d67a3 - 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 -- 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?$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: - - 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=appId%20eq%20%2719e87cb7-6317-4e39-a358-2de5b2b3d1ec%27&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: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 - request-id: - - 6f16b17b-63b1-43b0-b72c-317d6be27897 - 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' - x-ms-resource-unit: - - '1' - 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 - Connection: - - keep-alive - 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) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_stack_hci_000001?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"}}' - headers: - cache-control: - - no-cache - content-length: - - '328' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 01 Apr 2022 06:47:02 GMT - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: '{"location": "eastus", "properties": {"aadClientId": "19e87cb7-6317-4e39-a358-2de5b2b3d1ec", - "aadTenantId": "54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - stack-hci cluster create - Connection: - - keep-alive - Content-Length: - - '148' - Content-Type: - - application/json - 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) - 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 - 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"}}' - headers: - cache-control: - - no-cache - content-length: - - '851' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 01 Apr 2022 06:47:07 GMT - etag: - - '"13013387-0000-0100-0000-62469fea0000"' - expires: - - '-1' - 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: - - '1198' - x-powered-by: - - ASP.NET - status: - code: 200 - message: OK -- request: - body: '{}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - stack-hci arc-setting create - Connection: - - keep-alive - Content-Length: - - '2' - Content-Type: - - application/json - 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) - 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 - 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"}}' - headers: - cache-control: - - no-cache - content-length: - - '665' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 01 Apr 2022 06:47:09 GMT - etag: - - '"2a006341-0000-0100-0000-62469fed0000"' - expires: - - '-1' - 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: - - '1197' - x-powered-by: - - ASP.NET - status: - code: 200 - message: OK -- request: - body: '{"properties": {"extensionParameters": {"publisher": "Microsoft.Compute", - "type": "MicrosoftMonitoringAgent", "typeHandlerVersion": "1.10", "settings": - {"workspaceId": "xx"}, "protectedSettings": {"workspaceKey": "xx"}}}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - stack-hci extension create - Connection: - - keep-alive - Content-Length: - - '221' - Content-Type: - - application/json - ParameterSetName: - - -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) - 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 - 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"}}}}' - headers: - cache-control: - - no-cache - content-length: - - '816' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 01 Apr 2022 06:47:10 GMT - etag: - - '"2c001ead-0000-0100-0000-62469fef0000"' - expires: - - '-1' - 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: - - '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 extension list - Connection: - - keep-alive - 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) - 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 - 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"}}}}]}' - headers: - cache-control: - - no-cache - content-length: - - '590' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 01 Apr 2022 06:47:12 GMT - expires: - - '-1' - 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-powered-by: - - ASP.NET - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - stack-hci extension show - Connection: - - keep-alive - 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) - 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 - 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"}}}}' - headers: - cache-control: - - no-cache - content-length: - - '578' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 01 Apr 2022 06:47:13 GMT - etag: - - '"2c001ead-0000-0100-0000-62469fef0000"' - expires: - - '-1' - 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-powered-by: - - ASP.NET - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - stack-hci extension delete - Connection: - - keep-alive - Content-Length: - - '0' - 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) - 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 - response: - body: - string: '' - headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Fri, 01 Apr 2022 06:47:15 GMT - expires: - - '-1' - pragma: - - no-cache - request-context: - - appId= - strict-transport-security: - - max-age=31536000; includeSubDomains - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-providerhub-traffic: - - 'True' - x-ms-ratelimit-remaining-subscription-deletes: - - '14999' - x-powered-by: - - ASP.NET - status: - code: 200 - message: OK -version: 1 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 deleted file mode 100644 index 6b1c4c20c7f..00000000000 --- a/src/stack-hci/azext_stack_hci/tests/latest/test_stack_hci_commands.py +++ /dev/null @@ -1,125 +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=line-too-long -# pylint: disable=too-many-lines - -import json - -from azure.cli.testsdk import ( - ResourceGroupPreparer, - ScenarioTest -) - - -class StackHciClientTest(ScenarioTest): - @ResourceGroupPreparer(name_prefix='cli_test_stack_hci_', location='eastus') - def test_stack_hci_cluster_crud(self): - self.kwargs.update({ - 'cluster_name': 'cli-test-cluster', - 'app_name': 'cli-test-app' - }) - 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 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 delete -n {cluster_name} -g {rg} --yes') - - @ResourceGroupPreparer(name_prefix='cli_test_stack_hci_', location='eastus') - def test_stack_hci_arc_setting_crud(self): - self.kwargs.update({ - 'cluster_name': 'cli-test-cluster', - 'app_name': 'cli-test-app' - }) - 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}') - - 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 delete -n default -g {rg} --cluster-name {cluster_name} --no-wait --yes') - - @ResourceGroupPreparer(name_prefix='cli_test_stack_hci_', location='eastus') - def test_stack_hci_extension_crud(self): - self.kwargs.update({ - 'cluster_name': 'cli-test-cluster', - 'app_name': 'cli-test-app', - 'type': 'MicrosoftMonitoringAgent', - 'publisher': 'Microsoft.Compute' - }) - 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}') - self.cmd('stack-hci arc-setting create -n default -g {rg} --cluster-name {cluster_name}') - - 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 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/tests/latest/test_stack_hci_scenario.py b/src/stack-hci/azext_stack_hci/tests/latest/test_stack_hci_scenario.py new file mode 100644 index 00000000000..40b46fa7937 --- /dev/null +++ b/src/stack-hci/azext_stack_hci/tests/latest/test_stack_hci_scenario.py @@ -0,0 +1,125 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import os +from azure.cli.testsdk import ScenarioTest +from azure.cli.testsdk import ResourceGroupPreparer +from .example_steps import step_cluster_create +from .example_steps import step_cluster_show +from .example_steps import step_cluster_list +from .example_steps import step_cluster_list2 +from .example_steps import step_cluster_update +from .example_steps import step_cluster_create_identity +from .example_steps import step_arc_setting_create +from .example_steps import step_arc_setting_show +from .example_steps import step_arc_setting_list +from .example_steps import step_arc_setting_update +from .example_steps import step_arc_setting_create_identity +from .example_steps import step_arc_setting_generate_password +from .example_steps import step_extension_create +from .example_steps import step_extension_show +from .example_steps import step_extension_list +from .example_steps import step_extension_delete +from .example_steps import step_arc_setting_delete +from .example_steps import step_cluster_delete +from .. import ( + try_manual, + raise_if, + calc_coverage +) + + +TEST_DIR = os.path.abspath(os.path.join(os.path.abspath(__file__), '..')) + + +# Env setup_scenario +@try_manual +def setup_scenario(test): + pass + + +# Env cleanup_scenario +@try_manual +def cleanup_scenario(test): + pass + + +# Testcase: Scenario +@try_manual +def call_scenario(test): + setup_scenario(test) + step_cluster_create(test, checks=[ + test.check("location", "eastus", case_sensitive=False), + test.check("name", "{myCluster}", case_sensitive=False), + ]) + step_cluster_show(test, checks=[ + test.check("location", "eastus", case_sensitive=False), + test.check("name", "{myCluster}", case_sensitive=False), + ]) + step_cluster_list(test, checks=[ + test.check('length(@)', 1), + ]) + step_cluster_list2(test, checks=[ + test.exists('@'), + ]) + step_cluster_update(test, checks=[ + test.check("location", "eastus", case_sensitive=False), + test.check("name", "{myCluster}", case_sensitive=False), + test.check("desiredProperties.diagnosticLevel", "Basic", case_sensitive=False), + test.check("desiredProperties.windowsServerSubscription", "Enabled", case_sensitive=False), + test.check("tags.tag1", "value1", case_sensitive=False), + test.check("tags.tag2", "value2", case_sensitive=False), + ]) + step_cluster_create_identity(test, checks=[]) + step_arc_setting_create(test, checks=[]) + step_arc_setting_show(test, checks=[]) + step_arc_setting_list(test, checks=[ + test.check('length(@)', 1), + ]) + step_arc_setting_update(test, checks=[ + test.check("connectivityProperties.enabled", True), + ]) + step_arc_setting_create_identity(test, checks=[]) + step_arc_setting_generate_password(test, checks=[]) + step_extension_create(test, checks=[ + test.check("publisher", "Microsoft.Compute", case_sensitive=False), + test.check("settings.workspaceId", "xx", case_sensitive=False), + test.check("name", "{myExtension}", case_sensitive=False), + ]) + step_extension_show(test, checks=[ + test.check("publisher", "Microsoft.Compute", case_sensitive=False), + test.check("settings.workspaceId", "xx", case_sensitive=False), + test.check("name", "{myExtension}", case_sensitive=False), + ]) + step_extension_list(test, checks=[ + test.check('length(@)', 1), + ]) + step_extension_delete(test, checks=[]) + step_arc_setting_delete(test, checks=[]) + step_cluster_delete(test, checks=[]) + cleanup_scenario(test) + + +# Test class for Scenario +@try_manual +class Stack_hciScenarioTest(ScenarioTest): + def __init__(self, *args, **kwargs): + super(Stack_hciScenarioTest, self).__init__(*args, **kwargs) + self.kwargs.update({ + 'myCluster': 'myCluster', + 'myArcSetting': 'default', + 'myExtension': 'MicrosoftMonitoringAgent', + }) + + @ResourceGroupPreparer(name_prefix='cliteststack_hci_test-rg'[:7], key='rg', parameter_name='rg') + def test_stack_hci_Scenario(self, rg): + call_scenario(self) + calc_coverage(__file__) + raise_if() 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: From d557eabdce04d1261907298d839d0ffbeb9442f0 Mon Sep 17 00:00:00 2001 From: songlu <442586197@qq.com> Date: Fri, 22 Jul 2022 17:53:32 +0800 Subject: [PATCH 2/4] test --- .../azext_stack_hci/generated/_params.py | 2 +- .../azext_stack_hci/generated/commands.py | 3 +- .../azext_stack_hci/generated/custom.py | 6 +- .../tests/latest/example_steps.py | 230 --- .../recordings/test_stack_hci_Scenario.yaml | 1359 ----------------- .../test_stack_hci_arc_setting_crud.yaml | 551 +++++++ .../test_stack_hci_cluster_crud.yaml | 544 +++++++ .../test_stack_hci_extension_crud.yaml | 560 +++++++ .../tests/latest/test_stack_hci_commands.py | 98 ++ .../tests/latest/test_stack_hci_scenario.py | 125 -- 10 files changed, 1759 insertions(+), 1719 deletions(-) delete mode 100644 src/stack-hci/azext_stack_hci/tests/latest/example_steps.py delete mode 100644 src/stack-hci/azext_stack_hci/tests/latest/recordings/test_stack_hci_Scenario.yaml create mode 100644 src/stack-hci/azext_stack_hci/tests/latest/recordings/test_stack_hci_arc_setting_crud.yaml create mode 100644 src/stack-hci/azext_stack_hci/tests/latest/recordings/test_stack_hci_cluster_crud.yaml create mode 100644 src/stack-hci/azext_stack_hci/tests/latest/recordings/test_stack_hci_extension_crud.yaml create mode 100644 src/stack-hci/azext_stack_hci/tests/latest/test_stack_hci_commands.py delete mode 100644 src/stack-hci/azext_stack_hci/tests/latest/test_stack_hci_scenario.py diff --git a/src/stack-hci/azext_stack_hci/generated/_params.py b/src/stack-hci/azext_stack_hci/generated/_params.py index 71cca63e5a7..7bb803946e2 100644 --- a/src/stack-hci/azext_stack_hci/generated/_params.py +++ b/src/stack-hci/azext_stack_hci/generated/_params.py @@ -156,7 +156,7 @@ def load_arguments(self, _): 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') - c.argument('properties', action=AddProperties, nargs='+', help='') + c.argument('certificates', nargs='+', help='Certificates') with self.argument_context('stack-hci cluster wait') as c: c.argument('resource_group_name', resource_group_name_type) diff --git a/src/stack-hci/azext_stack_hci/generated/commands.py b/src/stack-hci/azext_stack_hci/generated/commands.py index 750e373e748..d8a53ad868b 100644 --- a/src/stack-hci/azext_stack_hci/generated/commands.py +++ b/src/stack-hci/azext_stack_hci/generated/commands.py @@ -57,7 +57,8 @@ def load_command_table(self, _): g.custom_command('update', 'stack_hci_cluster_update') 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) - g.custom_command('upload-certificate', 'stack_hci_cluster_upload_certificate', 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: diff --git a/src/stack-hci/azext_stack_hci/generated/custom.py b/src/stack-hci/azext_stack_hci/generated/custom.py index dae88a64f06..d1e9520ac46 100644 --- a/src/stack-hci/azext_stack_hci/generated/custom.py +++ b/src/stack-hci/azext_stack_hci/generated/custom.py @@ -236,11 +236,11 @@ def stack_hci_cluster_create_identity(client, def stack_hci_cluster_upload_certificate(client, resource_group_name, cluster_name, - properties=None, + certificates=None, no_wait=False): upload_certificate_request = {} - if properties is not None: - upload_certificate_request['properties'] = properties + 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, diff --git a/src/stack-hci/azext_stack_hci/tests/latest/example_steps.py b/src/stack-hci/azext_stack_hci/tests/latest/example_steps.py deleted file mode 100644 index c71aa1d2d15..00000000000 --- a/src/stack-hci/azext_stack_hci/tests/latest/example_steps.py +++ /dev/null @@ -1,230 +0,0 @@ -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - - -from .. import try_manual - - -# EXAMPLE: /Clusters/put/Create cluster -@try_manual -def step_cluster_create(test, checks=None): - if checks is None: - checks = [] - test.cmd('az stack-hci cluster create ' - '--location "East US" ' - '--name "{myCluster}" ' - '--resource-group "{rg}"', - checks=checks) - - -# EXAMPLE: /Clusters/get/Get cluster -@try_manual -def step_cluster_show(test, checks=None): - if checks is None: - checks = [] - test.cmd('az stack-hci cluster show ' - '--name "{myCluster}" ' - '--resource-group "{rg}"', - checks=checks) - - -# EXAMPLE: /Clusters/get/List clusters in a given resource group -@try_manual -def step_cluster_list(test, checks=None): - if checks is None: - checks = [] - test.cmd('az stack-hci cluster list ' - '--resource-group "{rg}"', - checks=checks) - - -# EXAMPLE: /Clusters/get/List clusters in a given subscription -@try_manual -def step_cluster_list2(test, checks=None): - if checks is None: - checks = [] - test.cmd('az stack-hci cluster list ' - '-g ""', - checks=checks) - - -# EXAMPLE: /Clusters/patch/Update cluster -@try_manual -def step_cluster_update(test, checks=None): - if checks is None: - checks = [] - test.cmd('az stack-hci cluster update ' - '--desired-properties diagnostic-level="Basic" windows-server-subscription="Enabled" ' - '--tags tag1="value1" tag2="value2" ' - '--name "{myCluster}" ' - '--resource-group "{rg}"', - checks=checks) - - -# EXAMPLE: /Clusters/post/Create cluster Identity -@try_manual -def step_cluster_create_identity(test, checks=None): - if checks is None: - checks = [] - test.cmd('az stack-hci cluster create-identity ' - '--name "{myCluster}" ' - '--resource-group "{rg}"', - checks=checks) - - -# EXAMPLE: /ArcSettings/put/Create ArcSetting -@try_manual -def step_arc_setting_create(test, checks=None): - if checks is None: - checks = [] - test.cmd('az stack-hci arc-setting create ' - '--name "{myArcSetting}" ' - '--cluster-name "{myCluster}" ' - '--resource-group "{rg}"', - checks=checks) - - -# EXAMPLE: /ArcSettings/get/Get ArcSetting -@try_manual -def step_arc_setting_show(test, checks=None): - if checks is None: - checks = [] - test.cmd('az stack-hci arc-setting show ' - '--name "{myArcSetting}" ' - '--cluster-name "{myCluster}" ' - '--resource-group "{rg}"', - checks=checks) - - -# EXAMPLE: /ArcSettings/get/List ArcSetting resources by HCI Cluster -@try_manual -def step_arc_setting_list(test, checks=None): - if checks is None: - checks = [] - test.cmd('az stack-hci arc-setting list ' - '--cluster-name "{myCluster}" ' - '--resource-group "{rg}"', - checks=checks) - - -# EXAMPLE: /ArcSettings/patch/Patch ArcSetting -@try_manual -def step_arc_setting_update(test, checks=None): - if checks is None: - checks = [] - test.cmd('az stack-hci arc-setting update ' - '--connectivity-properties "{{\\"enabled\\":true}}" ' - '--name "{myArcSetting}" ' - '--cluster-name "{myCluster}" ' - '--resource-group "{rg}"', - checks=checks) - - -# EXAMPLE: /ArcSettings/post/Create Arc Identity -@try_manual -def step_arc_setting_create_identity(test, checks=None): - if checks is None: - checks = [] - test.cmd('az stack-hci arc-setting create-identity ' - '--name "{myArcSetting}" ' - '--cluster-name "{myCluster}" ' - '--resource-group "{rg}"', - checks=checks) - - -# EXAMPLE: /ArcSettings/post/Generate Password -@try_manual -def step_arc_setting_generate_password(test, checks=None): - if checks is None: - checks = [] - test.cmd('az stack-hci arc-setting generate-password ' - '--name "{myArcSetting}" ' - '--cluster-name "{myCluster}" ' - '--resource-group "{rg}"', - checks=checks) - - -# EXAMPLE: /Extensions/put/Create Arc Extension -@try_manual -def step_extension_create(test, checks=None): - if checks is None: - checks = [] - test.cmd('az stack-hci extension create ' - '--arc-setting-name "{myArcSetting}" ' - '--cluster-name "{myCluster}" ' - '--type "{myExtension}" ' - '--protected-settings "{{\\"workspaceKey\\":\\"xx\\"}}" ' - '--publisher "Microsoft.Compute" ' - '--settings "{{\\"workspaceId\\":\\"xx\\"}}" ' - '--type-handler-version "1.10" ' - '--name "{myExtension}" ' - '--resource-group "{rg}"', - checks=[]) - - -# EXAMPLE: /Extensions/get/Get ArcSettings Extension -@try_manual -def step_extension_show(test, checks=None): - if checks is None: - checks = [] - test.cmd('az stack-hci extension show ' - '--arc-setting-name "{myArcSetting}" ' - '--cluster-name "{myCluster}" ' - '--name "{myExtension}" ' - '--resource-group "{rg}"', - checks=checks) - - -# EXAMPLE: /Extensions/get/List Extensions under ArcSetting resource -@try_manual -def step_extension_list(test, checks=None): - if checks is None: - checks = [] - test.cmd('az stack-hci extension list ' - '--arc-setting-name "{myArcSetting}" ' - '--cluster-name "{myCluster}" ' - '--resource-group "{rg}"', - checks=checks) - - -# EXAMPLE: /Extensions/delete/Delete Arc Extension -@try_manual -def step_extension_delete(test, checks=None): - if checks is None: - checks = [] - test.cmd('az stack-hci extension delete -y ' - '--arc-setting-name "{myArcSetting}" ' - '--cluster-name "{myCluster}" ' - '--name "{myExtension}" ' - '--resource-group "{rg}"', - checks=checks) - - -# EXAMPLE: /ArcSettings/delete/Delete ArcSetting -@try_manual -def step_arc_setting_delete(test, checks=None): - if checks is None: - checks = [] - test.cmd('az stack-hci arc-setting delete -y ' - '--name "{myArcSetting}" ' - '--cluster-name "{myCluster}" ' - '--resource-group "{rg}"', - checks=checks) - - -# EXAMPLE: /Clusters/delete/Delete cluster -@try_manual -def step_cluster_delete(test, checks=None): - if checks is None: - checks = [] - test.cmd('az stack-hci cluster delete -y ' - '--name "{myCluster}" ' - '--resource-group "{rg}"', - checks=checks) diff --git a/src/stack-hci/azext_stack_hci/tests/latest/recordings/test_stack_hci_Scenario.yaml b/src/stack-hci/azext_stack_hci/tests/latest/recordings/test_stack_hci_Scenario.yaml deleted file mode 100644 index 87cb716c991..00000000000 --- a/src/stack-hci/azext_stack_hci/tests/latest/recordings/test_stack_hci_Scenario.yaml +++ /dev/null @@ -1,1359 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - unknown - Connection: - - keep-alive - User-Agent: - - 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/locations?api-version=2019-11-01 - response: - body: - string: "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus\",\"name\":\"eastus\",\"displayName\":\"East - US\",\"regionalDisplayName\":\"(US) East US\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Recommended\",\"geographyGroup\":\"US\",\"longitude\":\"-79.8164\",\"latitude\":\"37.3719\",\"physicalLocation\":\"Virginia\",\"pairedRegion\":[{\"name\":\"westus\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/westus\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus2\",\"name\":\"eastus2\",\"displayName\":\"East - US 2\",\"regionalDisplayName\":\"(US) East US 2\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Recommended\",\"geographyGroup\":\"US\",\"longitude\":\"-78.3889\",\"latitude\":\"36.6681\",\"physicalLocation\":\"Virginia\",\"pairedRegion\":[{\"name\":\"centralus\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/centralus\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/southcentralus\",\"name\":\"southcentralus\",\"displayName\":\"South - Central US\",\"regionalDisplayName\":\"(US) South Central US\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Recommended\",\"geographyGroup\":\"US\",\"longitude\":\"-98.5\",\"latitude\":\"29.4167\",\"physicalLocation\":\"Texas\",\"pairedRegion\":[{\"name\":\"northcentralus\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/northcentralus\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/westus2\",\"name\":\"westus2\",\"displayName\":\"West - US 2\",\"regionalDisplayName\":\"(US) West US 2\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Recommended\",\"geographyGroup\":\"US\",\"longitude\":\"-119.852\",\"latitude\":\"47.233\",\"physicalLocation\":\"Washington\",\"pairedRegion\":[{\"name\":\"westcentralus\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/westcentralus\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/westus3\",\"name\":\"westus3\",\"displayName\":\"West - US 3\",\"regionalDisplayName\":\"(US) West US 3\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Recommended\",\"geographyGroup\":\"US\",\"longitude\":\"-112.074036\",\"latitude\":\"33.448376\",\"physicalLocation\":\"Phoenix\",\"pairedRegion\":[{\"name\":\"eastus\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/australiaeast\",\"name\":\"australiaeast\",\"displayName\":\"Australia - East\",\"regionalDisplayName\":\"(Asia Pacific) Australia East\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Recommended\",\"geographyGroup\":\"Asia - Pacific\",\"longitude\":\"151.2094\",\"latitude\":\"-33.86\",\"physicalLocation\":\"New - South Wales\",\"pairedRegion\":[{\"name\":\"australiasoutheast\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/australiasoutheast\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/southeastasia\",\"name\":\"southeastasia\",\"displayName\":\"Southeast - Asia\",\"regionalDisplayName\":\"(Asia Pacific) Southeast Asia\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Recommended\",\"geographyGroup\":\"Asia - Pacific\",\"longitude\":\"103.833\",\"latitude\":\"1.283\",\"physicalLocation\":\"Singapore\",\"pairedRegion\":[{\"name\":\"eastasia\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastasia\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/northeurope\",\"name\":\"northeurope\",\"displayName\":\"North - Europe\",\"regionalDisplayName\":\"(Europe) North Europe\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Recommended\",\"geographyGroup\":\"Europe\",\"longitude\":\"-6.2597\",\"latitude\":\"53.3478\",\"physicalLocation\":\"Ireland\",\"pairedRegion\":[{\"name\":\"westeurope\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/westeurope\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/swedencentral\",\"name\":\"swedencentral\",\"displayName\":\"Sweden - Central\",\"regionalDisplayName\":\"(Europe) Sweden Central\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Recommended\",\"geographyGroup\":\"Europe\",\"longitude\":\"17.14127\",\"latitude\":\"60.67488\",\"physicalLocation\":\"G\xE4vle\",\"pairedRegion\":[{\"name\":\"swedensouth\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/swedensouth\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/uksouth\",\"name\":\"uksouth\",\"displayName\":\"UK - South\",\"regionalDisplayName\":\"(Europe) UK South\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Recommended\",\"geographyGroup\":\"Europe\",\"longitude\":\"-0.799\",\"latitude\":\"50.941\",\"physicalLocation\":\"London\",\"pairedRegion\":[{\"name\":\"ukwest\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/ukwest\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/westeurope\",\"name\":\"westeurope\",\"displayName\":\"West - Europe\",\"regionalDisplayName\":\"(Europe) West Europe\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Recommended\",\"geographyGroup\":\"Europe\",\"longitude\":\"4.9\",\"latitude\":\"52.3667\",\"physicalLocation\":\"Netherlands\",\"pairedRegion\":[{\"name\":\"northeurope\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/northeurope\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/centralus\",\"name\":\"centralus\",\"displayName\":\"Central - US\",\"regionalDisplayName\":\"(US) Central US\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Recommended\",\"geographyGroup\":\"US\",\"longitude\":\"-93.6208\",\"latitude\":\"41.5908\",\"physicalLocation\":\"Iowa\",\"pairedRegion\":[{\"name\":\"eastus2\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus2\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/southafricanorth\",\"name\":\"southafricanorth\",\"displayName\":\"South - Africa North\",\"regionalDisplayName\":\"(Africa) South Africa North\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Recommended\",\"geographyGroup\":\"Africa\",\"longitude\":\"28.218370\",\"latitude\":\"-25.731340\",\"physicalLocation\":\"Johannesburg\",\"pairedRegion\":[{\"name\":\"southafricawest\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/southafricawest\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/centralindia\",\"name\":\"centralindia\",\"displayName\":\"Central - India\",\"regionalDisplayName\":\"(Asia Pacific) Central India\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Recommended\",\"geographyGroup\":\"Asia - Pacific\",\"longitude\":\"73.9197\",\"latitude\":\"18.5822\",\"physicalLocation\":\"Pune\",\"pairedRegion\":[{\"name\":\"southindia\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/southindia\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastasia\",\"name\":\"eastasia\",\"displayName\":\"East - Asia\",\"regionalDisplayName\":\"(Asia Pacific) East Asia\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Recommended\",\"geographyGroup\":\"Asia - Pacific\",\"longitude\":\"114.188\",\"latitude\":\"22.267\",\"physicalLocation\":\"Hong - Kong\",\"pairedRegion\":[{\"name\":\"southeastasia\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/southeastasia\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/japaneast\",\"name\":\"japaneast\",\"displayName\":\"Japan - East\",\"regionalDisplayName\":\"(Asia Pacific) Japan East\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Recommended\",\"geographyGroup\":\"Asia - Pacific\",\"longitude\":\"139.77\",\"latitude\":\"35.68\",\"physicalLocation\":\"Tokyo, - Saitama\",\"pairedRegion\":[{\"name\":\"japanwest\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/japanwest\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/koreacentral\",\"name\":\"koreacentral\",\"displayName\":\"Korea - Central\",\"regionalDisplayName\":\"(Asia Pacific) Korea Central\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Recommended\",\"geographyGroup\":\"Asia - Pacific\",\"longitude\":\"126.9780\",\"latitude\":\"37.5665\",\"physicalLocation\":\"Seoul\",\"pairedRegion\":[{\"name\":\"koreasouth\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/koreasouth\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/canadacentral\",\"name\":\"canadacentral\",\"displayName\":\"Canada - Central\",\"regionalDisplayName\":\"(Canada) Canada Central\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Recommended\",\"geographyGroup\":\"Canada\",\"longitude\":\"-79.383\",\"latitude\":\"43.653\",\"physicalLocation\":\"Toronto\",\"pairedRegion\":[{\"name\":\"canadaeast\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/canadaeast\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/francecentral\",\"name\":\"francecentral\",\"displayName\":\"France - Central\",\"regionalDisplayName\":\"(Europe) France Central\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Recommended\",\"geographyGroup\":\"Europe\",\"longitude\":\"2.3730\",\"latitude\":\"46.3772\",\"physicalLocation\":\"Paris\",\"pairedRegion\":[{\"name\":\"francesouth\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/francesouth\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/germanywestcentral\",\"name\":\"germanywestcentral\",\"displayName\":\"Germany - West Central\",\"regionalDisplayName\":\"(Europe) Germany West Central\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Recommended\",\"geographyGroup\":\"Europe\",\"longitude\":\"8.682127\",\"latitude\":\"50.110924\",\"physicalLocation\":\"Frankfurt\",\"pairedRegion\":[{\"name\":\"germanynorth\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/germanynorth\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/norwayeast\",\"name\":\"norwayeast\",\"displayName\":\"Norway - East\",\"regionalDisplayName\":\"(Europe) Norway East\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Recommended\",\"geographyGroup\":\"Europe\",\"longitude\":\"10.752245\",\"latitude\":\"59.913868\",\"physicalLocation\":\"Norway\",\"pairedRegion\":[{\"name\":\"norwaywest\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/norwaywest\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/switzerlandnorth\",\"name\":\"switzerlandnorth\",\"displayName\":\"Switzerland - North\",\"regionalDisplayName\":\"(Europe) Switzerland North\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Recommended\",\"geographyGroup\":\"Europe\",\"longitude\":\"8.564572\",\"latitude\":\"47.451542\",\"physicalLocation\":\"Zurich\",\"pairedRegion\":[{\"name\":\"switzerlandwest\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/switzerlandwest\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/brazilsouth\",\"name\":\"brazilsouth\",\"displayName\":\"Brazil - South\",\"regionalDisplayName\":\"(South America) Brazil South\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Recommended\",\"geographyGroup\":\"South - America\",\"longitude\":\"-46.633\",\"latitude\":\"-23.55\",\"physicalLocation\":\"Sao - Paulo State\",\"pairedRegion\":[{\"name\":\"southcentralus\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/southcentralus\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus2euap\",\"name\":\"eastus2euap\",\"displayName\":\"East - US 2 EUAP\",\"regionalDisplayName\":\"(US) East US 2 EUAP\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Recommended\",\"geographyGroup\":\"US\",\"longitude\":\"-78.3889\",\"latitude\":\"36.6681\",\"pairedRegion\":[{\"name\":\"centraluseuap\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/centraluseuap\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/centralusstage\",\"name\":\"centralusstage\",\"displayName\":\"Central - US (Stage)\",\"regionalDisplayName\":\"(US) Central US (Stage)\",\"metadata\":{\"regionType\":\"Logical\",\"regionCategory\":\"Other\",\"geographyGroup\":\"US\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastusstage\",\"name\":\"eastusstage\",\"displayName\":\"East - US (Stage)\",\"regionalDisplayName\":\"(US) East US (Stage)\",\"metadata\":{\"regionType\":\"Logical\",\"regionCategory\":\"Other\",\"geographyGroup\":\"US\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus2stage\",\"name\":\"eastus2stage\",\"displayName\":\"East - US 2 (Stage)\",\"regionalDisplayName\":\"(US) East US 2 (Stage)\",\"metadata\":{\"regionType\":\"Logical\",\"regionCategory\":\"Other\",\"geographyGroup\":\"US\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/northcentralusstage\",\"name\":\"northcentralusstage\",\"displayName\":\"North - Central US (Stage)\",\"regionalDisplayName\":\"(US) North Central US (Stage)\",\"metadata\":{\"regionType\":\"Logical\",\"regionCategory\":\"Other\",\"geographyGroup\":\"US\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/southcentralusstage\",\"name\":\"southcentralusstage\",\"displayName\":\"South - Central US (Stage)\",\"regionalDisplayName\":\"(US) South Central US (Stage)\",\"metadata\":{\"regionType\":\"Logical\",\"regionCategory\":\"Other\",\"geographyGroup\":\"US\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/westusstage\",\"name\":\"westusstage\",\"displayName\":\"West - US (Stage)\",\"regionalDisplayName\":\"(US) West US (Stage)\",\"metadata\":{\"regionType\":\"Logical\",\"regionCategory\":\"Other\",\"geographyGroup\":\"US\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/westus2stage\",\"name\":\"westus2stage\",\"displayName\":\"West - US 2 (Stage)\",\"regionalDisplayName\":\"(US) West US 2 (Stage)\",\"metadata\":{\"regionType\":\"Logical\",\"regionCategory\":\"Other\",\"geographyGroup\":\"US\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/asia\",\"name\":\"asia\",\"displayName\":\"Asia\",\"regionalDisplayName\":\"Asia\",\"metadata\":{\"regionType\":\"Logical\",\"regionCategory\":\"Other\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/asiapacific\",\"name\":\"asiapacific\",\"displayName\":\"Asia - Pacific\",\"regionalDisplayName\":\"Asia Pacific\",\"metadata\":{\"regionType\":\"Logical\",\"regionCategory\":\"Other\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/australia\",\"name\":\"australia\",\"displayName\":\"Australia\",\"regionalDisplayName\":\"Australia\",\"metadata\":{\"regionType\":\"Logical\",\"regionCategory\":\"Other\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/brazil\",\"name\":\"brazil\",\"displayName\":\"Brazil\",\"regionalDisplayName\":\"Brazil\",\"metadata\":{\"regionType\":\"Logical\",\"regionCategory\":\"Other\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/canada\",\"name\":\"canada\",\"displayName\":\"Canada\",\"regionalDisplayName\":\"Canada\",\"metadata\":{\"regionType\":\"Logical\",\"regionCategory\":\"Other\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/europe\",\"name\":\"europe\",\"displayName\":\"Europe\",\"regionalDisplayName\":\"Europe\",\"metadata\":{\"regionType\":\"Logical\",\"regionCategory\":\"Other\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/france\",\"name\":\"france\",\"displayName\":\"France\",\"regionalDisplayName\":\"France\",\"metadata\":{\"regionType\":\"Logical\",\"regionCategory\":\"Other\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/germany\",\"name\":\"germany\",\"displayName\":\"Germany\",\"regionalDisplayName\":\"Germany\",\"metadata\":{\"regionType\":\"Logical\",\"regionCategory\":\"Other\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/global\",\"name\":\"global\",\"displayName\":\"Global\",\"regionalDisplayName\":\"Global\",\"metadata\":{\"regionType\":\"Logical\",\"regionCategory\":\"Other\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/india\",\"name\":\"india\",\"displayName\":\"India\",\"regionalDisplayName\":\"India\",\"metadata\":{\"regionType\":\"Logical\",\"regionCategory\":\"Other\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/japan\",\"name\":\"japan\",\"displayName\":\"Japan\",\"regionalDisplayName\":\"Japan\",\"metadata\":{\"regionType\":\"Logical\",\"regionCategory\":\"Other\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/korea\",\"name\":\"korea\",\"displayName\":\"Korea\",\"regionalDisplayName\":\"Korea\",\"metadata\":{\"regionType\":\"Logical\",\"regionCategory\":\"Other\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/norway\",\"name\":\"norway\",\"displayName\":\"Norway\",\"regionalDisplayName\":\"Norway\",\"metadata\":{\"regionType\":\"Logical\",\"regionCategory\":\"Other\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/singapore\",\"name\":\"singapore\",\"displayName\":\"Singapore\",\"regionalDisplayName\":\"Singapore\",\"metadata\":{\"regionType\":\"Logical\",\"regionCategory\":\"Other\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/southafrica\",\"name\":\"southafrica\",\"displayName\":\"South - Africa\",\"regionalDisplayName\":\"South Africa\",\"metadata\":{\"regionType\":\"Logical\",\"regionCategory\":\"Other\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/switzerland\",\"name\":\"switzerland\",\"displayName\":\"Switzerland\",\"regionalDisplayName\":\"Switzerland\",\"metadata\":{\"regionType\":\"Logical\",\"regionCategory\":\"Other\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/uae\",\"name\":\"uae\",\"displayName\":\"United - Arab Emirates\",\"regionalDisplayName\":\"United Arab Emirates\",\"metadata\":{\"regionType\":\"Logical\",\"regionCategory\":\"Other\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/uk\",\"name\":\"uk\",\"displayName\":\"United - Kingdom\",\"regionalDisplayName\":\"United Kingdom\",\"metadata\":{\"regionType\":\"Logical\",\"regionCategory\":\"Other\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/unitedstates\",\"name\":\"unitedstates\",\"displayName\":\"United - States\",\"regionalDisplayName\":\"United States\",\"metadata\":{\"regionType\":\"Logical\",\"regionCategory\":\"Other\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/unitedstateseuap\",\"name\":\"unitedstateseuap\",\"displayName\":\"United - States EUAP\",\"regionalDisplayName\":\"United States EUAP\",\"metadata\":{\"regionType\":\"Logical\",\"regionCategory\":\"Other\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastasiastage\",\"name\":\"eastasiastage\",\"displayName\":\"East - Asia (Stage)\",\"regionalDisplayName\":\"(Asia Pacific) East Asia (Stage)\",\"metadata\":{\"regionType\":\"Logical\",\"regionCategory\":\"Other\",\"geographyGroup\":\"Asia - Pacific\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/southeastasiastage\",\"name\":\"southeastasiastage\",\"displayName\":\"Southeast - Asia (Stage)\",\"regionalDisplayName\":\"(Asia Pacific) Southeast Asia (Stage)\",\"metadata\":{\"regionType\":\"Logical\",\"regionCategory\":\"Other\",\"geographyGroup\":\"Asia - Pacific\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/northcentralus\",\"name\":\"northcentralus\",\"displayName\":\"North - Central US\",\"regionalDisplayName\":\"(US) North Central US\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Other\",\"geographyGroup\":\"US\",\"longitude\":\"-87.6278\",\"latitude\":\"41.8819\",\"physicalLocation\":\"Illinois\",\"pairedRegion\":[{\"name\":\"southcentralus\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/southcentralus\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/westus\",\"name\":\"westus\",\"displayName\":\"West - US\",\"regionalDisplayName\":\"(US) West US\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Other\",\"geographyGroup\":\"US\",\"longitude\":\"-122.417\",\"latitude\":\"37.783\",\"physicalLocation\":\"California\",\"pairedRegion\":[{\"name\":\"eastus\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/jioindiawest\",\"name\":\"jioindiawest\",\"displayName\":\"Jio - India West\",\"regionalDisplayName\":\"(Asia Pacific) Jio India West\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Other\",\"geographyGroup\":\"Asia - Pacific\",\"longitude\":\"70.05773\",\"latitude\":\"22.470701\",\"physicalLocation\":\"Jamnagar\",\"pairedRegion\":[{\"name\":\"jioindiacentral\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/jioindiacentral\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/uaenorth\",\"name\":\"uaenorth\",\"displayName\":\"UAE - North\",\"regionalDisplayName\":\"(Middle East) UAE North\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Other\",\"geographyGroup\":\"Middle - East\",\"longitude\":\"55.316666\",\"latitude\":\"25.266666\",\"physicalLocation\":\"Dubai\",\"pairedRegion\":[{\"name\":\"uaecentral\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/uaecentral\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/centraluseuap\",\"name\":\"centraluseuap\",\"displayName\":\"Central - US EUAP\",\"regionalDisplayName\":\"(US) Central US EUAP\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Other\",\"geographyGroup\":\"US\",\"longitude\":\"-93.6208\",\"latitude\":\"41.5908\",\"pairedRegion\":[{\"name\":\"eastus2euap\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus2euap\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/westcentralus\",\"name\":\"westcentralus\",\"displayName\":\"West - Central US\",\"regionalDisplayName\":\"(US) West Central US\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Other\",\"geographyGroup\":\"US\",\"longitude\":\"-110.234\",\"latitude\":\"40.890\",\"physicalLocation\":\"Wyoming\",\"pairedRegion\":[{\"name\":\"westus2\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/westus2\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/southafricawest\",\"name\":\"southafricawest\",\"displayName\":\"South - Africa West\",\"regionalDisplayName\":\"(Africa) South Africa West\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Other\",\"geographyGroup\":\"Africa\",\"longitude\":\"18.843266\",\"latitude\":\"-34.075691\",\"physicalLocation\":\"Cape - Town\",\"pairedRegion\":[{\"name\":\"southafricanorth\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/southafricanorth\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/australiacentral\",\"name\":\"australiacentral\",\"displayName\":\"Australia - Central\",\"regionalDisplayName\":\"(Asia Pacific) Australia Central\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Other\",\"geographyGroup\":\"Asia - Pacific\",\"longitude\":\"149.1244\",\"latitude\":\"-35.3075\",\"physicalLocation\":\"Canberra\",\"pairedRegion\":[{\"name\":\"australiacentral\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/australiacentral\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/australiacentral2\",\"name\":\"australiacentral2\",\"displayName\":\"Australia - Central 2\",\"regionalDisplayName\":\"(Asia Pacific) Australia Central 2\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Other\",\"geographyGroup\":\"Asia - Pacific\",\"longitude\":\"149.1244\",\"latitude\":\"-35.3075\",\"physicalLocation\":\"Canberra\",\"pairedRegion\":[{\"name\":\"australiacentral2\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/australiacentral2\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/australiasoutheast\",\"name\":\"australiasoutheast\",\"displayName\":\"Australia - Southeast\",\"regionalDisplayName\":\"(Asia Pacific) Australia Southeast\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Other\",\"geographyGroup\":\"Asia - Pacific\",\"longitude\":\"144.9631\",\"latitude\":\"-37.8136\",\"physicalLocation\":\"Victoria\",\"pairedRegion\":[{\"name\":\"australiaeast\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/australiaeast\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/japanwest\",\"name\":\"japanwest\",\"displayName\":\"Japan - West\",\"regionalDisplayName\":\"(Asia Pacific) Japan West\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Other\",\"geographyGroup\":\"Asia - Pacific\",\"longitude\":\"135.5022\",\"latitude\":\"34.6939\",\"physicalLocation\":\"Osaka\",\"pairedRegion\":[{\"name\":\"japaneast\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/japaneast\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/jioindiacentral\",\"name\":\"jioindiacentral\",\"displayName\":\"Jio - India Central\",\"regionalDisplayName\":\"(Asia Pacific) Jio India Central\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Other\",\"geographyGroup\":\"Asia - Pacific\",\"longitude\":\"79.08886\",\"latitude\":\"21.146633\",\"physicalLocation\":\"Nagpur\",\"pairedRegion\":[{\"name\":\"jioindiawest\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/jioindiawest\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/koreasouth\",\"name\":\"koreasouth\",\"displayName\":\"Korea - South\",\"regionalDisplayName\":\"(Asia Pacific) Korea South\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Other\",\"geographyGroup\":\"Asia - Pacific\",\"longitude\":\"129.0756\",\"latitude\":\"35.1796\",\"physicalLocation\":\"Busan\",\"pairedRegion\":[{\"name\":\"koreacentral\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/koreacentral\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/southindia\",\"name\":\"southindia\",\"displayName\":\"South - India\",\"regionalDisplayName\":\"(Asia Pacific) South India\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Other\",\"geographyGroup\":\"Asia - Pacific\",\"longitude\":\"80.1636\",\"latitude\":\"12.9822\",\"physicalLocation\":\"Chennai\",\"pairedRegion\":[{\"name\":\"centralindia\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/centralindia\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/westindia\",\"name\":\"westindia\",\"displayName\":\"West - India\",\"regionalDisplayName\":\"(Asia Pacific) West India\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Other\",\"geographyGroup\":\"Asia - Pacific\",\"longitude\":\"72.868\",\"latitude\":\"19.088\",\"physicalLocation\":\"Mumbai\",\"pairedRegion\":[{\"name\":\"southindia\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/southindia\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/canadaeast\",\"name\":\"canadaeast\",\"displayName\":\"Canada - East\",\"regionalDisplayName\":\"(Canada) Canada East\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Other\",\"geographyGroup\":\"Canada\",\"longitude\":\"-71.217\",\"latitude\":\"46.817\",\"physicalLocation\":\"Quebec\",\"pairedRegion\":[{\"name\":\"canadacentral\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/canadacentral\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/francesouth\",\"name\":\"francesouth\",\"displayName\":\"France - South\",\"regionalDisplayName\":\"(Europe) France South\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Other\",\"geographyGroup\":\"Europe\",\"longitude\":\"2.1972\",\"latitude\":\"43.8345\",\"physicalLocation\":\"Marseille\",\"pairedRegion\":[{\"name\":\"francecentral\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/francecentral\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/germanynorth\",\"name\":\"germanynorth\",\"displayName\":\"Germany - North\",\"regionalDisplayName\":\"(Europe) Germany North\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Other\",\"geographyGroup\":\"Europe\",\"longitude\":\"8.806422\",\"latitude\":\"53.073635\",\"physicalLocation\":\"Berlin\",\"pairedRegion\":[{\"name\":\"germanywestcentral\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/germanywestcentral\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/norwaywest\",\"name\":\"norwaywest\",\"displayName\":\"Norway - West\",\"regionalDisplayName\":\"(Europe) Norway West\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Other\",\"geographyGroup\":\"Europe\",\"longitude\":\"5.733107\",\"latitude\":\"58.969975\",\"physicalLocation\":\"Norway\",\"pairedRegion\":[{\"name\":\"norwayeast\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/norwayeast\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/swedensouth\",\"name\":\"swedensouth\",\"displayName\":\"Sweden - South\",\"regionalDisplayName\":\"(Europe) Sweden South\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Other\",\"geographyGroup\":\"Europe\",\"longitude\":\"13.0007\",\"latitude\":\"55.6059\",\"physicalLocation\":\"Malmo\",\"pairedRegion\":[{\"name\":\"swedencentral\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/swedencentral\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/switzerlandwest\",\"name\":\"switzerlandwest\",\"displayName\":\"Switzerland - West\",\"regionalDisplayName\":\"(Europe) Switzerland West\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Other\",\"geographyGroup\":\"Europe\",\"longitude\":\"6.143158\",\"latitude\":\"46.204391\",\"physicalLocation\":\"Geneva\",\"pairedRegion\":[{\"name\":\"switzerlandnorth\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/switzerlandnorth\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/ukwest\",\"name\":\"ukwest\",\"displayName\":\"UK - West\",\"regionalDisplayName\":\"(Europe) UK West\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Other\",\"geographyGroup\":\"Europe\",\"longitude\":\"-3.084\",\"latitude\":\"53.427\",\"physicalLocation\":\"Cardiff\",\"pairedRegion\":[{\"name\":\"uksouth\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/uksouth\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/uaecentral\",\"name\":\"uaecentral\",\"displayName\":\"UAE - Central\",\"regionalDisplayName\":\"(Middle East) UAE Central\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Other\",\"geographyGroup\":\"Middle - East\",\"longitude\":\"54.366669\",\"latitude\":\"24.466667\",\"physicalLocation\":\"Abu - Dhabi\",\"pairedRegion\":[{\"name\":\"uaenorth\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/uaenorth\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/brazilsoutheast\",\"name\":\"brazilsoutheast\",\"displayName\":\"Brazil - Southeast\",\"regionalDisplayName\":\"(South America) Brazil Southeast\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Other\",\"geographyGroup\":\"South - America\",\"longitude\":\"-43.2075\",\"latitude\":\"-22.90278\",\"physicalLocation\":\"Rio\",\"pairedRegion\":[{\"name\":\"brazilsouth\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/brazilsouth\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/polandcentral\",\"name\":\"polandcentral\",\"displayName\":\"Poland - Central\",\"regionalDisplayName\":\"(Europe) Poland Central\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Other\",\"geographyGroup\":\"Europe\",\"longitude\":\"14.6512702\",\"latitude\":\"51.8685079\",\"physicalLocation\":\"Warsaw\",\"pairedRegion\":[{\"name\":\"swedencentral\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/swedencentral\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/qatarcentral\",\"name\":\"qatarcentral\",\"displayName\":\"Qatar - Central\",\"regionalDisplayName\":\"(Middle East) Qatar Central\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Other\",\"geographyGroup\":\"Middle - East\",\"longitude\":\"51.439327\",\"latitude\":\"25.551462\",\"physicalLocation\":\"Doha\",\"pairedRegion\":[{\"name\":\"westeurope\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/westeurope\"}]}}]}" - headers: - cache-control: - - no-cache - content-length: - - '30397' - content-type: - - application/json; charset=utf-8 - date: - - Wed, 20 Jul 2022 01:52:02 GMT - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: '{"location": "eastus"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - stack-hci cluster create - Connection: - - keep-alive - Content-Length: - - '22' - Content-Type: - - application/json - ParameterSetName: - - --location --name --resource-group - User-Agent: - - 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/clitest000001/providers/Microsoft.AzureStackHCI/clusters/myCluster?api-version=2022-05-01 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.AzureStackHCI/clusters/myCluster","name":"myCluster","type":"microsoft.azurestackhci/clusters","location":"eastus","systemData":{"createdBy":"v-jingszhang@microsoft.com","createdByType":"User","createdAt":"2022-07-20T01:52:09.6667871Z","lastModifiedBy":"v-jingszhang@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-07-20T01:52:09.6667871Z"},"properties":{"provisioningState":"Succeeded","status":"NotYetRegistered","cloudId":"1c4d3332-456d-4b9a-9eeb-bcb90fd8e41b","desiredProperties":{"windowsServerSubscription":"Disabled","diagnosticLevel":"Basic"},"trialDaysRemaining":60,"billingModel":"Trial","serviceEndpoint":"https://dp.stackhci.azure.com/eastus/"}}' - headers: - cache-control: - - no-cache - content-length: - - '783' - content-type: - - application/json; charset=utf-8 - date: - - Wed, 20 Jul 2022 01:52:11 GMT - etag: - - '"2c00634f-0000-0100-0000-62d75fca0000"' - expires: - - '-1' - mise-correlation-id: - - 7bfa1f20-04b0-4d10-b35e-e9b8b44b7025 - 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: - - '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 show - Connection: - - keep-alive - ParameterSetName: - - --name --resource-group - 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/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.AzureStackHCI/clusters/myCluster?api-version=2022-05-01 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.AzureStackHCI/clusters/myCluster","name":"myCluster","type":"microsoft.azurestackhci/clusters","location":"eastus","properties":{"provisioningState":"Succeeded","status":"NotYetRegistered","cloudId":"1c4d3332-456d-4b9a-9eeb-bcb90fd8e41b","desiredProperties":{"windowsServerSubscription":"Disabled","diagnosticLevel":"Basic"},"trialDaysRemaining":60,"billingModel":"Trial","serviceEndpoint":"https://dp.stackhci.azure.com/eastus/"}}' - headers: - cache-control: - - no-cache - content-length: - - '539' - content-type: - - application/json; charset=utf-8 - date: - - Wed, 20 Jul 2022 01:52:13 GMT - etag: - - '"2c00634f-0000-0100-0000-62d75fca0000"' - expires: - - '-1' - mise-correlation-id: - - 87715708-0b63-4aec-b515-a01a2f93ac22 - 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-powered-by: - - ASP.NET - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - stack-hci cluster list - Connection: - - keep-alive - ParameterSetName: - - --resource-group - 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/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.AzureStackHCI/clusters?api-version=2022-05-01 - response: - body: - string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.AzureStackHCI/clusters/myCluster","name":"myCluster","type":"microsoft.azurestackhci/clusters","location":"eastus","properties":{"provisioningState":"Succeeded","status":"NotYetRegistered","cloudId":"1c4d3332-456d-4b9a-9eeb-bcb90fd8e41b","desiredProperties":{"windowsServerSubscription":"Disabled","diagnosticLevel":"Basic"},"trialDaysRemaining":60,"billingModel":"Trial","serviceEndpoint":"https://dp.stackhci.azure.com/eastus/"}}]}' - headers: - cache-control: - - no-cache - content-length: - - '551' - content-type: - - application/json; charset=utf-8 - date: - - Wed, 20 Jul 2022 01:52:14 GMT - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-original-request-ids: - - b06ea900-6a89-4e53-9531-877e27719046 - - 38ebb04e-d242-4550-bd8f-362661a12b71 - - c3be7901-fb4b-40b6-a092-7c4a89395204 - - 0373973d-34a3-41ff-9dc8-f69d16e027ce - - af684f5b-7b4f-47be-8a83-1a57ebb78d30 - - b2b47965-9854-4f7d-9899-4ac7fda36bfa - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - stack-hci cluster list - Connection: - - keep-alive - ParameterSetName: - - -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/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.AzureStackHCI/clusters?api-version=2022-05-01 - response: - body: - string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitestbycd4lzz3e4coc777vzetrzn33jblunmjk5deejsymcetrf2dvhabkdk3h75af56vnk6/providers/Microsoft.AzureStackHCI/clusters/myCluster","name":"myCluster","type":"microsoft.azurestackhci/clusters","location":"eastus","tags":{"tag1":"value1","tag2":"value2"},"properties":{"provisioningState":"Succeeded","status":"NotYetRegistered","cloudId":"3692b051-b6f6-4ef5-946a-cf46bd9a8516","aadClientId":"017cc058-9a60-4de0-aabd-3f1f9c0fd2b7","aadTenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","aadServicePrincipalObjectId":"bd8c8844-90d9-4486-af7c-79654d426b0e","aadApplicationObjectId":"35a1e02f-df57-4d0a-8ebf-f09f85fcdf7e","desiredProperties":{"windowsServerSubscription":"Enabled","diagnosticLevel":"Basic"},"trialDaysRemaining":60,"billingModel":"Trial","serviceEndpoint":"https://dp.stackhci.azure.com/eastus/"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitestj2hqo3exocwv5dasn7k5erq5zqhrhl2lz4eqgfi6yfmetpul54yebibkejxquul5oh4a/providers/Microsoft.AzureStackHCI/clusters/myCluster","name":"myCluster","type":"microsoft.azurestackhci/clusters","location":"eastus","tags":{"tag1":"value1","tag2":"value2"},"properties":{"provisioningState":"Succeeded","status":"NotYetRegistered","cloudId":"50643ddf-a5cd-41d7-a45c-d288c63ecea6","aadClientId":"5d304473-c489-4228-8544-576e72118831","aadTenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","aadServicePrincipalObjectId":"502436e0-0691-4711-bf27-7512366b5a25","aadApplicationObjectId":"c550cafd-2311-4a2f-9582-c33f58dba4d4","desiredProperties":{"windowsServerSubscription":"Enabled","diagnosticLevel":"Basic"},"trialDaysRemaining":60,"billingModel":"Trial","serviceEndpoint":"https://dp.stackhci.azure.com/eastus/"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.AzureStackHCI/clusters/myCluster","name":"myCluster","type":"microsoft.azurestackhci/clusters","location":"eastus","properties":{"provisioningState":"Succeeded","status":"NotYetRegistered","cloudId":"1c4d3332-456d-4b9a-9eeb-bcb90fd8e41b","desiredProperties":{"windowsServerSubscription":"Disabled","diagnosticLevel":"Basic"},"trialDaysRemaining":60,"billingModel":"Trial","serviceEndpoint":"https://dp.stackhci.azure.com/eastus/"}}]}' - headers: - cache-control: - - no-cache - content-length: - - '2313' - content-type: - - application/json; charset=utf-8 - date: - - Wed, 20 Jul 2022 01:52:16 GMT - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-original-request-ids: - - 28e7f752-c959-48f7-913c-5f778f9f4e92 - - 5fe95e5e-3e4a-4226-bfb9-a151add99544 - - 7ad9fa61-592b-42fe-a40c-1be9f7ebb409 - - 16d0ab13-1df3-4f66-adf4-23b5496b8623 - - 5af0635f-fe81-4408-9fc3-262acf827024 - - db8f0b31-d21a-404b-86b5-64cb7d416e3b - status: - code: 200 - message: OK -- request: - body: '{"tags": {"tag1": "value1", "tag2": "value2"}, "properties": {"desiredProperties": - {"windowsServerSubscription": "Enabled", "diagnosticLevel": "Basic"}}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - stack-hci cluster update - Connection: - - keep-alive - Content-Length: - - '153' - Content-Type: - - application/json - ParameterSetName: - - --desired-properties --tags --name --resource-group - User-Agent: - - 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/clitest000001/providers/Microsoft.AzureStackHCI/clusters/myCluster?api-version=2022-05-01 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.AzureStackHCI/clusters/myCluster","name":"myCluster","type":"microsoft.azurestackhci/clusters","location":"eastus","tags":{"tag1":"value1","tag2":"value2"},"systemData":{"createdBy":"v-jingszhang@microsoft.com","createdByType":"User","createdAt":"2022-07-20T01:52:09.6667871Z","lastModifiedBy":"v-jingszhang@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-07-20T01:52:19.8458448Z"},"properties":{"status":"NotYetRegistered","cloudId":"1c4d3332-456d-4b9a-9eeb-bcb90fd8e41b","desiredProperties":{"windowsServerSubscription":"Enabled","diagnosticLevel":"Basic"},"trialDaysRemaining":60,"billingModel":"Trial","provisioningState":"Succeeded","serviceEndpoint":"https://dp.stackhci.azure.com/eastus/"}}' - headers: - cache-control: - - no-cache - content-length: - - '823' - content-type: - - application/json; charset=utf-8 - date: - - Wed, 20 Jul 2022 01:52:21 GMT - etag: - - '"2c002450-0000-0100-0000-62d75fd40000"' - expires: - - '-1' - mise-correlation-id: - - 6f6c50ce-2ae4-4044-8618-6eea972f1526 - 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: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - stack-hci cluster create-identity - Connection: - - keep-alive - Content-Length: - - '0' - ParameterSetName: - - --name --resource-group - 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/clitest000001/providers/Microsoft.AzureStackHCI/clusters/myCluster/createClusterIdentity?api-version=2022-05-01 - response: - body: - string: 'null' - headers: - azure-asyncoperation: - - https://management.azure.com/providers/Microsoft.AzureStackHCI/locations/EASTUS/operationStatuses/9db4fb55-caf0-4cc9-a3eb-56b28d83cf8d*90283A4681E7F4963778567E9AC5316185DA9052F98E0432D2B27CBD3521C580?api-version=2022-05-01 - cache-control: - - no-cache - content-length: - - '4' - content-type: - - application/json; charset=utf-8 - date: - - Wed, 20 Jul 2022 01:52:22 GMT - expires: - - '-1' - location: - - https://management.azure.com/providers/Microsoft.AzureStackHCI/locations/EASTUS/operationStatuses/9db4fb55-caf0-4cc9-a3eb-56b28d83cf8d*90283A4681E7F4963778567E9AC5316185DA9052F98E0432D2B27CBD3521C580?api-version=2022-05-01 - mise-correlation-id: - - ad5761c9-92f7-4832-987c-34a23ee04bc7 - 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: - - --name --resource-group - 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/9db4fb55-caf0-4cc9-a3eb-56b28d83cf8d*90283A4681E7F4963778567E9AC5316185DA9052F98E0432D2B27CBD3521C580?api-version=2022-05-01 - response: - body: - string: '{"id":"/providers/Microsoft.AzureStackHCI/locations/EASTUS/operationStatuses/9db4fb55-caf0-4cc9-a3eb-56b28d83cf8d*90283A4681E7F4963778567E9AC5316185DA9052F98E0432D2B27CBD3521C580","name":"9db4fb55-caf0-4cc9-a3eb-56b28d83cf8d*90283A4681E7F4963778567E9AC5316185DA9052F98E0432D2B27CBD3521C580","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.AzureStackHCI/clusters/myCluster","status":"Succeeded","startTime":"2022-07-20T01:52:22.8084604Z","endTime":"2022-07-20T01:52:27.3105467Z","properties":null}' - headers: - cache-control: - - no-cache - content-length: - - '563' - content-type: - - application/json; charset=utf-8 - date: - - Wed, 20 Jul 2022 01:52:52 GMT - etag: - - '"4a002019-0000-0100-0000-62d75fdb0000"' - 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 -- request: - body: '{}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - stack-hci arc-setting create - Connection: - - keep-alive - Content-Length: - - '2' - Content-Type: - - application/json - ParameterSetName: - - --name --cluster-name --resource-group - User-Agent: - - 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/clitest000001/providers/Microsoft.AzureStackHCI/clusters/myCluster/arcSettings/default?api-version=2022-05-01 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.AzureStackHCI/clusters/myCluster/arcSettings/default","name":"default","type":"microsoft.azurestackhci/clusters/arcsettings","systemData":{"createdBy":"v-jingszhang@microsoft.com","createdByType":"User","createdAt":"2022-07-20T01:52:54.2993828Z","lastModifiedBy":"v-jingszhang@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-07-20T01:52:54.2993828Z"},"properties":{"connectivityProperties":{"enabled":false},"provisioningState":"Succeeded","arcInstanceResourceGroup":"myCluster-1c4d3332-456d-4b9a-9eeb-bcb90fd8e41b-Arc-Infra-RG","aggregateState":"NotSpecified"}}' - headers: - cache-control: - - no-cache - content-length: - - '688' - content-type: - - application/json; charset=utf-8 - date: - - Wed, 20 Jul 2022 01:52:55 GMT - etag: - - '"06000515-0000-0100-0000-62d75ff70000"' - expires: - - '-1' - mise-correlation-id: - - a166c427-f637-4dbd-87fc-5d6dd3dc1a84 - 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: - - '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 show - Connection: - - keep-alive - ParameterSetName: - - --name --cluster-name --resource-group - 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/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.AzureStackHCI/clusters/myCluster/arcSettings/default?api-version=2022-05-01 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.AzureStackHCI/clusters/myCluster/arcSettings/default","name":"default","type":"microsoft.azurestackhci/clusters/arcsettings","properties":{"connectivityProperties":{"enabled":false},"provisioningState":"Succeeded","arcInstanceResourceGroup":"myCluster-1c4d3332-456d-4b9a-9eeb-bcb90fd8e41b-Arc-Infra-RG","aggregateState":"NotSpecified","perNodeDetails":[]}}' - headers: - cache-control: - - no-cache - content-length: - - '464' - content-type: - - application/json; charset=utf-8 - date: - - Wed, 20 Jul 2022 01:52:57 GMT - etag: - - '"06000515-0000-0100-0000-62d75ff70000"' - expires: - - '-1' - mise-correlation-id: - - 9d3f3888-47b1-4e9c-ac74-7d3377cf1010 - 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-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 list - Connection: - - keep-alive - ParameterSetName: - - --cluster-name --resource-group - 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/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.AzureStackHCI/clusters/myCluster/arcSettings?api-version=2022-05-01 - response: - body: - string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.AzureStackHCI/clusters/myCluster/arcSettings/default","name":"default","type":"microsoft.azurestackhci/clusters/arcsettings","properties":{"connectivityProperties":{"enabled":false},"provisioningState":"Succeeded","arcInstanceResourceGroup":"myCluster-1c4d3332-456d-4b9a-9eeb-bcb90fd8e41b-Arc-Infra-RG","aggregateState":"NotSpecified","perNodeDetails":[]}}]}' - headers: - cache-control: - - no-cache - content-length: - - '476' - content-type: - - application/json; charset=utf-8 - date: - - Wed, 20 Jul 2022 01:52:57 GMT - expires: - - '-1' - mise-correlation-id: - - ed424a4b-97a3-403a-b262-9316011a798f - 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-powered-by: - - ASP.NET - status: - code: 200 - message: OK -- request: - body: '{"properties": {"connectivityProperties": {"enabled": true}}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - stack-hci arc-setting update - Connection: - - keep-alive - Content-Length: - - '61' - Content-Type: - - application/json - ParameterSetName: - - --connectivity-properties --name --cluster-name --resource-group - User-Agent: - - 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/clitest000001/providers/Microsoft.AzureStackHCI/clusters/myCluster/arcSettings/default?api-version=2022-05-01 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.AzureStackHCI/clusters/myCluster/arcSettings/default","name":"default","type":"microsoft.azurestackhci/clusters/arcsettings","systemData":{"createdBy":"v-jingszhang@microsoft.com","createdByType":"User","createdAt":"2022-07-20T01:52:54.2993828Z","lastModifiedBy":"v-jingszhang@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-07-20T01:52:58.8262237Z"},"properties":{"connectivityProperties":{"enabled":true},"provisioningState":"Succeeded","arcInstanceResourceGroup":"myCluster-1c4d3332-456d-4b9a-9eeb-bcb90fd8e41b-Arc-Infra-RG","aggregateState":"NotSpecified"}}' - headers: - cache-control: - - no-cache - content-length: - - '687' - content-type: - - application/json; charset=utf-8 - date: - - Wed, 20 Jul 2022 01:52:59 GMT - etag: - - '"06000615-0000-0100-0000-62d75ffb0000"' - expires: - - '-1' - mise-correlation-id: - - 095f5f76-5508-4536-a71b-c2fe60ee569a - 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: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - stack-hci arc-setting create-identity - Connection: - - keep-alive - Content-Length: - - '0' - ParameterSetName: - - --name --cluster-name --resource-group - 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/clitest000001/providers/Microsoft.AzureStackHCI/clusters/myCluster/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/dc6b98f2-f591-42c5-b43e-9e655b1003d1*9EFE1DB79834CC1A33471FDD71C825A68CD98E843DBFA4137F8FFBED5EA879AF?api-version=2022-05-01 - cache-control: - - no-cache - content-length: - - '4' - content-type: - - application/json; charset=utf-8 - date: - - Wed, 20 Jul 2022 01:53:00 GMT - expires: - - '-1' - location: - - https://management.azure.com/providers/Microsoft.AzureStackHCI/locations/EASTUS/operationStatuses/dc6b98f2-f591-42c5-b43e-9e655b1003d1*9EFE1DB79834CC1A33471FDD71C825A68CD98E843DBFA4137F8FFBED5EA879AF?api-version=2022-05-01 - mise-correlation-id: - - 70b14ce7-4e80-43de-812e-672ca5b04145 - 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: - - --name --cluster-name --resource-group - 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/dc6b98f2-f591-42c5-b43e-9e655b1003d1*9EFE1DB79834CC1A33471FDD71C825A68CD98E843DBFA4137F8FFBED5EA879AF?api-version=2022-05-01 - response: - body: - string: '{"id":"/providers/Microsoft.AzureStackHCI/locations/EASTUS/operationStatuses/dc6b98f2-f591-42c5-b43e-9e655b1003d1*9EFE1DB79834CC1A33471FDD71C825A68CD98E843DBFA4137F8FFBED5EA879AF","name":"dc6b98f2-f591-42c5-b43e-9e655b1003d1*9EFE1DB79834CC1A33471FDD71C825A68CD98E843DBFA4137F8FFBED5EA879AF","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.AzureStackHCI/clusters/myCluster/arcSettings/default","status":"Succeeded","startTime":"2022-07-20T01:53:00.7389751Z","endTime":"2022-07-20T01:53:02.6240872Z","properties":null}' - headers: - cache-control: - - no-cache - content-length: - - '583' - content-type: - - application/json; charset=utf-8 - date: - - Wed, 20 Jul 2022 01:53:31 GMT - etag: - - '"4a004b19-0000-0100-0000-62d75ffe0000"' - 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 -- 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: - - --name --cluster-name --resource-group - 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/clitest000001/providers/Microsoft.AzureStackHCI/clusters/myCluster/arcSettings/default/generatePassword?api-version=2022-05-01 - response: - body: - string: '{"secretText":"qrT8Q~gbhxOpZUZjs2ImFFfnpOQPIz~_3RQFHbpj","startDateTime":"2022-07-20T01:53:33.3170953+00:00","endDateTime":"2024-07-20T01:53:33.3170954+00:00","keyId":"41bee461-c93b-4d05-8a42-58863994265c"}' - headers: - cache-control: - - no-cache - content-length: - - '206' - content-type: - - application/json; charset=utf-8 - date: - - Wed, 20 Jul 2022 01:53:32 GMT - expires: - - '-1' - mise-correlation-id: - - e66090b7-5b0b-498f-b7a7-5d7479266f24 - 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: '{"properties": {"extensionParameters": {"publisher": "Microsoft.Compute", - "type": "MicrosoftMonitoringAgent", "typeHandlerVersion": "1.10", "settings": - {"workspaceId": "xx"}, "protectedSettings": {"workspaceKey": "xx"}}}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - stack-hci extension create - Connection: - - keep-alive - Content-Length: - - '221' - Content-Type: - - application/json - ParameterSetName: - - --arc-setting-name --cluster-name --type --protected-settings --publisher - --settings --type-handler-version --name --resource-group - User-Agent: - - 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/clitest000001/providers/Microsoft.AzureStackHCI/clusters/myCluster/arcSettings/default/extensions/MicrosoftMonitoringAgent?api-version=2022-05-01 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.AzureStackHCI/clusters/myCluster/arcSettings/default/extensions/MicrosoftMonitoringAgent","name":"MicrosoftMonitoringAgent","type":"microsoft.azurestackhci/clusters/arcsettings/extensions","systemData":{"createdBy":"v-jingszhang@microsoft.com","createdByType":"User","createdAt":"2022-07-20T01:53:34.2610758Z","lastModifiedBy":"v-jingszhang@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-07-20T01:53:34.2610758Z"},"properties":{"provisioningState":"Succeeded","aggregateState":"NotSpecified","perNodeExtensionDetails":[],"extensionParameters":{"type":"MicrosoftMonitoringAgent","publisher":"Microsoft.Compute","autoUpgradeMinorVersion":false,"settings":{"workspaceId":"xx"}}}}' - headers: - cache-control: - - no-cache - content-length: - - '803' - content-type: - - application/json; charset=utf-8 - date: - - Wed, 20 Jul 2022 01:53:35 GMT - etag: - - '"0e002215-0000-0100-0000-62d7601e0000"' - expires: - - '-1' - mise-correlation-id: - - 0dd37aeb-bba2-4245-9f47-0ebb37812cb8 - 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: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - stack-hci extension show - Connection: - - keep-alive - ParameterSetName: - - --arc-setting-name --cluster-name --name --resource-group - 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/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.AzureStackHCI/clusters/myCluster/arcSettings/default/extensions/MicrosoftMonitoringAgent?api-version=2022-05-01 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.AzureStackHCI/clusters/myCluster/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: - - '559' - content-type: - - application/json; charset=utf-8 - date: - - Wed, 20 Jul 2022 01:53:36 GMT - etag: - - '"0e002215-0000-0100-0000-62d7601e0000"' - expires: - - '-1' - mise-correlation-id: - - 54726263-2629-4d89-8afd-42be50ab9d98 - 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-powered-by: - - ASP.NET - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - stack-hci extension list - Connection: - - keep-alive - ParameterSetName: - - --arc-setting-name --cluster-name --resource-group - 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/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.AzureStackHCI/clusters/myCluster/arcSettings/default/extensions?api-version=2022-05-01 - response: - body: - string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.AzureStackHCI/clusters/myCluster/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: - - '571' - content-type: - - application/json; charset=utf-8 - date: - - Wed, 20 Jul 2022 01:53:37 GMT - expires: - - '-1' - mise-correlation-id: - - 31cf709e-6480-44ac-bde7-6256271dae01 - 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-powered-by: - - ASP.NET - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - stack-hci extension delete - Connection: - - keep-alive - Content-Length: - - '0' - ParameterSetName: - - -y --arc-setting-name --cluster-name --name --resource-group - User-Agent: - - 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/clitest000001/providers/Microsoft.AzureStackHCI/clusters/myCluster/arcSettings/default/extensions/MicrosoftMonitoringAgent?api-version=2022-05-01 - response: - body: - string: '' - headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Wed, 20 Jul 2022 01:53:38 GMT - expires: - - '-1' - mise-correlation-id: - - 3d9f6ea5-2b86-4d2c-8103-861d4a88f5a5 - pragma: - - no-cache - request-context: - - appId= - strict-transport-security: - - max-age=31536000; includeSubDomains - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-providerhub-traffic: - - 'True' - x-ms-ratelimit-remaining-subscription-deletes: - - '14999' - 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 delete - Connection: - - keep-alive - Content-Length: - - '0' - ParameterSetName: - - -y --name --cluster-name --resource-group - User-Agent: - - 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/clitest000001/providers/Microsoft.AzureStackHCI/clusters/myCluster/arcSettings/default?api-version=2022-05-01 - response: - body: - string: 'null' - headers: - azure-asyncoperation: - - https://management.azure.com/providers/Microsoft.AzureStackHCI/locations/EASTUS/operationStatuses/625d3a74-b208-4620-8995-14653fe6a01a*9EFE1DB79834CC1A33471FDD71C825A68CD98E843DBFA4137F8FFBED5EA879AF?api-version=2022-05-01 - cache-control: - - no-cache - content-length: - - '4' - content-type: - - application/json; charset=utf-8 - date: - - Wed, 20 Jul 2022 01:53:39 GMT - etag: - - '"06001215-0000-0100-0000-62d760240000"' - expires: - - '-1' - location: - - https://management.azure.com/providers/Microsoft.AzureStackHCI/locations/EASTUS/operationStatuses/625d3a74-b208-4620-8995-14653fe6a01a*9EFE1DB79834CC1A33471FDD71C825A68CD98E843DBFA4137F8FFBED5EA879AF?api-version=2022-05-01 - mise-correlation-id: - - 36e9e536-6ac8-465f-b05c-f7b2172454d2 - 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-deletes: - - '14999' - x-powered-by: - - ASP.NET - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - stack-hci arc-setting delete - Connection: - - keep-alive - ParameterSetName: - - -y --name --cluster-name --resource-group - 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/625d3a74-b208-4620-8995-14653fe6a01a*9EFE1DB79834CC1A33471FDD71C825A68CD98E843DBFA4137F8FFBED5EA879AF?api-version=2022-05-01 - response: - body: - string: '{"id":"/providers/Microsoft.AzureStackHCI/locations/EASTUS/operationStatuses/625d3a74-b208-4620-8995-14653fe6a01a*9EFE1DB79834CC1A33471FDD71C825A68CD98E843DBFA4137F8FFBED5EA879AF","name":"625d3a74-b208-4620-8995-14653fe6a01a*9EFE1DB79834CC1A33471FDD71C825A68CD98E843DBFA4137F8FFBED5EA879AF","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.AzureStackHCI/clusters/myCluster/arcSettings/default","status":"Succeeded","startTime":"2022-07-20T01:53:40.1196175Z","endTime":"2022-07-20T01:53:40.7062765Z","properties":null}' - headers: - cache-control: - - no-cache - content-length: - - '583' - content-type: - - application/json; charset=utf-8 - date: - - Wed, 20 Jul 2022 01:54:09 GMT - etag: - - '"4a008519-0000-0100-0000-62d760240000"' - 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 -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - stack-hci cluster delete - Connection: - - keep-alive - Content-Length: - - '0' - ParameterSetName: - - -y --name --resource-group - User-Agent: - - 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/clitest000001/providers/Microsoft.AzureStackHCI/clusters/myCluster?api-version=2022-05-01 - response: - body: - string: 'null' - headers: - azure-asyncoperation: - - https://management.azure.com/providers/Microsoft.AzureStackHCI/locations/EASTUS/operationStatuses/21cd4c51-6eb4-46e3-ad03-23cd63d4e50a*90283A4681E7F4963778567E9AC5316185DA9052F98E0432D2B27CBD3521C580?api-version=2022-05-01 - cache-control: - - no-cache - content-length: - - '4' - content-type: - - application/json; charset=utf-8 - date: - - Wed, 20 Jul 2022 01:54:12 GMT - etag: - - '"2c00525a-0000-0100-0000-62d760440000"' - expires: - - '-1' - location: - - https://management.azure.com/providers/Microsoft.AzureStackHCI/locations/EASTUS/operationStatuses/21cd4c51-6eb4-46e3-ad03-23cd63d4e50a*90283A4681E7F4963778567E9AC5316185DA9052F98E0432D2B27CBD3521C580?api-version=2022-05-01 - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-providerhub-traffic: - - 'True' - x-ms-ratelimit-remaining-subscription-deletes: - - '14999' - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - stack-hci cluster delete - Connection: - - keep-alive - ParameterSetName: - - -y --name --resource-group - 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/21cd4c51-6eb4-46e3-ad03-23cd63d4e50a*90283A4681E7F4963778567E9AC5316185DA9052F98E0432D2B27CBD3521C580?api-version=2022-05-01 - response: - body: - string: '{"id":"/providers/Microsoft.AzureStackHCI/locations/EASTUS/operationStatuses/21cd4c51-6eb4-46e3-ad03-23cd63d4e50a*90283A4681E7F4963778567E9AC5316185DA9052F98E0432D2B27CBD3521C580","name":"21cd4c51-6eb4-46e3-ad03-23cd63d4e50a*90283A4681E7F4963778567E9AC5316185DA9052F98E0432D2B27CBD3521C580","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.AzureStackHCI/clusters/myCluster","status":"Deleting","startTime":"2022-07-20T01:54:12.3786663Z"}' - headers: - cache-control: - - no-cache - content-length: - - '503' - content-type: - - application/json; charset=utf-8 - date: - - Wed, 20 Jul 2022 01:54:43 GMT - etag: - - '"4a00ac19-0000-0100-0000-62d760440000"' - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - stack-hci cluster delete - Connection: - - keep-alive - ParameterSetName: - - -y --name --resource-group - 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/21cd4c51-6eb4-46e3-ad03-23cd63d4e50a*90283A4681E7F4963778567E9AC5316185DA9052F98E0432D2B27CBD3521C580?api-version=2022-05-01 - response: - body: - string: '{"id":"/providers/Microsoft.AzureStackHCI/locations/EASTUS/operationStatuses/21cd4c51-6eb4-46e3-ad03-23cd63d4e50a*90283A4681E7F4963778567E9AC5316185DA9052F98E0432D2B27CBD3521C580","name":"21cd4c51-6eb4-46e3-ad03-23cd63d4e50a*90283A4681E7F4963778567E9AC5316185DA9052F98E0432D2B27CBD3521C580","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.AzureStackHCI/clusters/myCluster","status":"Succeeded","startTime":"2022-07-20T01:54:12.3786663Z","properties":null}' - headers: - cache-control: - - no-cache - content-length: - - '522' - content-type: - - application/json; charset=utf-8 - date: - - Wed, 20 Jul 2022 01:55:13 GMT - etag: - - '"8500a08c-0000-0500-0000-62d760670000"' - 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 -version: 1 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 new file mode 100644 index 00000000000..53f260ebecc --- /dev/null +++ b/src/stack-hci/azext_stack_hci/tests/latest/recordings/test_stack_hci_arc_setting_crud.yaml @@ -0,0 +1,551 @@ +interactions: +- 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=startswith%28displayName%2C%27cli-test-app%27%29 + response: + body: + 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: + cache-control: + - no-cache + content-length: + - '1501' + content-type: + - application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8 + date: + - Fri, 22 Jul 2022 09:48:58 GMT + odata-version: + - '4.0' + request-id: + - 674c9ad0-8c8b-4fdd-9a70-207fc5d5cfc6 + 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":"001","RoleInstance":"SI2PEPF00002711"}}' + 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: + - Fri, 22 Jul 2022 09:48:59 GMT + odata-version: + - '4.0' + request-id: + - 66bf3c7d-f9de-4355-9bfe-3695eaeec77c + 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":"001","RoleInstance":"SI2PEPF00002716"}}' + x-ms-resource-unit: + - '2' + status: + code: 200 + message: OK +- request: + body: '{"displayName": "cli-test-app"}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - ad app create + Connection: + - keep-alive + Content-Length: + - '31' + Content-Type: + - application/json + ParameterSetName: + - --display-name + User-Agent: + - 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: + - Fri, 22 Jul 2022 09:49:01 GMT + request-id: + - 21fbce7b-4557-4bd9-a0d0-e0fc9dc1f00e + strict-transport-security: + - max-age=31536000 + x-ms-ags-diagnostic: + - '{"ServerInfo":{"DataCenter":"Southeast Asia","Slice":"E","Ring":"5","ScaleUnit":"001","RoleInstance":"SI2PEPF00001640"}}' + 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: + cache-control: + - no-cache + content-length: + - '1497' + content-type: + - application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8 + date: + - Fri, 22 Jul 2022 09:49:03 GMT + odata-version: + - '4.0' + request-id: + - ca7091f8-bb51-47c2-8a78-2b7614c6bbc4 + 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":"001","RoleInstance":"SI2PEPF000022D5"}}' + x-ms-resource-unit: + - '1' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - stack-hci cluster create + Connection: + - keep-alive + ParameterSetName: + - -n -g --aad-client-id --aad-tenant-id + User-Agent: + - 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_arc_setting000001?api-version=2021-04-01 + response: + body: + 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-22T09:48:54Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '350' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 22 Jul 2022 09:49:03 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"location": "eastus", "properties": {"aadClientId": "bb58dfe8-db67-4d3c-bbe9-fc8ac96077a5", + "aadTenantId": "54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - stack-hci cluster create + Connection: + - keep-alive + Content-Length: + - '148' + Content-Type: + - application/json + ParameterSetName: + - -n -g --aad-client-id --aad-tenant-id + User-Agent: + - 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_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_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-22T09:49:07.3145896Z","lastModifiedBy":"v-jingszhang@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-07-22T09:49:07.3145896Z"},"properties":{"provisioningState":"Succeeded","status":"NotYetRegistered","cloudId":"9b5698fb-daef-4e94-a7ca-875a2e42b2c2","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: + - '926' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 22 Jul 2022 09:49:08 GMT + etag: + - '"00009a39-0000-0100-0000-62da72930000"' + expires: + - '-1' + mise-correlation-id: + - 84f8967d-1325-4314-bca8-c60cb37b3cfa + 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: + - '1198' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: '{}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - stack-hci arc-setting create + Connection: + - keep-alive + Content-Length: + - '2' + Content-Type: + - application/json + ParameterSetName: + - -n -g --cluster-name + User-Agent: + - 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_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_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-22T09:49:09.6649195Z","lastModifiedBy":"v-jingszhang@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-07-22T09:49:09.6649195Z"},"properties":{"connectivityProperties":{"enabled":false},"provisioningState":"Succeeded","arcInstanceResourceGroup":"cli-test-cluster-9b5698fb-daef-4e94-a7ca-875a2e42b2c2-Arc-Infra-RG","aggregateState":"NotSpecified"}}' + headers: + cache-control: + - no-cache + content-length: + - '725' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 22 Jul 2022 09:49:11 GMT + etag: + - '"00001f33-0000-0100-0000-62da72970000"' + expires: + - '-1' + mise-correlation-id: + - 9f05d72b-14c9-4abd-ad88-bece4646dc58 + 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: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - stack-hci arc-setting list + Connection: + - keep-alive + ParameterSetName: + - -g --cluster-name + 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/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_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-9b5698fb-daef-4e94-a7ca-875a2e42b2c2-Arc-Infra-RG","aggregateState":"NotSpecified","perNodeDetails":[]}}]}' + headers: + cache-control: + - no-cache + content-length: + - '513' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 22 Jul 2022 09:49:12 GMT + expires: + - '-1' + mise-correlation-id: + - 0c2e2870-5814-472a-b0a2-df9ca1e646f8 + pragma: + - no-cache + request-context: + - appId= + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + 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 show + Connection: + - keep-alive + ParameterSetName: + - -n -g --cluster-name + 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/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_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-9b5698fb-daef-4e94-a7ca-875a2e42b2c2-Arc-Infra-RG","aggregateState":"NotSpecified","perNodeDetails":[]}}' + headers: + cache-control: + - no-cache + content-length: + - '501' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 22 Jul 2022 09:49:14 GMT + etag: + - '"00001f33-0000-0100-0000-62da72970000"' + expires: + - '-1' + mise-correlation-id: + - 03966002-bd02-4a9d-8d3d-9001f2698ee5 + pragma: + - no-cache + request-context: + - appId= + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + 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 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/hcitest/providers/Microsoft.AzureStackHCI/clusters/cst1/arcSettings/default/generatePassword?api-version=2022-05-01 + response: + body: + string: '{"secretText":"z_m8Q~VSoHq~CUWXzUZyDjSY5CRx9Cdy9ZzYwbzb","startDateTime":"2022-07-22T09:49:15.3709378+00:00","endDateTime":"2024-07-22T09:49:15.3709378+00:00","keyId":"9aaf6c33-cc60-4dba-b0ab-2e38114a21c2"}' + headers: + cache-control: + - no-cache + content-length: + - '206' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 22 Jul 2022 09:49:15 GMT + expires: + - '-1' + mise-correlation-id: + - 0e69a634-9259-4ca1-a077-d0348d46098e + 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: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - stack-hci arc-setting delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -n -g --cluster-name --no-wait --yes + User-Agent: + - 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_arc_setting000001/providers/Microsoft.AzureStackHCI/clusters/cli-test-cluster/arcSettings/default?api-version=2022-05-01 + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Fri, 22 Jul 2022 09:49:16 GMT + expires: + - '-1' + mise-correlation-id: + - 05ca50cf-9c01-40ea-84b7-35c96c0ffe92 + 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-deletes: + - '14999' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +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 new file mode 100644 index 00000000000..1e381deb884 --- /dev/null +++ b/src/stack-hci/azext_stack_hci/tests/latest/recordings/test_stack_hci_cluster_crud.yaml @@ -0,0 +1,544 @@ +interactions: +- 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=startswith%28displayName%2C%27cli-test-app%27%29 + response: + body: + 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: + cache-control: + - no-cache + content-length: + - '1501' + content-type: + - application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8 + date: + - Fri, 22 Jul 2022 09:50:51 GMT + odata-version: + - '4.0' + request-id: + - 2016f3b3-18eb-4234-8bcd-0ba68f3648e4 + 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":"SI1PEPF00008131"}}' + 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: + - Fri, 22 Jul 2022 09:50:52 GMT + odata-version: + - '4.0' + request-id: + - ddedacf7-349e-4010-88dd-49ea7839a08e + 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: '{"displayName": "cli-test-app"}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - ad app create + Connection: + - keep-alive + Content-Length: + - '31' + Content-Type: + - application/json + ParameterSetName: + - --display-name + User-Agent: + - 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: + - Fri, 22 Jul 2022 09:50:53 GMT + request-id: + - 8a4201a4-d081-4ae5-b58f-1563e448870a + strict-transport-security: + - max-age=31536000 + x-ms-ags-diagnostic: + - '{"ServerInfo":{"DataCenter":"Southeast Asia","Slice":"E","Ring":"5","ScaleUnit":"000","RoleInstance":"SI1PEPF000090BF"}}' + 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: + cache-control: + - no-cache + content-length: + - '1497' + content-type: + - application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8 + date: + - Fri, 22 Jul 2022 09:50:53 GMT + odata-version: + - '4.0' + request-id: + - 58335891-1b19-4098-a806-c81f2bc6bd45 + 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":"SI1PEPF00008131"}}' + x-ms-resource-unit: + - '1' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - stack-hci cluster create + Connection: + - keep-alive + ParameterSetName: + - -n -g --aad-client-id --aad-tenant-id --tags + User-Agent: + - 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_cluster000001?api-version=2021-04-01 + response: + body: + 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-22T09:50:48Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '342' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 22 Jul 2022 09:50:54 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"tags": {"key0": "value0"}, "location": "eastus", "properties": {"aadClientId": + "bb58dfe8-db67-4d3c-bbe9-fc8ac96077a5", "aadTenantId": "54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - stack-hci cluster create + Connection: + - keep-alive + Content-Length: + - '176' + Content-Type: + - application/json + ParameterSetName: + - -n -g --aad-client-id --aad-tenant-id --tags + User-Agent: + - 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_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_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-22T09:50:59.0654797Z","lastModifiedBy":"v-jingszhang@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-07-22T09:50:59.0654797Z"},"properties":{"provisioningState":"Succeeded","status":"NotYetRegistered","cloudId":"3145e590-7c6b-4f4f-a895-a66873df0863","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: + - '947' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 22 Jul 2022 09:51:01 GMT + etag: + - '"0000a039-0000-0100-0000-62da73030000"' + expires: + - '-1' + mise-correlation-id: + - 246b5dc3-4898-4823-aeb3-f75e78126fcc + 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: + - '1197' + 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 list + Connection: + - keep-alive + ParameterSetName: + - -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/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_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":"3145e590-7c6b-4f4f-a895-a66873df0863","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: + - '715' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 22 Jul 2022 09:51:03 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-original-request-ids: + - f8475cbe-ba36-49f2-be35-1d8f1c043434 + - b060cb83-dab0-49ef-ac28-946d1ab28197 + - d246afd1-caa6-4eb2-9b51-ccc9cfb87040 + - b5306281-39c5-4652-9f78-894291ca4f76 + - 7fdd0d54-10f0-4f15-a49e-f1dad3efff2f + - a8a0160e-50f7-4c20-bdf8-9abf42562ee4 + status: + code: 200 + message: OK +- request: + body: '{"tags": {"key0": "value1"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - stack-hci cluster update + Connection: + - keep-alive + Content-Length: + - '28' + Content-Type: + - application/json + ParameterSetName: + - -n -g --tags + User-Agent: + - 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_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_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-22T09:50:59.0654797Z","lastModifiedBy":"v-jingszhang@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-07-22T09:51:05.6585143Z"},"properties":{"status":"NotYetRegistered","cloudId":"3145e590-7c6b-4f4f-a895-a66873df0863","aadClientId":"bb58dfe8-db67-4d3c-bbe9-fc8ac96077a5","aadTenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","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: + - '947' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 22 Jul 2022 09:51:08 GMT + etag: + - '"0000a139-0000-0100-0000-62da73090000"' + expires: + - '-1' + mise-correlation-id: + - 0be9a073-b332-4c74-8a5b-36e98c9f02f0 + 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: + - '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 show + Connection: + - keep-alive + ParameterSetName: + - -n -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/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_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":"3145e590-7c6b-4f4f-a895-a66873df0863","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: + - '703' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 22 Jul 2022 09:51:09 GMT + etag: + - '"0000a139-0000-0100-0000-62da73090000"' + expires: + - '-1' + mise-correlation-id: + - c0989a81-a1d5-4bb0-84f6-71b32f2a1f6e + 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-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - stack-hci cluster delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -n -g --yes + User-Agent: + - 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_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/7cefdf6b-9613-48ed-a1c0-21e78b41a423*8F74E26F3C5964677D30BB1FB20F01DB59704EA62B8AE7FF8AA4ED1E2F0F2440?api-version=2022-05-01 + cache-control: + - no-cache + content-length: + - '4' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 22 Jul 2022 09:51:10 GMT + etag: + - '"0000a239-0000-0100-0000-62da730f0000"' + expires: + - '-1' + location: + - https://management.azure.com/providers/Microsoft.AzureStackHCI/locations/EASTUS/operationStatuses/7cefdf6b-9613-48ed-a1c0-21e78b41a423*8F74E26F3C5964677D30BB1FB20F01DB59704EA62B8AE7FF8AA4ED1E2F0F2440?api-version=2022-05-01 + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - stack-hci cluster delete + Connection: + - keep-alive + ParameterSetName: + - -n -g --yes + 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/7cefdf6b-9613-48ed-a1c0-21e78b41a423*8F74E26F3C5964677D30BB1FB20F01DB59704EA62B8AE7FF8AA4ED1E2F0F2440?api-version=2022-05-01 + response: + body: + string: '{"id":"/providers/Microsoft.AzureStackHCI/locations/EASTUS/operationStatuses/7cefdf6b-9613-48ed-a1c0-21e78b41a423*8F74E26F3C5964677D30BB1FB20F01DB59704EA62B8AE7FF8AA4ED1E2F0F2440","name":"7cefdf6b-9613-48ed-a1c0-21e78b41a423*8F74E26F3C5964677D30BB1FB20F01DB59704EA62B8AE7FF8AA4ED1E2F0F2440","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-22T09:51:11.071311Z","properties":null}' + headers: + cache-control: + - no-cache + content-length: + - '547' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 22 Jul 2022 09:51:41 GMT + etag: + - '"9500a777-0000-0500-0000-62da73230000"' + 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 +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 new file mode 100644 index 00000000000..a0632c1b9ce --- /dev/null +++ b/src/stack-hci/azext_stack_hci/tests/latest/recordings/test_stack_hci_extension_crud.yaml @@ -0,0 +1,560 @@ +interactions: +- 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=startswith%28displayName%2C%27cli-test-app%27%29 + response: + body: + 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: + cache-control: + - no-cache + content-length: + - '1501' + content-type: + - application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8 + date: + - Fri, 22 Jul 2022 09:50:11 GMT + odata-version: + - '4.0' + request-id: + - a4a83ee6-008a-4bca-8150-65e0fd5aa4a8 + 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":"SI1PEPF000090C3"}}' + 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: + - Fri, 22 Jul 2022 09:50:13 GMT + odata-version: + - '4.0' + request-id: + - 8b15cf8b-e0be-4429-8eff-60a0d0a78efa + 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":"SI1PEPF00001A30"}}' + x-ms-resource-unit: + - '2' + status: + code: 200 + message: OK +- request: + body: '{"displayName": "cli-test-app"}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - ad app create + Connection: + - keep-alive + Content-Length: + - '31' + Content-Type: + - application/json + ParameterSetName: + - --display-name + User-Agent: + - 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: + - Fri, 22 Jul 2022 09:50:14 GMT + request-id: + - 91862385-7641-4e64-bb60-3c3a8f67ff83 + strict-transport-security: + - max-age=31536000 + x-ms-ags-diagnostic: + - '{"ServerInfo":{"DataCenter":"Southeast Asia","Slice":"E","Ring":"5","ScaleUnit":"000","RoleInstance":"SI1PEPF00001A46"}}' + 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: + cache-control: + - no-cache + content-length: + - '1497' + content-type: + - application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8 + date: + - Fri, 22 Jul 2022 09:50:16 GMT + odata-version: + - '4.0' + request-id: + - c78bfcff-6cb6-40de-8e83-0825d6529915 + 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":"SI1PEPF0000657B"}}' + x-ms-resource-unit: + - '1' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - stack-hci cluster create + Connection: + - keep-alive + ParameterSetName: + - -n -g --aad-client-id --aad-tenant-id + User-Agent: + - 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_extension000001?api-version=2021-04-01 + response: + body: + 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: + - '346' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 22 Jul 2022 09:50:17 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"location": "eastus", "properties": {"aadClientId": "bb58dfe8-db67-4d3c-bbe9-fc8ac96077a5", + "aadTenantId": "54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - stack-hci cluster create + Connection: + - keep-alive + Content-Length: + - '148' + Content-Type: + - application/json + ParameterSetName: + - -n -g --aad-client-id --aad-tenant-id + User-Agent: + - 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_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_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: + - '924' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 22 Jul 2022 09:50:23 GMT + etag: + - '"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 + vary: + - 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: '{}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - stack-hci arc-setting create + Connection: + - keep-alive + Content-Length: + - '2' + Content-Type: + - application/json + ParameterSetName: + - -n -g --cluster-name + User-Agent: + - 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_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_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: + - '723' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 22 Jul 2022 09:50:25 GMT + etag: + - '"00002133-0000-0100-0000-62da72e10000"' + expires: + - '-1' + mise-correlation-id: + - 85ca8e0c-38a7-4076-afe5-869b5cb57776 + 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: '{"properties": {"extensionParameters": {"publisher": "Microsoft.Compute", + "type": "MicrosoftMonitoringAgent", "typeHandlerVersion": "1.10", "settings": + {"workspaceId": "xx"}, "protectedSettings": {"workspaceKey": "xx"}}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - stack-hci extension create + Connection: + - keep-alive + Content-Length: + - '221' + Content-Type: + - application/json + ParameterSetName: + - -n -g --cluster-name --arc-setting-name --settings --protected-settings --publisher + --type --type-handler-version + User-Agent: + - 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_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_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: + - '831' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 22 Jul 2022 09:50:27 GMT + etag: + - '"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 + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + 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 extension list + Connection: + - keep-alive + ParameterSetName: + - -g --cluster-name --arc-setting-name + 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/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_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: + - '599' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 22 Jul 2022 09:50:28 GMT + expires: + - '-1' + mise-correlation-id: + - 93796055-339a-4d3a-a783-957a1aa136f7 + 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-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - stack-hci extension show + Connection: + - keep-alive + ParameterSetName: + - -n -g --cluster-name --arc-setting-name + 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/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_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: + - '587' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 22 Jul 2022 09:50:29 GMT + etag: + - '"00003b00-0000-0100-0000-62da72e30000"' + expires: + - '-1' + mise-correlation-id: + - 817b2d15-b258-48eb-a51d-fcfe1e4afde6 + 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-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - stack-hci extension delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -n -g --cluster-name --arc-setting-name --no-wait --yes + User-Agent: + - 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_extension000001/providers/Microsoft.AzureStackHCI/clusters/cli-test-cluster/arcSettings/default/extensions/MicrosoftMonitoringAgent?api-version=2022-05-01 + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Fri, 22 Jul 2022 09:50:30 GMT + expires: + - '-1' + mise-correlation-id: + - 20c9b35f-d318-4dc4-95a6-dee1e03fb63a + pragma: + - no-cache + request-context: + - appId= + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +version: 1 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 new file mode 100644 index 00000000000..6297d2bbe0c --- /dev/null +++ b/src/stack-hci/azext_stack_hci/tests/latest/test_stack_hci_commands.py @@ -0,0 +1,98 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +# pylint: disable=line-too-long +# pylint: disable=too-many-lines + +import json + +from azure.cli.testsdk import ( + ResourceGroupPreparer, + ScenarioTest +) + + +class StackHciClientTest(ScenarioTest): + @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', + 'app_name': 'cli-test-app' + }) + 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 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 delete -n {cluster_name} -g {rg} --yes') + + @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', + 'app_name': 'cli-test-app' + }) + 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}') + + 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 generate-password -n default --cluster-name cst1 -g hcitest', 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_extension', location='eastus') + def test_stack_hci_extension_crud(self): + self.kwargs.update({ + 'cluster_name': 'cli-test-cluster', + 'app_name': 'cli-test-app', + 'type': 'MicrosoftMonitoringAgent', + 'publisher': 'Microsoft.Compute' + }) + 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}') + self.cmd('stack-hci arc-setting create -n default -g {rg} --cluster-name {cluster_name}') + + 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 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/tests/latest/test_stack_hci_scenario.py b/src/stack-hci/azext_stack_hci/tests/latest/test_stack_hci_scenario.py deleted file mode 100644 index 40b46fa7937..00000000000 --- a/src/stack-hci/azext_stack_hci/tests/latest/test_stack_hci_scenario.py +++ /dev/null @@ -1,125 +0,0 @@ -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import os -from azure.cli.testsdk import ScenarioTest -from azure.cli.testsdk import ResourceGroupPreparer -from .example_steps import step_cluster_create -from .example_steps import step_cluster_show -from .example_steps import step_cluster_list -from .example_steps import step_cluster_list2 -from .example_steps import step_cluster_update -from .example_steps import step_cluster_create_identity -from .example_steps import step_arc_setting_create -from .example_steps import step_arc_setting_show -from .example_steps import step_arc_setting_list -from .example_steps import step_arc_setting_update -from .example_steps import step_arc_setting_create_identity -from .example_steps import step_arc_setting_generate_password -from .example_steps import step_extension_create -from .example_steps import step_extension_show -from .example_steps import step_extension_list -from .example_steps import step_extension_delete -from .example_steps import step_arc_setting_delete -from .example_steps import step_cluster_delete -from .. import ( - try_manual, - raise_if, - calc_coverage -) - - -TEST_DIR = os.path.abspath(os.path.join(os.path.abspath(__file__), '..')) - - -# Env setup_scenario -@try_manual -def setup_scenario(test): - pass - - -# Env cleanup_scenario -@try_manual -def cleanup_scenario(test): - pass - - -# Testcase: Scenario -@try_manual -def call_scenario(test): - setup_scenario(test) - step_cluster_create(test, checks=[ - test.check("location", "eastus", case_sensitive=False), - test.check("name", "{myCluster}", case_sensitive=False), - ]) - step_cluster_show(test, checks=[ - test.check("location", "eastus", case_sensitive=False), - test.check("name", "{myCluster}", case_sensitive=False), - ]) - step_cluster_list(test, checks=[ - test.check('length(@)', 1), - ]) - step_cluster_list2(test, checks=[ - test.exists('@'), - ]) - step_cluster_update(test, checks=[ - test.check("location", "eastus", case_sensitive=False), - test.check("name", "{myCluster}", case_sensitive=False), - test.check("desiredProperties.diagnosticLevel", "Basic", case_sensitive=False), - test.check("desiredProperties.windowsServerSubscription", "Enabled", case_sensitive=False), - test.check("tags.tag1", "value1", case_sensitive=False), - test.check("tags.tag2", "value2", case_sensitive=False), - ]) - step_cluster_create_identity(test, checks=[]) - step_arc_setting_create(test, checks=[]) - step_arc_setting_show(test, checks=[]) - step_arc_setting_list(test, checks=[ - test.check('length(@)', 1), - ]) - step_arc_setting_update(test, checks=[ - test.check("connectivityProperties.enabled", True), - ]) - step_arc_setting_create_identity(test, checks=[]) - step_arc_setting_generate_password(test, checks=[]) - step_extension_create(test, checks=[ - test.check("publisher", "Microsoft.Compute", case_sensitive=False), - test.check("settings.workspaceId", "xx", case_sensitive=False), - test.check("name", "{myExtension}", case_sensitive=False), - ]) - step_extension_show(test, checks=[ - test.check("publisher", "Microsoft.Compute", case_sensitive=False), - test.check("settings.workspaceId", "xx", case_sensitive=False), - test.check("name", "{myExtension}", case_sensitive=False), - ]) - step_extension_list(test, checks=[ - test.check('length(@)', 1), - ]) - step_extension_delete(test, checks=[]) - step_arc_setting_delete(test, checks=[]) - step_cluster_delete(test, checks=[]) - cleanup_scenario(test) - - -# Test class for Scenario -@try_manual -class Stack_hciScenarioTest(ScenarioTest): - def __init__(self, *args, **kwargs): - super(Stack_hciScenarioTest, self).__init__(*args, **kwargs) - self.kwargs.update({ - 'myCluster': 'myCluster', - 'myArcSetting': 'default', - 'myExtension': 'MicrosoftMonitoringAgent', - }) - - @ResourceGroupPreparer(name_prefix='cliteststack_hci_test-rg'[:7], key='rg', parameter_name='rg') - def test_stack_hci_Scenario(self, rg): - call_scenario(self) - calc_coverage(__file__) - raise_if() From 2a731d29c0576b5c6abea75b8baa8fb4ea288230 Mon Sep 17 00:00:00 2001 From: songlu <442586197@qq.com> Date: Mon, 25 Jul 2022 10:44:04 +0800 Subject: [PATCH 3/4] update --- src/stack-hci/README.md | 6 +--- .../azext_stack_hci/generated/_help.py | 15 ---------- .../azext_stack_hci/generated/_params.py | 11 +------ .../azext_stack_hci/generated/action.py | 30 ------------------- 4 files changed, 2 insertions(+), 60 deletions(-) diff --git a/src/stack-hci/README.md b/src/stack-hci/README.md index 6bbc5cee047..7a47abbfc01 100644 --- a/src/stack-hci/README.md +++ b/src/stack-hci/README.md @@ -64,11 +64,7 @@ az stack-hci cluster update --endpoint "https://98294836-31be-4668-aeae-698667fa ``` az stack-hci cluster create-identity --name "myCluster" --resource-group "test-rg" ``` -##### Upload-certificate ##### -``` -az stack-hci cluster upload-certificate --name "myCluster" --resource-group "test-rg" \ - --properties certificates="base64cert" certificates="base64cert" -``` + ##### Delete ##### ``` az stack-hci cluster delete --name "myCluster" --resource-group "test-rg" diff --git a/src/stack-hci/azext_stack_hci/generated/_help.py b/src/stack-hci/azext_stack_hci/generated/_help.py index 8bae1d6097d..9b51df8ed64 100644 --- a/src/stack-hci/azext_stack_hci/generated/_help.py +++ b/src/stack-hci/azext_stack_hci/generated/_help.py @@ -184,21 +184,6 @@ az stack-hci cluster create-identity --name "myCluster" --resource-group "test-rg" """ -helps['stack-hci cluster upload-certificate'] = """ - type: command - short-summary: "Upload certificate." - parameters: - - name: --properties - long-summary: | - Usage: --properties certificates=XX - - examples: - - name: Upload certificate - text: |- - az stack-hci cluster upload-certificate --name "myCluster" --resource-group "test-rg" --properties \ -certificates="base64cert" certificates="base64cert" -""" - 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. diff --git a/src/stack-hci/azext_stack_hci/generated/_params.py b/src/stack-hci/azext_stack_hci/generated/_params.py index 7bb803946e2..aa9e628e26f 100644 --- a/src/stack-hci/azext_stack_hci/generated/_params.py +++ b/src/stack-hci/azext_stack_hci/generated/_params.py @@ -21,10 +21,7 @@ get_default_location_from_resource_group, validate_file_or_dict ) -from azext_stack_hci.action import ( - AddDesiredProperties, - AddProperties -) +from azext_stack_hci.action import AddDesiredProperties def load_arguments(self, _): @@ -152,12 +149,6 @@ def load_arguments(self, _): 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 upload-certificate') 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') - c.argument('certificates', nargs='+', help='Certificates') - 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 ' diff --git a/src/stack-hci/azext_stack_hci/generated/action.py b/src/stack-hci/azext_stack_hci/generated/action.py index 42aab6f381c..38d679a5ccc 100644 --- a/src/stack-hci/azext_stack_hci/generated/action.py +++ b/src/stack-hci/azext_stack_hci/generated/action.py @@ -50,33 +50,3 @@ def get_action(self, values, option_string): ) return d - - -class AddProperties(argparse.Action): - def __call__(self, parser, namespace, values, option_string=None): - action = self.get_action(values, option_string) - namespace.properties = action - - def get_action(self, values, option_string): - try: - properties = defaultdict(list) - for (k, v) in (x.split('=', 1) for x in values): - properties[k].append(v) - properties = dict(properties) - except ValueError: - raise CLIError('usage error: {} [KEY=VALUE ...]'.format(option_string)) - d = {} - for k in properties: - kl = k.lower() - v = properties[k] - - if kl == 'certificates': - d['certificates'] = v - - else: - raise CLIError( - 'Unsupported Key {} is provided for parameter properties. All possible keys are: certificates' - .format(k) - ) - - return d From 729a778003b5b4a24ed17d49c947f0c208e9fea5 Mon Sep 17 00:00:00 2001 From: songlu <442586197@qq.com> Date: Tue, 26 Jul 2022 12:00:45 +0800 Subject: [PATCH 4/4] update history note --- src/stack-hci/HISTORY.rst | 4 + .../test_stack_hci_arc_setting_crud.yaml | 202 +++++++++++---- .../test_stack_hci_cluster_crud.yaml | 238 ++++++++++++++---- .../tests/latest/test_stack_hci_commands.py | 6 +- 4 files changed, 358 insertions(+), 92 deletions(-) diff --git a/src/stack-hci/HISTORY.rst b/src/stack-hci/HISTORY.rst index 3dfa72be226..7552bc96719 100644 --- a/src/stack-hci/HISTORY.rst +++ b/src/stack-hci/HISTORY.rst @@ -6,6 +6,10 @@ 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 ++++++ 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 53f260ebecc..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 @@ -27,11 +27,11 @@ interactions: content-type: - application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8 date: - - Fri, 22 Jul 2022 09:48:58 GMT + - Tue, 26 Jul 2022 03:56:40 GMT odata-version: - '4.0' request-id: - - 674c9ad0-8c8b-4fdd-9a70-207fc5d5cfc6 + - cba607e5-e021-445d-9788-a13528a1003d strict-transport-security: - max-age=31536000 transfer-encoding: @@ -39,7 +39,7 @@ interactions: vary: - Accept-Encoding x-ms-ags-diagnostic: - - '{"ServerInfo":{"DataCenter":"Southeast Asia","Slice":"E","Ring":"5","ScaleUnit":"001","RoleInstance":"SI2PEPF00002711"}}' + - '{"ServerInfo":{"DataCenter":"Southeast Asia","Slice":"E","Ring":"5","ScaleUnit":"002","RoleInstance":"SG1PEPF000037E8"}}' x-ms-resource-unit: - '2' status: @@ -73,11 +73,11 @@ interactions: content-type: - application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8 date: - - Fri, 22 Jul 2022 09:48:59 GMT + - Tue, 26 Jul 2022 03:56:40 GMT odata-version: - '4.0' request-id: - - 66bf3c7d-f9de-4355-9bfe-3695eaeec77c + - 482a5e9e-5af0-4804-b777-bc89760eba37 strict-transport-security: - max-age=31536000 transfer-encoding: @@ -85,7 +85,7 @@ interactions: vary: - Accept-Encoding x-ms-ags-diagnostic: - - '{"ServerInfo":{"DataCenter":"Southeast Asia","Slice":"E","Ring":"5","ScaleUnit":"001","RoleInstance":"SI2PEPF00002716"}}' + - '{"ServerInfo":{"DataCenter":"Southeast Asia","Slice":"E","Ring":"5","ScaleUnit":"002","RoleInstance":"SG1PEPF000037E5"}}' x-ms-resource-unit: - '2' status: @@ -119,13 +119,13 @@ interactions: cache-control: - no-cache date: - - Fri, 22 Jul 2022 09:49:01 GMT + - Tue, 26 Jul 2022 03:56:42 GMT request-id: - - 21fbce7b-4557-4bd9-a0d0-e0fc9dc1f00e + - 327a1339-9d4f-4add-8750-21556afe65fa strict-transport-security: - max-age=31536000 x-ms-ags-diagnostic: - - '{"ServerInfo":{"DataCenter":"Southeast Asia","Slice":"E","Ring":"5","ScaleUnit":"001","RoleInstance":"SI2PEPF00001640"}}' + - '{"ServerInfo":{"DataCenter":"Southeast Asia","Slice":"E","Ring":"5","ScaleUnit":"002","RoleInstance":"SG1PEPF00001302"}}' x-ms-resource-unit: - '1' status: @@ -159,11 +159,11 @@ interactions: content-type: - application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8 date: - - Fri, 22 Jul 2022 09:49:03 GMT + - Tue, 26 Jul 2022 03:56:43 GMT odata-version: - '4.0' request-id: - - ca7091f8-bb51-47c2-8a78-2b7614c6bbc4 + - 09ace384-867a-4fbc-b8c5-afa259035435 strict-transport-security: - max-age=31536000 transfer-encoding: @@ -171,7 +171,7 @@ interactions: vary: - Accept-Encoding x-ms-ags-diagnostic: - - '{"ServerInfo":{"DataCenter":"Southeast Asia","Slice":"E","Ring":"5","ScaleUnit":"001","RoleInstance":"SI2PEPF000022D5"}}' + - '{"ServerInfo":{"DataCenter":"Southeast Asia","Slice":"E","Ring":"5","ScaleUnit":"002","RoleInstance":"SG1PEPF0000252C"}}' x-ms-resource-unit: - '1' status: @@ -196,7 +196,7 @@ interactions: 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_arc_setting000001","name":"cli_test_stack_hci_arc_setting000001","type":"Microsoft.Resources/resourceGroups","location":"eastus","tags":{"product":"azurecli","cause":"automation","date":"2022-07-22T09:48:54Z"},"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 @@ -205,7 +205,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 22 Jul 2022 09:49:03 GMT + - Tue, 26 Jul 2022 03:56:43 GMT expires: - '-1' pragma: @@ -243,7 +243,7 @@ interactions: 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_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-22T09:49:07.3145896Z","lastModifiedBy":"v-jingszhang@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-07-22T09:49:07.3145896Z"},"properties":{"provisioningState":"Succeeded","status":"NotYetRegistered","cloudId":"9b5698fb-daef-4e94-a7ca-875a2e42b2c2","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/"}}' + 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 @@ -252,13 +252,13 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 22 Jul 2022 09:49:08 GMT + - Tue, 26 Jul 2022 03:56:49 GMT etag: - - '"00009a39-0000-0100-0000-62da72930000"' + - '"0000c888-0000-0100-0000-62df66000000"' expires: - '-1' mise-correlation-id: - - 84f8967d-1325-4314-bca8-c60cb37b3cfa + - f8cf1302-7dec-4fab-b457-33fa202780e6 pragma: - no-cache request-context: @@ -274,7 +274,7 @@ interactions: x-ms-providerhub-traffic: - 'True' x-ms-ratelimit-remaining-subscription-writes: - - '1198' + - '1199' x-powered-by: - ASP.NET status: @@ -303,7 +303,7 @@ interactions: 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_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-22T09:49:09.6649195Z","lastModifiedBy":"v-jingszhang@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-07-22T09:49:09.6649195Z"},"properties":{"connectivityProperties":{"enabled":false},"provisioningState":"Succeeded","arcInstanceResourceGroup":"cli-test-cluster-9b5698fb-daef-4e94-a7ca-875a2e42b2c2-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 @@ -312,13 +312,13 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 22 Jul 2022 09:49:11 GMT + - Tue, 26 Jul 2022 03:56:52 GMT etag: - - '"00001f33-0000-0100-0000-62da72970000"' + - '"00009c80-0000-0100-0000-62df66040000"' expires: - '-1' mise-correlation-id: - - 9f05d72b-14c9-4abd-ad88-bece4646dc58 + - df2e18bf-a4ea-4754-a9ab-77210bc9200f pragma: - no-cache request-context: @@ -334,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 @@ -359,28 +461,30 @@ interactions: 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_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-9b5698fb-daef-4e94-a7ca-875a2e42b2c2-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: - - '513' + - '774' content-type: - application/json; charset=utf-8 date: - - Fri, 22 Jul 2022 09:49:12 GMT + - Tue, 26 Jul 2022 03:57:25 GMT expires: - '-1' mise-correlation-id: - - 0c2e2870-5814-472a-b0a2-df9ca1e646f8 + - cfce07b3-7e1b-4b2a-a9b1-a7cc81c7c5f4 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: @@ -409,30 +513,32 @@ interactions: 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_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-9b5698fb-daef-4e94-a7ca-875a2e42b2c2-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: - - '501' + - '762' content-type: - application/json; charset=utf-8 date: - - Fri, 22 Jul 2022 09:49:14 GMT + - Tue, 26 Jul 2022 03:57:25 GMT etag: - - '"00001f33-0000-0100-0000-62da72970000"' + - '"00009f80-0000-0100-0000-62df660c0000"' expires: - '-1' mise-correlation-id: - - 03966002-bd02-4a9d-8d3d-9001f2698ee5 + - f63eca11-3b58-4f1a-88e0-c0f1b157d91e 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: @@ -460,10 +566,10 @@ interactions: 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/hcitest/providers/Microsoft.AzureStackHCI/clusters/cst1/arcSettings/default/generatePassword?api-version=2022-05-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/generatePassword?api-version=2022-05-01 response: body: - string: '{"secretText":"z_m8Q~VSoHq~CUWXzUZyDjSY5CRx9Cdy9ZzYwbzb","startDateTime":"2022-07-22T09:49:15.3709378+00:00","endDateTime":"2024-07-22T09:49:15.3709378+00:00","keyId":"9aaf6c33-cc60-4dba-b0ab-2e38114a21c2"}' + 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 @@ -472,11 +578,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 22 Jul 2022 09:49:15 GMT + - Tue, 26 Jul 2022 03:57:26 GMT expires: - '-1' mise-correlation-id: - - 0e69a634-9259-4ca1-a077-d0348d46098e + - d6baa3e1-8612-4ddb-bc15-e31748125631 pragma: - no-cache request-context: @@ -519,18 +625,26 @@ interactions: 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: - - Fri, 22 Jul 2022 09:49:16 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: - - 05ca50cf-9c01-40ea-84b7-35c96c0ffe92 + - e069eaa5-53ac-4731-af10-5ad067d4724f pragma: - no-cache request-context: @@ -546,6 +660,6 @@ interactions: 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 1e381deb884..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 @@ -27,11 +27,11 @@ interactions: content-type: - application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8 date: - - Fri, 22 Jul 2022 09:50:51 GMT + - Tue, 26 Jul 2022 03:47:35 GMT odata-version: - '4.0' request-id: - - 2016f3b3-18eb-4234-8bcd-0ba68f3648e4 + - b0b2ced4-69f2-4eff-89bb-9cf6f58bf54f strict-transport-security: - max-age=31536000 transfer-encoding: @@ -39,7 +39,7 @@ interactions: vary: - Accept-Encoding x-ms-ags-diagnostic: - - '{"ServerInfo":{"DataCenter":"Southeast Asia","Slice":"E","Ring":"5","ScaleUnit":"000","RoleInstance":"SI1PEPF00008131"}}' + - '{"ServerInfo":{"DataCenter":"Southeast Asia","Slice":"E","Ring":"5","ScaleUnit":"000","RoleInstance":"SI1PEPF000090C6"}}' x-ms-resource-unit: - '2' status: @@ -73,11 +73,11 @@ interactions: content-type: - application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8 date: - - Fri, 22 Jul 2022 09:50:52 GMT + - Tue, 26 Jul 2022 03:47:36 GMT odata-version: - '4.0' request-id: - - ddedacf7-349e-4010-88dd-49ea7839a08e + - c8e8906a-9ac1-45f5-a730-258d824de17a strict-transport-security: - max-age=31536000 transfer-encoding: @@ -85,7 +85,7 @@ interactions: vary: - Accept-Encoding x-ms-ags-diagnostic: - - '{"ServerInfo":{"DataCenter":"Southeast Asia","Slice":"E","Ring":"5","ScaleUnit":"000","RoleInstance":"SI1PEPF000090C6"}}' + - '{"ServerInfo":{"DataCenter":"Southeast Asia","Slice":"E","Ring":"5","ScaleUnit":"000","RoleInstance":"SI1PEPF000090CA"}}' x-ms-resource-unit: - '2' status: @@ -119,13 +119,13 @@ interactions: cache-control: - no-cache date: - - Fri, 22 Jul 2022 09:50:53 GMT + - Tue, 26 Jul 2022 03:47:38 GMT request-id: - - 8a4201a4-d081-4ae5-b58f-1563e448870a + - 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":"SI1PEPF000090BF"}}' + - '{"ServerInfo":{"DataCenter":"Southeast Asia","Slice":"E","Ring":"5","ScaleUnit":"000","RoleInstance":"SI1PEPF000090C0"}}' x-ms-resource-unit: - '1' status: @@ -159,11 +159,11 @@ interactions: content-type: - application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8 date: - - Fri, 22 Jul 2022 09:50:53 GMT + - Tue, 26 Jul 2022 03:47:40 GMT odata-version: - '4.0' request-id: - - 58335891-1b19-4098-a806-c81f2bc6bd45 + - 5ab896c3-8053-4f89-894e-a84f200c1ff6 strict-transport-security: - max-age=31536000 transfer-encoding: @@ -171,7 +171,7 @@ interactions: vary: - Accept-Encoding x-ms-ags-diagnostic: - - '{"ServerInfo":{"DataCenter":"Southeast Asia","Slice":"E","Ring":"5","ScaleUnit":"000","RoleInstance":"SI1PEPF00008131"}}' + - '{"ServerInfo":{"DataCenter":"Southeast Asia","Slice":"E","Ring":"5","ScaleUnit":"000","RoleInstance":"SI1PEPF00001A30"}}' x-ms-resource-unit: - '1' status: @@ -196,7 +196,7 @@ interactions: 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_cluster000001","name":"cli_test_stack_hci_cluster000001","type":"Microsoft.Resources/resourceGroups","location":"eastus","tags":{"product":"azurecli","cause":"automation","date":"2022-07-22T09:50:48Z"},"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 @@ -205,7 +205,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 22 Jul 2022 09:50:54 GMT + - Tue, 26 Jul 2022 03:47:40 GMT expires: - '-1' pragma: @@ -243,7 +243,7 @@ interactions: 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_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-22T09:50:59.0654797Z","lastModifiedBy":"v-jingszhang@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-07-22T09:50:59.0654797Z"},"properties":{"provisioningState":"Succeeded","status":"NotYetRegistered","cloudId":"3145e590-7c6b-4f4f-a895-a66873df0863","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/"}}' + 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 @@ -252,13 +252,13 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 22 Jul 2022 09:51:01 GMT + - Tue, 26 Jul 2022 03:47:47 GMT etag: - - '"0000a039-0000-0100-0000-62da73030000"' + - '"0000b987-0000-0100-0000-62df63e10000"' expires: - '-1' mise-correlation-id: - - 246b5dc3-4898-4823-aeb3-f75e78126fcc + - b76e5721-8b91-41fa-9e0f-54a7693c870b pragma: - no-cache request-context: @@ -274,9 +274,111 @@ interactions: x-ms-providerhub-traffic: - 'True' x-ms-ratelimit-remaining-subscription-writes: - - '1197' + - '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 @@ -299,16 +401,16 @@ interactions: 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_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":"3145e590-7c6b-4f4f-a895-a66873df0863","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/"}}]}' + 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: - - '715' + - '848' content-type: - application/json; charset=utf-8 date: - - Fri, 22 Jul 2022 09:51:03 GMT + - Tue, 26 Jul 2022 03:48:22 GMT expires: - '-1' pragma: @@ -320,12 +422,12 @@ interactions: x-content-type-options: - nosniff x-ms-original-request-ids: - - f8475cbe-ba36-49f2-be35-1d8f1c043434 - - b060cb83-dab0-49ef-ac28-946d1ab28197 - - d246afd1-caa6-4eb2-9b51-ccc9cfb87040 - - b5306281-39c5-4652-9f78-894291ca4f76 - - 7fdd0d54-10f0-4f15-a49e-f1dad3efff2f - - a8a0160e-50f7-4c20-bdf8-9abf42562ee4 + - 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 @@ -352,22 +454,22 @@ interactions: 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_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-22T09:50:59.0654797Z","lastModifiedBy":"v-jingszhang@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-07-22T09:51:05.6585143Z"},"properties":{"status":"NotYetRegistered","cloudId":"3145e590-7c6b-4f4f-a895-a66873df0863","aadClientId":"bb58dfe8-db67-4d3c-bbe9-fc8ac96077a5","aadTenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","desiredProperties":{"windowsServerSubscription":"Disabled","diagnosticLevel":"Basic"},"trialDaysRemaining":60,"billingModel":"Trial","provisioningState":"Succeeded","serviceEndpoint":"https://dp.stackhci.azure.com/eastus/"}}' + 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: - - '947' + - '1080' content-type: - application/json; charset=utf-8 date: - - Fri, 22 Jul 2022 09:51:08 GMT + - Tue, 26 Jul 2022 03:48:27 GMT etag: - - '"0000a139-0000-0100-0000-62da73090000"' + - '"0000bb87-0000-0100-0000-62df64090000"' expires: - '-1' mise-correlation-id: - - 0be9a073-b332-4c74-8a5b-36e98c9f02f0 + - a070f362-aee3-4f0e-8316-d61f2929607e pragma: - no-cache request-context: @@ -383,7 +485,7 @@ interactions: x-ms-providerhub-traffic: - 'True' x-ms-ratelimit-remaining-subscription-writes: - - '1198' + - '1199' x-powered-by: - ASP.NET status: @@ -408,22 +510,22 @@ interactions: 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_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":"3145e590-7c6b-4f4f-a895-a66873df0863","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/"}}' + 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: - - '703' + - '836' content-type: - application/json; charset=utf-8 date: - - Fri, 22 Jul 2022 09:51:09 GMT + - Tue, 26 Jul 2022 03:48:29 GMT etag: - - '"0000a139-0000-0100-0000-62da73090000"' + - '"0000bb87-0000-0100-0000-62df64090000"' expires: - '-1' mise-correlation-id: - - c0989a81-a1d5-4bb0-84f6-71b32f2a1f6e + - 542e6a61-58a8-4873-979c-8be7197bf4eb pragma: - no-cache request-context: @@ -467,7 +569,7 @@ interactions: string: 'null' headers: azure-asyncoperation: - - https://management.azure.com/providers/Microsoft.AzureStackHCI/locations/EASTUS/operationStatuses/7cefdf6b-9613-48ed-a1c0-21e78b41a423*8F74E26F3C5964677D30BB1FB20F01DB59704EA62B8AE7FF8AA4ED1E2F0F2440?api-version=2022-05-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: @@ -475,13 +577,13 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 22 Jul 2022 09:51:10 GMT + - Tue, 26 Jul 2022 03:48:31 GMT etag: - - '"0000a239-0000-0100-0000-62da730f0000"' + - '"0000bd87-0000-0100-0000-62df640f0000"' expires: - '-1' location: - - https://management.azure.com/providers/Microsoft.AzureStackHCI/locations/EASTUS/operationStatuses/7cefdf6b-9613-48ed-a1c0-21e78b41a423*8F74E26F3C5964677D30BB1FB20F01DB59704EA62B8AE7FF8AA4ED1E2F0F2440?api-version=2022-05-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: @@ -511,10 +613,52 @@ interactions: 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/7cefdf6b-9613-48ed-a1c0-21e78b41a423*8F74E26F3C5964677D30BB1FB20F01DB59704EA62B8AE7FF8AA4ED1E2F0F2440?api-version=2022-05-01 + 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: '{"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: + cache-control: + - no-cache + content-length: + - '528' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 26 Jul 2022 03:49:01 GMT + etag: + - '"0a004a46-0000-0100-0000-62df640e0000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - stack-hci cluster delete + Connection: + - keep-alive + ParameterSetName: + - -n -g --yes + 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/4eaa945f-7363-4ea1-8ed6-07895ba23952*353E54AAC6E19629A609A93811E23828F4A3214452793080CDF5ACD98B533EE6?api-version=2022-05-01 response: body: - string: '{"id":"/providers/Microsoft.AzureStackHCI/locations/EASTUS/operationStatuses/7cefdf6b-9613-48ed-a1c0-21e78b41a423*8F74E26F3C5964677D30BB1FB20F01DB59704EA62B8AE7FF8AA4ED1E2F0F2440","name":"7cefdf6b-9613-48ed-a1c0-21e78b41a423*8F74E26F3C5964677D30BB1FB20F01DB59704EA62B8AE7FF8AA4ED1E2F0F2440","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-22T09:51:11.071311Z","properties":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: cache-control: - no-cache @@ -523,9 +667,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 22 Jul 2022 09:51:41 GMT + - Tue, 26 Jul 2022 03:49:31 GMT etag: - - '"9500a777-0000-0500-0000-62da73230000"' + - '"b100f605-0000-0500-0000-62df64310000"' expires: - '-1' pragma: 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 6297d2bbe0c..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 @@ -29,6 +29,9 @@ def test_stack_hci_cluster_crud(self): 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}') @@ -55,6 +58,7 @@ def test_stack_hci_arc_setting_crud(self): 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') @@ -63,7 +67,7 @@ def test_stack_hci_arc_setting_crud(self): self.check('name', 'default'), self.check('type', 'microsoft.azurestackhci/clusters/arcsettings') ]) - self.cmd('stack-hci arc-setting generate-password -n default --cluster-name cst1 -g hcitest', checks=[ + 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')