From f0b4546e2e0a858606bed0917b2851a577e58158 Mon Sep 17 00:00:00 2001 From: shanefujs <75388289+shanefujs@users.noreply.github.com> Date: Thu, 10 Jul 2025 23:23:12 +0000 Subject: [PATCH 01/10] [storage-discovery] 06-01-preivew cli extension --- src/storage-discovery/HISTORY.rst | 8 + src/storage-discovery/README.md | 5 + .../azext_storage_discovery/__init__.py | 42 ++ .../azext_storage_discovery/_help.py | 11 + .../azext_storage_discovery/_params.py | 13 + .../azext_storage_discovery/aaz/__init__.py | 6 + .../aaz/latest/__init__.py | 10 + .../latest/storage_discovery/__cmd_group.py | 24 + .../aaz/latest/storage_discovery/__init__.py | 11 + .../workspace/__cmd_group.py | 24 + .../storage_discovery/workspace/__init__.py | 16 + .../storage_discovery/workspace/_create.py | 393 +++++++++++++ .../storage_discovery/workspace/_delete.py | 142 +++++ .../storage_discovery/workspace/_list.py | 426 ++++++++++++++ .../storage_discovery/workspace/_show.py | 252 ++++++++ .../storage_discovery/workspace/_update.py | 542 ++++++++++++++++++ .../azext_metadata.json | 4 + .../azext_storage_discovery/commands.py | 15 + .../azext_storage_discovery/custom.py | 14 + .../azext_storage_discovery/tests/__init__.py | 6 + .../tests/latest/__init__.py | 6 + .../tests/latest/test_storage_discovery.py | 13 + src/storage-discovery/setup.cfg | 1 + src/storage-discovery/setup.py | 49 ++ 24 files changed, 2033 insertions(+) create mode 100644 src/storage-discovery/HISTORY.rst create mode 100644 src/storage-discovery/README.md create mode 100644 src/storage-discovery/azext_storage_discovery/__init__.py create mode 100644 src/storage-discovery/azext_storage_discovery/_help.py create mode 100644 src/storage-discovery/azext_storage_discovery/_params.py create mode 100644 src/storage-discovery/azext_storage_discovery/aaz/__init__.py create mode 100644 src/storage-discovery/azext_storage_discovery/aaz/latest/__init__.py create mode 100644 src/storage-discovery/azext_storage_discovery/aaz/latest/storage_discovery/__cmd_group.py create mode 100644 src/storage-discovery/azext_storage_discovery/aaz/latest/storage_discovery/__init__.py create mode 100644 src/storage-discovery/azext_storage_discovery/aaz/latest/storage_discovery/workspace/__cmd_group.py create mode 100644 src/storage-discovery/azext_storage_discovery/aaz/latest/storage_discovery/workspace/__init__.py create mode 100644 src/storage-discovery/azext_storage_discovery/aaz/latest/storage_discovery/workspace/_create.py create mode 100644 src/storage-discovery/azext_storage_discovery/aaz/latest/storage_discovery/workspace/_delete.py create mode 100644 src/storage-discovery/azext_storage_discovery/aaz/latest/storage_discovery/workspace/_list.py create mode 100644 src/storage-discovery/azext_storage_discovery/aaz/latest/storage_discovery/workspace/_show.py create mode 100644 src/storage-discovery/azext_storage_discovery/aaz/latest/storage_discovery/workspace/_update.py create mode 100644 src/storage-discovery/azext_storage_discovery/azext_metadata.json create mode 100644 src/storage-discovery/azext_storage_discovery/commands.py create mode 100644 src/storage-discovery/azext_storage_discovery/custom.py create mode 100644 src/storage-discovery/azext_storage_discovery/tests/__init__.py create mode 100644 src/storage-discovery/azext_storage_discovery/tests/latest/__init__.py create mode 100644 src/storage-discovery/azext_storage_discovery/tests/latest/test_storage_discovery.py create mode 100644 src/storage-discovery/setup.cfg create mode 100644 src/storage-discovery/setup.py diff --git a/src/storage-discovery/HISTORY.rst b/src/storage-discovery/HISTORY.rst new file mode 100644 index 00000000000..abbff5a61a7 --- /dev/null +++ b/src/storage-discovery/HISTORY.rst @@ -0,0 +1,8 @@ +.. :changelog: + +Release History +=============== + +1.0.0b1 +++++++ +* Initial release. \ No newline at end of file diff --git a/src/storage-discovery/README.md b/src/storage-discovery/README.md new file mode 100644 index 00000000000..501e9c7939b --- /dev/null +++ b/src/storage-discovery/README.md @@ -0,0 +1,5 @@ +# Azure CLI StorageDiscovery Extension # +This is an extension to Azure CLI to manage StorageDiscovery resources. + +## How to use ## +Please add commands usage here. \ No newline at end of file diff --git a/src/storage-discovery/azext_storage_discovery/__init__.py b/src/storage-discovery/azext_storage_discovery/__init__.py new file mode 100644 index 00000000000..33ec589b0a4 --- /dev/null +++ b/src/storage-discovery/azext_storage_discovery/__init__.py @@ -0,0 +1,42 @@ +# -------------------------------------------------------------------------------------------- +# 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 aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +from azure.cli.core import AzCommandsLoader +from azext_storage_discovery._help import helps # pylint: disable=unused-import + + +class StorageDiscoveryCommandsLoader(AzCommandsLoader): + + def __init__(self, cli_ctx=None): + from azure.cli.core.commands import CliCommandType + custom_command_type = CliCommandType( + operations_tmpl='azext_storage_discovery.custom#{}') + super().__init__(cli_ctx=cli_ctx, + custom_command_type=custom_command_type) + + def load_command_table(self, args): + from azext_storage_discovery.commands import load_command_table + from azure.cli.core.aaz import load_aaz_command_table + try: + from . import aaz + except ImportError: + aaz = None + if aaz: + load_aaz_command_table( + loader=self, + aaz_pkg_name=aaz.__name__, + args=args + ) + load_command_table(self, args) + return self.command_table + + def load_arguments(self, command): + from azext_storage_discovery._params import load_arguments + load_arguments(self, command) + + +COMMAND_LOADER_CLS = StorageDiscoveryCommandsLoader diff --git a/src/storage-discovery/azext_storage_discovery/_help.py b/src/storage-discovery/azext_storage_discovery/_help.py new file mode 100644 index 00000000000..126d5d00714 --- /dev/null +++ b/src/storage-discovery/azext_storage_discovery/_help.py @@ -0,0 +1,11 @@ +# -------------------------------------------------------------------------------------------- +# 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 aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: disable=line-too-long +# pylint: disable=too-many-lines + +from knack.help_files import helps # pylint: disable=unused-import diff --git a/src/storage-discovery/azext_storage_discovery/_params.py b/src/storage-discovery/azext_storage_discovery/_params.py new file mode 100644 index 00000000000..cfcec717c9c --- /dev/null +++ b/src/storage-discovery/azext_storage_discovery/_params.py @@ -0,0 +1,13 @@ +# -------------------------------------------------------------------------------------------- +# 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 aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: disable=too-many-lines +# pylint: disable=too-many-statements + + +def load_arguments(self, _): # pylint: disable=unused-argument + pass diff --git a/src/storage-discovery/azext_storage_discovery/aaz/__init__.py b/src/storage-discovery/azext_storage_discovery/aaz/__init__.py new file mode 100644 index 00000000000..5757aea3175 --- /dev/null +++ b/src/storage-discovery/azext_storage_discovery/aaz/__init__.py @@ -0,0 +1,6 @@ +# -------------------------------------------------------------------------------------------- +# 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 aaz-dev-tools +# -------------------------------------------------------------------------------------------- diff --git a/src/storage-discovery/azext_storage_discovery/aaz/latest/__init__.py b/src/storage-discovery/azext_storage_discovery/aaz/latest/__init__.py new file mode 100644 index 00000000000..f6acc11aa4e --- /dev/null +++ b/src/storage-discovery/azext_storage_discovery/aaz/latest/__init__.py @@ -0,0 +1,10 @@ +# -------------------------------------------------------------------------------------------- +# 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 aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + diff --git a/src/storage-discovery/azext_storage_discovery/aaz/latest/storage_discovery/__cmd_group.py b/src/storage-discovery/azext_storage_discovery/aaz/latest/storage_discovery/__cmd_group.py new file mode 100644 index 00000000000..eb53c09502f --- /dev/null +++ b/src/storage-discovery/azext_storage_discovery/aaz/latest/storage_discovery/__cmd_group.py @@ -0,0 +1,24 @@ +# -------------------------------------------------------------------------------------------- +# 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 aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command_group( + "storage-discovery", + is_preview=True, +) +class __CMDGroup(AAZCommandGroup): + """Manage Storage Discovery + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/storage-discovery/azext_storage_discovery/aaz/latest/storage_discovery/__init__.py b/src/storage-discovery/azext_storage_discovery/aaz/latest/storage_discovery/__init__.py new file mode 100644 index 00000000000..5a9d61963d6 --- /dev/null +++ b/src/storage-discovery/azext_storage_discovery/aaz/latest/storage_discovery/__init__.py @@ -0,0 +1,11 @@ +# -------------------------------------------------------------------------------------------- +# 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 aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from .__cmd_group import * diff --git a/src/storage-discovery/azext_storage_discovery/aaz/latest/storage_discovery/workspace/__cmd_group.py b/src/storage-discovery/azext_storage_discovery/aaz/latest/storage_discovery/workspace/__cmd_group.py new file mode 100644 index 00000000000..49df0aa0703 --- /dev/null +++ b/src/storage-discovery/azext_storage_discovery/aaz/latest/storage_discovery/workspace/__cmd_group.py @@ -0,0 +1,24 @@ +# -------------------------------------------------------------------------------------------- +# 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 aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command_group( + "storage-discovery workspace", + is_preview=True, +) +class __CMDGroup(AAZCommandGroup): + """Manage Storage Discovery Workspace + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/storage-discovery/azext_storage_discovery/aaz/latest/storage_discovery/workspace/__init__.py b/src/storage-discovery/azext_storage_discovery/aaz/latest/storage_discovery/workspace/__init__.py new file mode 100644 index 00000000000..c401f439385 --- /dev/null +++ b/src/storage-discovery/azext_storage_discovery/aaz/latest/storage_discovery/workspace/__init__.py @@ -0,0 +1,16 @@ +# -------------------------------------------------------------------------------------------- +# 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 aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from .__cmd_group import * +from ._create import * +from ._delete import * +from ._list import * +from ._show import * +from ._update import * diff --git a/src/storage-discovery/azext_storage_discovery/aaz/latest/storage_discovery/workspace/_create.py b/src/storage-discovery/azext_storage_discovery/aaz/latest/storage_discovery/workspace/_create.py new file mode 100644 index 00000000000..2161c124e44 --- /dev/null +++ b/src/storage-discovery/azext_storage_discovery/aaz/latest/storage_discovery/workspace/_create.py @@ -0,0 +1,393 @@ +# -------------------------------------------------------------------------------------------- +# 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 aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "storage-discovery workspace create", + is_preview=True, +) +class Create(AAZCommand): + """Create a StorageDiscoveryWorkspace + """ + + _aaz_info = { + "version": "2025-06-01-preview", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.storagediscovery/storagediscoveryworkspaces/{}", "2025-06-01-preview"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.storage_discovery_workspace_name = AAZStrArg( + options=["-n", "--name", "--storage-discovery-workspace-name"], + help="The name of the StorageDiscoveryWorkspace", + required=True, + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z][a-zA-Z0-9]*(-[a-zA-Z0-9]+)*$", + max_length=64, + min_length=4, + ), + ) + + # define Arg Group "Properties" + + _args_schema = cls._args_schema + _args_schema.description = AAZStrArg( + options=["--description"], + arg_group="Properties", + help="The description of the storage discovery workspace", + ) + _args_schema.scopes = AAZListArg( + options=["--scopes"], + arg_group="Properties", + help="The scopes of the storage discovery workspace.", + ) + _args_schema.sku = AAZStrArg( + options=["--sku"], + arg_group="Properties", + help="The storage discovery sku", + default="Standard", + enum={"Free": "Free", "Standard": "Standard"}, + ) + _args_schema.workspace_roots = AAZListArg( + options=["--workspace-roots"], + arg_group="Properties", + help="The view level storage discovery data estate", + ) + + scopes = cls._args_schema.scopes + scopes.Element = AAZObjectArg() + + _element = cls._args_schema.scopes.Element + _element.display_name = AAZStrArg( + options=["display-name"], + help="Display name of the collection", + required=True, + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z0-9]+([ -][a-zA-Z0-9]+)*$", + max_length=64, + min_length=4, + ), + ) + _element.resource_types = AAZListArg( + options=["resource-types"], + help="Resource types for the collection", + required=True, + ) + _element.tag_keys_only = AAZListArg( + options=["tag-keys-only"], + help="The storage account tags keys to filter", + ) + _element.tags = AAZDictArg( + options=["tags"], + help="Resource tags.", + ) + + resource_types = cls._args_schema.scopes.Element.resource_types + resource_types.Element = AAZStrArg( + enum={"Microsoft.Storage/storageAccounts": "Microsoft.Storage/storageAccounts"}, + ) + + tag_keys_only = cls._args_schema.scopes.Element.tag_keys_only + tag_keys_only.Element = AAZStrArg() + + tags = cls._args_schema.scopes.Element.tags + tags.Element = AAZStrArg() + + workspace_roots = cls._args_schema.workspace_roots + workspace_roots.Element = AAZResourceIdArg() + + # define Arg Group "Resource" + + _args_schema = cls._args_schema + _args_schema.location = AAZResourceLocationArg( + arg_group="Resource", + help="The geo-location where the resource lives", + required=True, + fmt=AAZResourceLocationArgFormat( + resource_group_arg="resource_group", + ), + ) + _args_schema.tags = AAZDictArg( + options=["--tags"], + arg_group="Resource", + help="Resource tags.", + ) + + tags = cls._args_schema.tags + tags.Element = AAZStrArg() + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.StorageDiscoveryWorkspacesCreateOrUpdate(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class StorageDiscoveryWorkspacesCreateOrUpdate(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200, 201]: + return self.on_200_201(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/{storageDiscoveryWorkspaceName}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "storageDiscoveryWorkspaceName", self.ctx.args.storage_discovery_workspace_name, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2025-06-01-preview", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + typ=AAZObjectType, + typ_kwargs={"flags": {"required": True, "client_flatten": True}} + ) + _builder.set_prop("location", AAZStrType, ".location", typ_kwargs={"flags": {"required": True}}) + _builder.set_prop("properties", AAZObjectType) + _builder.set_prop("tags", AAZDictType, ".tags") + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("description", AAZStrType, ".description") + properties.set_prop("scopes", AAZListType, ".scopes", typ_kwargs={"flags": {"required": True}}) + properties.set_prop("sku", AAZStrType, ".sku") + properties.set_prop("workspaceRoots", AAZListType, ".workspace_roots", typ_kwargs={"flags": {"required": True}}) + + scopes = _builder.get(".properties.scopes") + if scopes is not None: + scopes.set_elements(AAZObjectType, ".") + + _elements = _builder.get(".properties.scopes[]") + if _elements is not None: + _elements.set_prop("displayName", AAZStrType, ".display_name", typ_kwargs={"flags": {"required": True}}) + _elements.set_prop("resourceTypes", AAZListType, ".resource_types", typ_kwargs={"flags": {"required": True}}) + _elements.set_prop("tagKeysOnly", AAZListType, ".tag_keys_only") + _elements.set_prop("tags", AAZDictType, ".tags") + + resource_types = _builder.get(".properties.scopes[].resourceTypes") + if resource_types is not None: + resource_types.set_elements(AAZStrType, ".") + + tag_keys_only = _builder.get(".properties.scopes[].tagKeysOnly") + if tag_keys_only is not None: + tag_keys_only.set_elements(AAZStrType, ".") + + tags = _builder.get(".properties.scopes[].tags") + if tags is not None: + tags.set_elements(AAZStrType, ".") + + workspace_roots = _builder.get(".properties.workspaceRoots") + if workspace_roots is not None: + workspace_roots.set_elements(AAZStrType, ".") + + tags = _builder.get(".tags") + if tags is not None: + tags.set_elements(AAZStrType, ".") + + return self.serialize_content(_content_value) + + def on_200_201(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200_201 + ) + + _schema_on_200_201 = None + + @classmethod + def _build_schema_on_200_201(cls): + if cls._schema_on_200_201 is not None: + return cls._schema_on_200_201 + + cls._schema_on_200_201 = AAZObjectType() + + _schema_on_200_201 = cls._schema_on_200_201 + _schema_on_200_201.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.location = AAZStrType( + flags={"required": True}, + ) + _schema_on_200_201.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.properties = AAZObjectType() + _schema_on_200_201.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _schema_on_200_201.tags = AAZDictType() + _schema_on_200_201.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200_201.properties + properties.description = AAZStrType() + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.scopes = AAZListType( + flags={"required": True}, + ) + properties.sku = AAZStrType() + properties.workspace_roots = AAZListType( + serialized_name="workspaceRoots", + flags={"required": True}, + ) + + scopes = cls._schema_on_200_201.properties.scopes + scopes.Element = AAZObjectType() + + _element = cls._schema_on_200_201.properties.scopes.Element + _element.display_name = AAZStrType( + serialized_name="displayName", + flags={"required": True}, + ) + _element.resource_types = AAZListType( + serialized_name="resourceTypes", + flags={"required": True}, + ) + _element.tag_keys_only = AAZListType( + serialized_name="tagKeysOnly", + ) + _element.tags = AAZDictType() + + resource_types = cls._schema_on_200_201.properties.scopes.Element.resource_types + resource_types.Element = AAZStrType() + + tag_keys_only = cls._schema_on_200_201.properties.scopes.Element.tag_keys_only + tag_keys_only.Element = AAZStrType() + + tags = cls._schema_on_200_201.properties.scopes.Element.tags + tags.Element = AAZStrType() + + workspace_roots = cls._schema_on_200_201.properties.workspace_roots + workspace_roots.Element = AAZStrType() + + system_data = cls._schema_on_200_201.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + tags = cls._schema_on_200_201.tags + tags.Element = AAZStrType() + + return cls._schema_on_200_201 + + +class _CreateHelper: + """Helper class for Create""" + + +__all__ = ["Create"] diff --git a/src/storage-discovery/azext_storage_discovery/aaz/latest/storage_discovery/workspace/_delete.py b/src/storage-discovery/azext_storage_discovery/aaz/latest/storage_discovery/workspace/_delete.py new file mode 100644 index 00000000000..a41ed6ef55a --- /dev/null +++ b/src/storage-discovery/azext_storage_discovery/aaz/latest/storage_discovery/workspace/_delete.py @@ -0,0 +1,142 @@ +# -------------------------------------------------------------------------------------------- +# 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 aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "storage-discovery workspace delete", + is_preview=True, + confirmation="Are you sure you want to perform this operation?", +) +class Delete(AAZCommand): + """Delete a StorageDiscoveryWorkspace + """ + + _aaz_info = { + "version": "2025-06-01-preview", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.storagediscovery/storagediscoveryworkspaces/{}", "2025-06-01-preview"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return None + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.storage_discovery_workspace_name = AAZStrArg( + options=["-n", "--name", "--storage-discovery-workspace-name"], + help="The name of the StorageDiscoveryWorkspace", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z][a-zA-Z0-9]*(-[a-zA-Z0-9]+)*$", + max_length=64, + min_length=4, + ), + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.StorageDiscoveryWorkspacesDelete(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + class StorageDiscoveryWorkspacesDelete(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + if session.http_response.status_code in [204]: + return self.on_204(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/{storageDiscoveryWorkspaceName}", + **self.url_parameters + ) + + @property + def method(self): + return "DELETE" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "storageDiscoveryWorkspaceName", self.ctx.args.storage_discovery_workspace_name, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2025-06-01-preview", + required=True, + ), + } + return parameters + + def on_200(self, session): + pass + + def on_204(self, session): + pass + + +class _DeleteHelper: + """Helper class for Delete""" + + +__all__ = ["Delete"] diff --git a/src/storage-discovery/azext_storage_discovery/aaz/latest/storage_discovery/workspace/_list.py b/src/storage-discovery/azext_storage_discovery/aaz/latest/storage_discovery/workspace/_list.py new file mode 100644 index 00000000000..077f1c754ff --- /dev/null +++ b/src/storage-discovery/azext_storage_discovery/aaz/latest/storage_discovery/workspace/_list.py @@ -0,0 +1,426 @@ +# -------------------------------------------------------------------------------------------- +# 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 aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "storage-discovery workspace list", + is_preview=True, +) +class List(AAZCommand): + """List StorageDiscoveryWorkspace resources by subscription ID + """ + + _aaz_info = { + "version": "2025-06-01-preview", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/providers/microsoft.storagediscovery/storagediscoveryworkspaces", "2025-06-01-preview"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.storagediscovery/storagediscoveryworkspaces", "2025-06-01-preview"], + ] + } + + AZ_SUPPORT_PAGINATION = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_paging(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.resource_group = AAZResourceGroupNameArg() + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + condition_0 = has_value(self.ctx.subscription_id) and has_value(self.ctx.args.resource_group) is not True + condition_1 = has_value(self.ctx.args.resource_group) and has_value(self.ctx.subscription_id) + if condition_0: + self.StorageDiscoveryWorkspacesListBySubscription(ctx=self.ctx)() + if condition_1: + self.StorageDiscoveryWorkspacesListByResourceGroup(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance.value, client_flatten=True) + next_link = self.deserialize_output(self.ctx.vars.instance.next_link) + return result, next_link + + class StorageDiscoveryWorkspacesListBySubscription(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2025-06-01-preview", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.next_link = AAZStrType( + serialized_name="nextLink", + ) + _schema_on_200.value = AAZListType( + flags={"required": True}, + ) + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.location = AAZStrType( + flags={"required": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType() + _element.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _element.tags = AAZDictType() + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.value.Element.properties + properties.description = AAZStrType() + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.scopes = AAZListType( + flags={"required": True}, + ) + properties.sku = AAZStrType() + properties.workspace_roots = AAZListType( + serialized_name="workspaceRoots", + flags={"required": True}, + ) + + scopes = cls._schema_on_200.value.Element.properties.scopes + scopes.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element.properties.scopes.Element + _element.display_name = AAZStrType( + serialized_name="displayName", + flags={"required": True}, + ) + _element.resource_types = AAZListType( + serialized_name="resourceTypes", + flags={"required": True}, + ) + _element.tag_keys_only = AAZListType( + serialized_name="tagKeysOnly", + ) + _element.tags = AAZDictType() + + resource_types = cls._schema_on_200.value.Element.properties.scopes.Element.resource_types + resource_types.Element = AAZStrType() + + tag_keys_only = cls._schema_on_200.value.Element.properties.scopes.Element.tag_keys_only + tag_keys_only.Element = AAZStrType() + + tags = cls._schema_on_200.value.Element.properties.scopes.Element.tags + tags.Element = AAZStrType() + + workspace_roots = cls._schema_on_200.value.Element.properties.workspace_roots + workspace_roots.Element = AAZStrType() + + system_data = cls._schema_on_200.value.Element.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + tags = cls._schema_on_200.value.Element.tags + tags.Element = AAZStrType() + + return cls._schema_on_200 + + class StorageDiscoveryWorkspacesListByResourceGroup(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2025-06-01-preview", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.next_link = AAZStrType( + serialized_name="nextLink", + ) + _schema_on_200.value = AAZListType( + flags={"required": True}, + ) + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.location = AAZStrType( + flags={"required": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType() + _element.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _element.tags = AAZDictType() + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.value.Element.properties + properties.description = AAZStrType() + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.scopes = AAZListType( + flags={"required": True}, + ) + properties.sku = AAZStrType() + properties.workspace_roots = AAZListType( + serialized_name="workspaceRoots", + flags={"required": True}, + ) + + scopes = cls._schema_on_200.value.Element.properties.scopes + scopes.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element.properties.scopes.Element + _element.display_name = AAZStrType( + serialized_name="displayName", + flags={"required": True}, + ) + _element.resource_types = AAZListType( + serialized_name="resourceTypes", + flags={"required": True}, + ) + _element.tag_keys_only = AAZListType( + serialized_name="tagKeysOnly", + ) + _element.tags = AAZDictType() + + resource_types = cls._schema_on_200.value.Element.properties.scopes.Element.resource_types + resource_types.Element = AAZStrType() + + tag_keys_only = cls._schema_on_200.value.Element.properties.scopes.Element.tag_keys_only + tag_keys_only.Element = AAZStrType() + + tags = cls._schema_on_200.value.Element.properties.scopes.Element.tags + tags.Element = AAZStrType() + + workspace_roots = cls._schema_on_200.value.Element.properties.workspace_roots + workspace_roots.Element = AAZStrType() + + system_data = cls._schema_on_200.value.Element.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + tags = cls._schema_on_200.value.Element.tags + tags.Element = AAZStrType() + + return cls._schema_on_200 + + +class _ListHelper: + """Helper class for List""" + + +__all__ = ["List"] diff --git a/src/storage-discovery/azext_storage_discovery/aaz/latest/storage_discovery/workspace/_show.py b/src/storage-discovery/azext_storage_discovery/aaz/latest/storage_discovery/workspace/_show.py new file mode 100644 index 00000000000..16d34e09f9d --- /dev/null +++ b/src/storage-discovery/azext_storage_discovery/aaz/latest/storage_discovery/workspace/_show.py @@ -0,0 +1,252 @@ +# -------------------------------------------------------------------------------------------- +# 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 aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "storage-discovery workspace show", + is_preview=True, +) +class Show(AAZCommand): + """Get a StorageDiscoveryWorkspace + """ + + _aaz_info = { + "version": "2025-06-01-preview", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.storagediscovery/storagediscoveryworkspaces/{}", "2025-06-01-preview"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.storage_discovery_workspace_name = AAZStrArg( + options=["-n", "--name", "--storage-discovery-workspace-name"], + help="The name of the StorageDiscoveryWorkspace", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z][a-zA-Z0-9]*(-[a-zA-Z0-9]+)*$", + max_length=64, + min_length=4, + ), + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.StorageDiscoveryWorkspacesGet(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class StorageDiscoveryWorkspacesGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/{storageDiscoveryWorkspaceName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "storageDiscoveryWorkspaceName", self.ctx.args.storage_discovery_workspace_name, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2025-06-01-preview", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.location = AAZStrType( + flags={"required": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType() + _schema_on_200.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _schema_on_200.tags = AAZDictType() + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.description = AAZStrType() + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.scopes = AAZListType( + flags={"required": True}, + ) + properties.sku = AAZStrType() + properties.workspace_roots = AAZListType( + serialized_name="workspaceRoots", + flags={"required": True}, + ) + + scopes = cls._schema_on_200.properties.scopes + scopes.Element = AAZObjectType() + + _element = cls._schema_on_200.properties.scopes.Element + _element.display_name = AAZStrType( + serialized_name="displayName", + flags={"required": True}, + ) + _element.resource_types = AAZListType( + serialized_name="resourceTypes", + flags={"required": True}, + ) + _element.tag_keys_only = AAZListType( + serialized_name="tagKeysOnly", + ) + _element.tags = AAZDictType() + + resource_types = cls._schema_on_200.properties.scopes.Element.resource_types + resource_types.Element = AAZStrType() + + tag_keys_only = cls._schema_on_200.properties.scopes.Element.tag_keys_only + tag_keys_only.Element = AAZStrType() + + tags = cls._schema_on_200.properties.scopes.Element.tags + tags.Element = AAZStrType() + + workspace_roots = cls._schema_on_200.properties.workspace_roots + workspace_roots.Element = AAZStrType() + + system_data = cls._schema_on_200.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + tags = cls._schema_on_200.tags + tags.Element = AAZStrType() + + return cls._schema_on_200 + + +class _ShowHelper: + """Helper class for Show""" + + +__all__ = ["Show"] diff --git a/src/storage-discovery/azext_storage_discovery/aaz/latest/storage_discovery/workspace/_update.py b/src/storage-discovery/azext_storage_discovery/aaz/latest/storage_discovery/workspace/_update.py new file mode 100644 index 00000000000..d92649d211a --- /dev/null +++ b/src/storage-discovery/azext_storage_discovery/aaz/latest/storage_discovery/workspace/_update.py @@ -0,0 +1,542 @@ +# -------------------------------------------------------------------------------------------- +# 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 aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "storage-discovery workspace update", + is_preview=True, +) +class Update(AAZCommand): + """Update a StorageDiscoveryWorkspace + """ + + _aaz_info = { + "version": "2025-06-01-preview", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.storagediscovery/storagediscoveryworkspaces/{}", "2025-06-01-preview"], + ] + } + + AZ_SUPPORT_GENERIC_UPDATE = True + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.storage_discovery_workspace_name = AAZStrArg( + options=["-n", "--name", "--storage-discovery-workspace-name"], + help="The name of the StorageDiscoveryWorkspace", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z][a-zA-Z0-9]*(-[a-zA-Z0-9]+)*$", + max_length=64, + min_length=4, + ), + ) + + # define Arg Group "Properties" + + _args_schema = cls._args_schema + _args_schema.description = AAZStrArg( + options=["--description"], + arg_group="Properties", + help="The description of the storage discovery workspace", + nullable=True, + ) + _args_schema.scopes = AAZListArg( + options=["--scopes"], + arg_group="Properties", + help="The scopes of the storage discovery workspace.", + ) + _args_schema.sku = AAZStrArg( + options=["--sku"], + arg_group="Properties", + help="The storage discovery sku", + nullable=True, + enum={"Free": "Free", "Standard": "Standard"}, + ) + _args_schema.workspace_roots = AAZListArg( + options=["--workspace-roots"], + arg_group="Properties", + help="The view level storage discovery data estate", + ) + + scopes = cls._args_schema.scopes + scopes.Element = AAZObjectArg( + nullable=True, + ) + + _element = cls._args_schema.scopes.Element + _element.display_name = AAZStrArg( + options=["display-name"], + help="Display name of the collection", + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z0-9]+([ -][a-zA-Z0-9]+)*$", + max_length=64, + min_length=4, + ), + ) + _element.resource_types = AAZListArg( + options=["resource-types"], + help="Resource types for the collection", + ) + _element.tag_keys_only = AAZListArg( + options=["tag-keys-only"], + help="The storage account tags keys to filter", + nullable=True, + ) + _element.tags = AAZDictArg( + options=["tags"], + help="Resource tags.", + nullable=True, + ) + + resource_types = cls._args_schema.scopes.Element.resource_types + resource_types.Element = AAZStrArg( + nullable=True, + enum={"Microsoft.Storage/storageAccounts": "Microsoft.Storage/storageAccounts"}, + ) + + tag_keys_only = cls._args_schema.scopes.Element.tag_keys_only + tag_keys_only.Element = AAZStrArg( + nullable=True, + ) + + tags = cls._args_schema.scopes.Element.tags + tags.Element = AAZStrArg( + nullable=True, + ) + + workspace_roots = cls._args_schema.workspace_roots + workspace_roots.Element = AAZResourceIdArg( + nullable=True, + ) + + # define Arg Group "Resource" + + _args_schema = cls._args_schema + _args_schema.tags = AAZDictArg( + options=["--tags"], + arg_group="Resource", + help="Resource tags.", + nullable=True, + ) + + tags = cls._args_schema.tags + tags.Element = AAZStrArg( + nullable=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.StorageDiscoveryWorkspacesGet(ctx=self.ctx)() + self.pre_instance_update(self.ctx.vars.instance) + self.InstanceUpdateByJson(ctx=self.ctx)() + self.InstanceUpdateByGeneric(ctx=self.ctx)() + self.post_instance_update(self.ctx.vars.instance) + self.StorageDiscoveryWorkspacesCreateOrUpdate(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + @register_callback + def pre_instance_update(self, instance): + pass + + @register_callback + def post_instance_update(self, instance): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class StorageDiscoveryWorkspacesGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/{storageDiscoveryWorkspaceName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "storageDiscoveryWorkspaceName", self.ctx.args.storage_discovery_workspace_name, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2025-06-01-preview", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + _UpdateHelper._build_schema_storage_discovery_workspace_read(cls._schema_on_200) + + return cls._schema_on_200 + + class StorageDiscoveryWorkspacesCreateOrUpdate(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200, 201]: + return self.on_200_201(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/{storageDiscoveryWorkspaceName}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "storageDiscoveryWorkspaceName", self.ctx.args.storage_discovery_workspace_name, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2025-06-01-preview", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + value=self.ctx.vars.instance, + ) + + return self.serialize_content(_content_value) + + def on_200_201(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200_201 + ) + + _schema_on_200_201 = None + + @classmethod + def _build_schema_on_200_201(cls): + if cls._schema_on_200_201 is not None: + return cls._schema_on_200_201 + + cls._schema_on_200_201 = AAZObjectType() + _UpdateHelper._build_schema_storage_discovery_workspace_read(cls._schema_on_200_201) + + return cls._schema_on_200_201 + + class InstanceUpdateByJson(AAZJsonInstanceUpdateOperation): + + def __call__(self, *args, **kwargs): + self._update_instance(self.ctx.vars.instance) + + def _update_instance(self, instance): + _instance_value, _builder = self.new_content_builder( + self.ctx.args, + value=instance, + typ=AAZObjectType + ) + _builder.set_prop("properties", AAZObjectType) + _builder.set_prop("tags", AAZDictType, ".tags") + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("description", AAZStrType, ".description") + properties.set_prop("scopes", AAZListType, ".scopes", typ_kwargs={"flags": {"required": True}}) + properties.set_prop("sku", AAZStrType, ".sku") + properties.set_prop("workspaceRoots", AAZListType, ".workspace_roots", typ_kwargs={"flags": {"required": True}}) + + scopes = _builder.get(".properties.scopes") + if scopes is not None: + scopes.set_elements(AAZObjectType, ".") + + _elements = _builder.get(".properties.scopes[]") + if _elements is not None: + _elements.set_prop("displayName", AAZStrType, ".display_name", typ_kwargs={"flags": {"required": True}}) + _elements.set_prop("resourceTypes", AAZListType, ".resource_types", typ_kwargs={"flags": {"required": True}}) + _elements.set_prop("tagKeysOnly", AAZListType, ".tag_keys_only") + _elements.set_prop("tags", AAZDictType, ".tags") + + resource_types = _builder.get(".properties.scopes[].resourceTypes") + if resource_types is not None: + resource_types.set_elements(AAZStrType, ".") + + tag_keys_only = _builder.get(".properties.scopes[].tagKeysOnly") + if tag_keys_only is not None: + tag_keys_only.set_elements(AAZStrType, ".") + + tags = _builder.get(".properties.scopes[].tags") + if tags is not None: + tags.set_elements(AAZStrType, ".") + + workspace_roots = _builder.get(".properties.workspaceRoots") + if workspace_roots is not None: + workspace_roots.set_elements(AAZStrType, ".") + + tags = _builder.get(".tags") + if tags is not None: + tags.set_elements(AAZStrType, ".") + + return _instance_value + + class InstanceUpdateByGeneric(AAZGenericInstanceUpdateOperation): + + def __call__(self, *args, **kwargs): + self._update_instance_by_generic( + self.ctx.vars.instance, + self.ctx.generic_update_args + ) + + +class _UpdateHelper: + """Helper class for Update""" + + _schema_storage_discovery_workspace_read = None + + @classmethod + def _build_schema_storage_discovery_workspace_read(cls, _schema): + if cls._schema_storage_discovery_workspace_read is not None: + _schema.id = cls._schema_storage_discovery_workspace_read.id + _schema.location = cls._schema_storage_discovery_workspace_read.location + _schema.name = cls._schema_storage_discovery_workspace_read.name + _schema.properties = cls._schema_storage_discovery_workspace_read.properties + _schema.system_data = cls._schema_storage_discovery_workspace_read.system_data + _schema.tags = cls._schema_storage_discovery_workspace_read.tags + _schema.type = cls._schema_storage_discovery_workspace_read.type + return + + cls._schema_storage_discovery_workspace_read = _schema_storage_discovery_workspace_read = AAZObjectType() + + storage_discovery_workspace_read = _schema_storage_discovery_workspace_read + storage_discovery_workspace_read.id = AAZStrType( + flags={"read_only": True}, + ) + storage_discovery_workspace_read.location = AAZStrType( + flags={"required": True}, + ) + storage_discovery_workspace_read.name = AAZStrType( + flags={"read_only": True}, + ) + storage_discovery_workspace_read.properties = AAZObjectType() + storage_discovery_workspace_read.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + storage_discovery_workspace_read.tags = AAZDictType() + storage_discovery_workspace_read.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_storage_discovery_workspace_read.properties + properties.description = AAZStrType() + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.scopes = AAZListType( + flags={"required": True}, + ) + properties.sku = AAZStrType() + properties.workspace_roots = AAZListType( + serialized_name="workspaceRoots", + flags={"required": True}, + ) + + scopes = _schema_storage_discovery_workspace_read.properties.scopes + scopes.Element = AAZObjectType() + + _element = _schema_storage_discovery_workspace_read.properties.scopes.Element + _element.display_name = AAZStrType( + serialized_name="displayName", + flags={"required": True}, + ) + _element.resource_types = AAZListType( + serialized_name="resourceTypes", + flags={"required": True}, + ) + _element.tag_keys_only = AAZListType( + serialized_name="tagKeysOnly", + ) + _element.tags = AAZDictType() + + resource_types = _schema_storage_discovery_workspace_read.properties.scopes.Element.resource_types + resource_types.Element = AAZStrType() + + tag_keys_only = _schema_storage_discovery_workspace_read.properties.scopes.Element.tag_keys_only + tag_keys_only.Element = AAZStrType() + + tags = _schema_storage_discovery_workspace_read.properties.scopes.Element.tags + tags.Element = AAZStrType() + + workspace_roots = _schema_storage_discovery_workspace_read.properties.workspace_roots + workspace_roots.Element = AAZStrType() + + system_data = _schema_storage_discovery_workspace_read.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + tags = _schema_storage_discovery_workspace_read.tags + tags.Element = AAZStrType() + + _schema.id = cls._schema_storage_discovery_workspace_read.id + _schema.location = cls._schema_storage_discovery_workspace_read.location + _schema.name = cls._schema_storage_discovery_workspace_read.name + _schema.properties = cls._schema_storage_discovery_workspace_read.properties + _schema.system_data = cls._schema_storage_discovery_workspace_read.system_data + _schema.tags = cls._schema_storage_discovery_workspace_read.tags + _schema.type = cls._schema_storage_discovery_workspace_read.type + + +__all__ = ["Update"] diff --git a/src/storage-discovery/azext_storage_discovery/azext_metadata.json b/src/storage-discovery/azext_storage_discovery/azext_metadata.json new file mode 100644 index 00000000000..71889bb136b --- /dev/null +++ b/src/storage-discovery/azext_storage_discovery/azext_metadata.json @@ -0,0 +1,4 @@ +{ + "azext.isPreview": true, + "azext.minCliCoreVersion": "2.75.0" +} \ No newline at end of file diff --git a/src/storage-discovery/azext_storage_discovery/commands.py b/src/storage-discovery/azext_storage_discovery/commands.py new file mode 100644 index 00000000000..b0d842e4993 --- /dev/null +++ b/src/storage-discovery/azext_storage_discovery/commands.py @@ -0,0 +1,15 @@ +# -------------------------------------------------------------------------------------------- +# 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 aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: disable=too-many-lines +# pylint: disable=too-many-statements + +# from azure.cli.core.commands import CliCommandType + + +def load_command_table(self, _): # pylint: disable=unused-argument + pass diff --git a/src/storage-discovery/azext_storage_discovery/custom.py b/src/storage-discovery/azext_storage_discovery/custom.py new file mode 100644 index 00000000000..86df1e48ef5 --- /dev/null +++ b/src/storage-discovery/azext_storage_discovery/custom.py @@ -0,0 +1,14 @@ +# -------------------------------------------------------------------------------------------- +# 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 aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: disable=too-many-lines +# pylint: disable=too-many-statements + +from knack.log import get_logger + + +logger = get_logger(__name__) diff --git a/src/storage-discovery/azext_storage_discovery/tests/__init__.py b/src/storage-discovery/azext_storage_discovery/tests/__init__.py new file mode 100644 index 00000000000..5757aea3175 --- /dev/null +++ b/src/storage-discovery/azext_storage_discovery/tests/__init__.py @@ -0,0 +1,6 @@ +# -------------------------------------------------------------------------------------------- +# 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 aaz-dev-tools +# -------------------------------------------------------------------------------------------- diff --git a/src/storage-discovery/azext_storage_discovery/tests/latest/__init__.py b/src/storage-discovery/azext_storage_discovery/tests/latest/__init__.py new file mode 100644 index 00000000000..5757aea3175 --- /dev/null +++ b/src/storage-discovery/azext_storage_discovery/tests/latest/__init__.py @@ -0,0 +1,6 @@ +# -------------------------------------------------------------------------------------------- +# 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 aaz-dev-tools +# -------------------------------------------------------------------------------------------- diff --git a/src/storage-discovery/azext_storage_discovery/tests/latest/test_storage_discovery.py b/src/storage-discovery/azext_storage_discovery/tests/latest/test_storage_discovery.py new file mode 100644 index 00000000000..d75555ddac5 --- /dev/null +++ b/src/storage-discovery/azext_storage_discovery/tests/latest/test_storage_discovery.py @@ -0,0 +1,13 @@ +# -------------------------------------------------------------------------------------------- +# 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 aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +from azure.cli.testsdk import * + + +class StorageDiscoveryScenario(ScenarioTest): + # TODO: add tests here + pass diff --git a/src/storage-discovery/setup.cfg b/src/storage-discovery/setup.cfg new file mode 100644 index 00000000000..2fdd96e5d39 --- /dev/null +++ b/src/storage-discovery/setup.cfg @@ -0,0 +1 @@ +#setup.cfg \ No newline at end of file diff --git a/src/storage-discovery/setup.py b/src/storage-discovery/setup.py new file mode 100644 index 00000000000..e70c4562930 --- /dev/null +++ b/src/storage-discovery/setup.py @@ -0,0 +1,49 @@ +# -------------------------------------------------------------------------------------------- +# 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 aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +from codecs import open +from setuptools import setup, find_packages + + +# HISTORY.rst entry. +VERSION = '1.0.0b1' + +# The full list of classifiers is available at +# https://pypi.python.org/pypi?%3Aaction=list_classifiers +CLASSIFIERS = [ + 'Development Status :: 4 - Beta', + 'Intended Audience :: Developers', + 'Intended Audience :: System Administrators', + 'Programming Language :: Python', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', + 'License :: OSI Approved :: MIT License', +] + +DEPENDENCIES = [] + +with open('README.md', 'r', encoding='utf-8') as f: + README = f.read() +with open('HISTORY.rst', 'r', encoding='utf-8') as f: + HISTORY = f.read() + +setup( + name='storage-discovery', + version=VERSION, + description='Microsoft Azure Command-Line Tools StorageDiscovery Extension.', + long_description=README + '\n\n' + HISTORY, + license='MIT', + author='Microsoft Corporation', + author_email='azpycli@microsoft.com', + url='https://github.com/Azure/azure-cli-extensions/tree/main/src/storage-discovery', + classifiers=CLASSIFIERS, + packages=find_packages(exclude=["tests"]), + package_data={'azext_storage_discovery': ['azext_metadata.json']}, + install_requires=DEPENDENCIES +) From 16be50d6134d767371b0cac16bc3499f8e3fab66 Mon Sep 17 00:00:00 2001 From: shanefujs <75388289+shanefujs@users.noreply.github.com> Date: Thu, 24 Jul 2025 21:19:19 +0000 Subject: [PATCH 02/10] add azext_storage_discovery tests and recordings --- ..._discovery_workspace_basic_operations.yaml | 291 +++++++++++++ ...discovery_workspace_list_subscription.yaml | 50 +++ ...storage_discovery_workspace_scenarios.yaml | 389 ++++++++++++++++++ .../tests/latest/test_storage_discovery.py | 117 +++++- 4 files changed, 845 insertions(+), 2 deletions(-) create mode 100644 src/storage-discovery/azext_storage_discovery/tests/latest/recordings/test_storage_discovery_workspace_basic_operations.yaml create mode 100644 src/storage-discovery/azext_storage_discovery/tests/latest/recordings/test_storage_discovery_workspace_list_subscription.yaml create mode 100644 src/storage-discovery/azext_storage_discovery/tests/latest/recordings/test_storage_discovery_workspace_scenarios.yaml diff --git a/src/storage-discovery/azext_storage_discovery/tests/latest/recordings/test_storage_discovery_workspace_basic_operations.yaml b/src/storage-discovery/azext_storage_discovery/tests/latest/recordings/test_storage_discovery_workspace_basic_operations.yaml new file mode 100644 index 00000000000..b8af95974b1 --- /dev/null +++ b/src/storage-discovery/azext_storage_discovery/tests/latest/recordings/test_storage_discovery_workspace_basic_operations.yaml @@ -0,0 +1,291 @@ +interactions: +- request: + body: '{"location": "eastus2", "properties": {"scopes": [{"displayName": "basic", + "resourceTypes": ["Microsoft.Storage/storageAccounts"]}], "sku": "Standard", + "workspaceRoots": ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"]}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - storage-discovery workspace create + Connection: + - keep-alive + Content-Length: + - '259' + Content-Type: + - application/json + ParameterSetName: + - -g -n --location --workspace-roots --scopes + User-Agent: + - AZURECLI/2.75.0 azsdk-python-core/1.35.0 Python/3.12.11 (Linux-6.8.0-1030-azure-x86_64-with-glibc2.36) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/sdworkspace000002?api-version=2025-06-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/sdworkspace000002","name":"sdworkspace000002","type":"microsoft.storagediscovery/storagediscoveryworkspaces","location":"eastus2","tags":{"team":"Discovery"},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-07-24T21:17:58.4629593Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-07-24T21:17:58.4629593Z"},"properties":{"sku":"Standard","workspaceRoots":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"],"description":null,"scopes":[{"displayName":"basic","resourceTypes":["Microsoft.Storage/storageAccounts"],"tagKeysOnly":null,"tags":null}],"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '845' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 24 Jul 2025 21:17:59 GMT + etag: + - '"760050c5-0000-0200-0000-6882a3070000"' + expires: + - '-1' + mise-correlation-id: + - adde756f-f8e2-4d08-8a1a-4c5181739934 + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=2968a26f-a796-4124-8684-894f8a239db2/francecentral/09ccaf80-9622-4006-be16-ef807137e1af + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-global-writes: + - '11999' + x-ms-ratelimit-remaining-subscription-writes: + - '799' + x-msedge-ref: + - 'Ref A: C854DF3996E14D61870CC086040E22BC Ref B: MWH011020808062 Ref C: 2025-07-24T21:17:56Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - storage-discovery workspace show + Connection: + - keep-alive + ParameterSetName: + - -g -n + User-Agent: + - AZURECLI/2.75.0 azsdk-python-core/1.35.0 Python/3.12.11 (Linux-6.8.0-1030-azure-x86_64-with-glibc2.36) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/sdworkspace000002?api-version=2025-06-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/sdworkspace000002","name":"sdworkspace000002","type":"microsoft.storagediscovery/storagediscoveryworkspaces","location":"eastus2","tags":{"team":"Discovery"},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-07-24T21:17:58.4629593Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-07-24T21:17:58.4629593Z"},"properties":{"sku":"Standard","workspaceRoots":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"],"description":null,"scopes":[{"displayName":"basic","resourceTypes":["Microsoft.Storage/storageAccounts"],"tagKeysOnly":null,"tags":null}],"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '845' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 24 Jul 2025 21:17:59 GMT + etag: + - '"760050c5-0000-0200-0000-6882a3070000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: F6E7430F324E4975A24C90FD6E5086F8 Ref B: CO6AA3150220021 Ref C: 2025-07-24T21:17:59Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - storage-discovery workspace update + Connection: + - keep-alive + ParameterSetName: + - -g -n --tags + User-Agent: + - AZURECLI/2.75.0 azsdk-python-core/1.35.0 Python/3.12.11 (Linux-6.8.0-1030-azure-x86_64-with-glibc2.36) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/sdworkspace000002?api-version=2025-06-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/sdworkspace000002","name":"sdworkspace000002","type":"microsoft.storagediscovery/storagediscoveryworkspaces","location":"eastus2","tags":{"team":"Discovery"},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-07-24T21:17:58.4629593Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-07-24T21:17:58.4629593Z"},"properties":{"sku":"Standard","workspaceRoots":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"],"description":null,"scopes":[{"displayName":"basic","resourceTypes":["Microsoft.Storage/storageAccounts"],"tagKeysOnly":null,"tags":null}],"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '845' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 24 Jul 2025 21:17:59 GMT + etag: + - '"760050c5-0000-0200-0000-6882a3070000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: B5112EA40BDA46D599C693382A064FF5 Ref B: CO6AA3150217017 Ref C: 2025-07-24T21:18:00Z' + status: + code: 200 + message: OK +- request: + body: '{"location": "eastus2", "properties": {"scopes": [{"displayName": "basic", + "resourceTypes": ["Microsoft.Storage/storageAccounts"]}], "sku": "Standard", + "workspaceRoots": ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"]}, + "tags": {"team": "Discovery", "environment": "test", "purpose": "demo"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - storage-discovery workspace update + Connection: + - keep-alive + Content-Length: + - '332' + Content-Type: + - application/json + ParameterSetName: + - -g -n --tags + User-Agent: + - AZURECLI/2.75.0 azsdk-python-core/1.35.0 Python/3.12.11 (Linux-6.8.0-1030-azure-x86_64-with-glibc2.36) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/sdworkspace000002?api-version=2025-06-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/sdworkspace000002","name":"sdworkspace000002","type":"microsoft.storagediscovery/storagediscoveryworkspaces","location":"eastus2","tags":{"team":"Discovery","environment":"test","purpose":"demo"},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-07-24T21:17:58.4629593Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-07-24T21:18:00.3191058Z"},"properties":{"sku":"Standard","workspaceRoots":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"],"description":null,"scopes":[{"displayName":"basic","resourceTypes":["Microsoft.Storage/storageAccounts"],"tagKeysOnly":null,"tags":null}],"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '883' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 24 Jul 2025 21:18:00 GMT + etag: + - '"760054c5-0000-0200-0000-6882a3080000"' + expires: + - '-1' + mise-correlation-id: + - 1b1690c5-7c24-4c92-8fa9-2bfefbc27a69 + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=2968a26f-a796-4124-8684-894f8a239db2/eastus2/b5631529-fe40-4673-ad4e-4a319042478b + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-global-writes: + - '11999' + x-ms-ratelimit-remaining-subscription-writes: + - '799' + x-msedge-ref: + - 'Ref A: 31540AE5E70C4EFBBBC6D0B26E558575 Ref B: CO6AA3150217045 Ref C: 2025-07-24T21:18:00Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - storage-discovery workspace delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g -n -y + User-Agent: + - AZURECLI/2.75.0 azsdk-python-core/1.35.0 Python/3.12.11 (Linux-6.8.0-1030-azure-x86_64-with-glibc2.36) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/sdworkspace000002?api-version=2025-06-01-preview + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Thu, 24 Jul 2025 21:18:01 GMT + expires: + - '-1' + mise-correlation-id: + - 35a5aff1-451d-41f0-9d3c-e969b2ec5f61 + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=2968a26f-a796-4124-8684-894f8a239db2/eastus2/910433b8-5595-4799-935b-c4d7d1aa1885 + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-deletes: + - '799' + x-ms-ratelimit-remaining-subscription-global-deletes: + - '11999' + x-msedge-ref: + - 'Ref A: B52DC749D3B04777871C205D5B1DD4C7 Ref B: CO6AA3150220023 Ref C: 2025-07-24T21:18:00Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +version: 1 diff --git a/src/storage-discovery/azext_storage_discovery/tests/latest/recordings/test_storage_discovery_workspace_list_subscription.yaml b/src/storage-discovery/azext_storage_discovery/tests/latest/recordings/test_storage_discovery_workspace_list_subscription.yaml new file mode 100644 index 00000000000..26146dd8522 --- /dev/null +++ b/src/storage-discovery/azext_storage_discovery/tests/latest/recordings/test_storage_discovery_workspace_list_subscription.yaml @@ -0,0 +1,50 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - storage-discovery workspace list + Connection: + - keep-alive + User-Agent: + - AZURECLI/2.75.0 azsdk-python-core/1.35.0 Python/3.12.11 (Linux-6.8.0-1030-azure-x86_64-with-glibc2.36) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces?api-version=2025-06-01-preview + response: + body: + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/shane_cli_test/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/clitest0724","name":"clitest0724","type":"microsoft.storagediscovery/storagediscoveryworkspaces","location":"francecentral","tags":{"team":"Discovery","tag4":"value4"},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-07-24T20:55:05.0509322Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-07-24T20:55:14.4024626Z"},"properties":{"sku":"Free","workspaceRoots":["/subscriptions/00000000-0000-0000-0000-000000000000"],"description":"test2","scopes":[{"displayName":"test2","resourceTypes":["Microsoft.Storage/storageAccounts"],"tagKeysOnly":["e2etest2"],"tags":{"tag3":"value3"}}],"provisioningState":"Succeeded"}}]}' + headers: + cache-control: + - no-cache + content-length: + - '853' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 24 Jul 2025 21:18:02 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-original-request-ids: + - 92bf27dc-ec8f-4ad4-8a63-263a925996e2 + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: 66ED014298694DF598E9324C559D74AD Ref B: MWH011020807040 Ref C: 2025-07-24T21:18:02Z' + status: + code: 200 + message: OK +version: 1 diff --git a/src/storage-discovery/azext_storage_discovery/tests/latest/recordings/test_storage_discovery_workspace_scenarios.yaml b/src/storage-discovery/azext_storage_discovery/tests/latest/recordings/test_storage_discovery_workspace_scenarios.yaml new file mode 100644 index 00000000000..4550bb0dfb7 --- /dev/null +++ b/src/storage-discovery/azext_storage_discovery/tests/latest/recordings/test_storage_discovery_workspace_scenarios.yaml @@ -0,0 +1,389 @@ +interactions: +- request: + body: '{"location": "francecentral", "properties": {"description": "123", "scopes": + [{"displayName": "test1", "resourceTypes": ["Microsoft.Storage/storageAccounts"], + "tagKeysOnly": ["e2etest1"], "tags": {"tag1": "value1", "tag2": "value2"}}], + "sku": "Standard", "workspaceRoots": ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"]}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - storage-discovery workspace create + Connection: + - keep-alive + Content-Length: + - '362' + Content-Type: + - application/json + ParameterSetName: + - -g -n --location --description --sku --workspace-roots --scopes + User-Agent: + - AZURECLI/2.75.0 azsdk-python-core/1.35.0 Python/3.12.11 (Linux-6.8.0-1030-azure-x86_64-with-glibc2.36) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/clitest000002?api-version=2025-06-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/clitest000002","name":"clitest000002","type":"microsoft.storagediscovery/storagediscoveryworkspaces","location":"francecentral","tags":{"team":"Discovery"},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-07-24T21:18:05.8416915Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-07-24T21:18:05.8416915Z"},"properties":{"sku":"Standard","workspaceRoots":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"],"description":"123","scopes":[{"displayName":"test1","resourceTypes":["Microsoft.Storage/storageAccounts"],"tagKeysOnly":["e2etest1"],"tags":{"tag1":"value1","tag2":"value2"}}],"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '881' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 24 Jul 2025 21:18:06 GMT + etag: + - '"3300ae17-0000-0e00-0000-6882a30e0000"' + expires: + - '-1' + mise-correlation-id: + - fd7d531b-97db-41a7-b24a-2744b8b26fbb + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=2968a26f-a796-4124-8684-894f8a239db2/francecentral/a25529cc-8a60-48ed-a20f-87f0b95aec2f + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-global-writes: + - '11999' + x-ms-ratelimit-remaining-subscription-writes: + - '799' + x-msedge-ref: + - 'Ref A: 31BA6D06E25140799214D4ECF172EE94 Ref B: MWH011020809062 Ref C: 2025-07-24T21:18:05Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - storage-discovery workspace show + Connection: + - keep-alive + ParameterSetName: + - -g -n + User-Agent: + - AZURECLI/2.75.0 azsdk-python-core/1.35.0 Python/3.12.11 (Linux-6.8.0-1030-azure-x86_64-with-glibc2.36) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/clitest000002?api-version=2025-06-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/clitest000002","name":"clitest000002","type":"microsoft.storagediscovery/storagediscoveryworkspaces","location":"francecentral","tags":{"team":"Discovery"},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-07-24T21:18:05.8416915Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-07-24T21:18:05.8416915Z"},"properties":{"sku":"Standard","workspaceRoots":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"],"description":"123","scopes":[{"displayName":"test1","resourceTypes":["Microsoft.Storage/storageAccounts"],"tagKeysOnly":["e2etest1"],"tags":{"tag1":"value1","tag2":"value2"}}],"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '881' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 24 Jul 2025 21:18:06 GMT + etag: + - '"3300ae17-0000-0e00-0000-6882a30e0000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: B7D8E70E4E7047A5850838D2568E474C Ref B: MWH011020806054 Ref C: 2025-07-24T21:18:06Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - storage-discovery workspace list + Connection: + - keep-alive + ParameterSetName: + - -g + User-Agent: + - AZURECLI/2.75.0 azsdk-python-core/1.35.0 Python/3.12.11 (Linux-6.8.0-1030-azure-x86_64-with-glibc2.36) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces?api-version=2025-06-01-preview + response: + body: + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/clitest000002","name":"clitest000002","type":"microsoft.storagediscovery/storagediscoveryworkspaces","location":"francecentral","tags":{"team":"Discovery"},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-07-24T21:18:05.8416915Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-07-24T21:18:05.8416915Z"},"properties":{"sku":"Standard","workspaceRoots":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"],"description":"123","scopes":[{"displayName":"test1","resourceTypes":["Microsoft.Storage/storageAccounts"],"tagKeysOnly":["e2etest1"],"tags":{"tag1":"value1","tag2":"value2"}}],"provisioningState":"Succeeded"}}]}' + headers: + cache-control: + - no-cache + content-length: + - '893' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 24 Jul 2025 21:18:07 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-original-request-ids: + - ff291698-87bf-4ea4-8059-23e5d3054c0c + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: 259BFC808CE94006834EDC1CB2630EAF Ref B: MWH011020808034 Ref C: 2025-07-24T21:18:07Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - storage-discovery workspace update + Connection: + - keep-alive + ParameterSetName: + - -g -n --description --sku --workspace-roots --scopes --tags + User-Agent: + - AZURECLI/2.75.0 azsdk-python-core/1.35.0 Python/3.12.11 (Linux-6.8.0-1030-azure-x86_64-with-glibc2.36) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/clitest000002?api-version=2025-06-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/clitest000002","name":"clitest000002","type":"microsoft.storagediscovery/storagediscoveryworkspaces","location":"francecentral","tags":{"team":"Discovery"},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-07-24T21:18:05.8416915Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-07-24T21:18:05.8416915Z"},"properties":{"sku":"Standard","workspaceRoots":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"],"description":"123","scopes":[{"displayName":"test1","resourceTypes":["Microsoft.Storage/storageAccounts"],"tagKeysOnly":["e2etest1"],"tags":{"tag1":"value1","tag2":"value2"}}],"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '881' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 24 Jul 2025 21:18:07 GMT + etag: + - '"3300ae17-0000-0e00-0000-6882a30e0000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: CBCCF3A9EE6E4464A4F7433387110968 Ref B: MWH011020808060 Ref C: 2025-07-24T21:18:07Z' + status: + code: 200 + message: OK +- request: + body: '{"location": "francecentral", "properties": {"description": "test2", "scopes": + [{"displayName": "test2", "resourceTypes": ["Microsoft.Storage/storageAccounts"], + "tagKeysOnly": ["e2etest2"], "tags": {"tag3": "value3"}}], "sku": "Free", "workspaceRoots": + ["/subscriptions/00000000-0000-0000-0000-000000000000"]}, "tags": {"team": "Discovery", + "tag4": "value4"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - storage-discovery workspace update + Connection: + - keep-alive + Content-Length: + - '359' + Content-Type: + - application/json + ParameterSetName: + - -g -n --description --sku --workspace-roots --scopes --tags + User-Agent: + - AZURECLI/2.75.0 azsdk-python-core/1.35.0 Python/3.12.11 (Linux-6.8.0-1030-azure-x86_64-with-glibc2.36) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/clitest000002?api-version=2025-06-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/clitest000002","name":"clitest000002","type":"microsoft.storagediscovery/storagediscoveryworkspaces","location":"francecentral","tags":{"team":"Discovery","tag4":"value4"},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-07-24T21:18:05.8416915Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-07-24T21:18:09.3523493Z"},"properties":{"sku":"Free","workspaceRoots":["/subscriptions/00000000-0000-0000-0000-000000000000"],"description":"test2","scopes":[{"displayName":"test2","resourceTypes":["Microsoft.Storage/storageAccounts"],"tagKeysOnly":["e2etest2"],"tags":{"tag3":"value3"}}],"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '847' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 24 Jul 2025 21:18:10 GMT + etag: + - '"3300bf17-0000-0e00-0000-6882a3110000"' + expires: + - '-1' + mise-correlation-id: + - 24e6754b-0746-4198-954b-81e67c3f2eab + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=2968a26f-a796-4124-8684-894f8a239db2/eastus2/567356aa-0931-4f2c-8768-dbad45dec229 + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-global-writes: + - '11999' + x-ms-ratelimit-remaining-subscription-writes: + - '799' + x-msedge-ref: + - 'Ref A: BBD8ED0892C54EEA82E87554BBB3F0E2 Ref B: CO6AA3150217045 Ref C: 2025-07-24T21:18:08Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - storage-discovery workspace delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g -n -y + User-Agent: + - AZURECLI/2.75.0 azsdk-python-core/1.35.0 Python/3.12.11 (Linux-6.8.0-1030-azure-x86_64-with-glibc2.36) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/clitest000002?api-version=2025-06-01-preview + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Thu, 24 Jul 2025 21:18:11 GMT + expires: + - '-1' + mise-correlation-id: + - 693399cb-e188-4c95-8afa-fcfae74390a0 + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=2968a26f-a796-4124-8684-894f8a239db2/francecentral/31cf46f0-d44c-49ea-a236-1e84306267d3 + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-deletes: + - '799' + x-ms-ratelimit-remaining-subscription-global-deletes: + - '11999' + x-msedge-ref: + - 'Ref A: 37FE7A0DF8354C8AAED4C55F5CA5BE1F Ref B: MWH011020808062 Ref C: 2025-07-24T21:18:10Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - storage-discovery workspace list + Connection: + - keep-alive + ParameterSetName: + - -g + User-Agent: + - AZURECLI/2.75.0 azsdk-python-core/1.35.0 Python/3.12.11 (Linux-6.8.0-1030-azure-x86_64-with-glibc2.36) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces?api-version=2025-06-01-preview + response: + body: + string: '{"value":[]}' + headers: + cache-control: + - no-cache + content-length: + - '12' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 24 Jul 2025 21:18:12 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: 1F75A70F45B3414CAF12FA7B301AAEF4 Ref B: CO6AA3150220021 Ref C: 2025-07-24T21:18:12Z' + status: + code: 200 + message: OK +version: 1 diff --git a/src/storage-discovery/azext_storage_discovery/tests/latest/test_storage_discovery.py b/src/storage-discovery/azext_storage_discovery/tests/latest/test_storage_discovery.py index d75555ddac5..6ef6547ea5c 100644 --- a/src/storage-discovery/azext_storage_discovery/tests/latest/test_storage_discovery.py +++ b/src/storage-discovery/azext_storage_discovery/tests/latest/test_storage_discovery.py @@ -9,5 +9,118 @@ class StorageDiscoveryScenario(ScenarioTest): - # TODO: add tests here - pass + @ResourceGroupPreparer(location='francecentral') + def test_storage_discovery_workspace_scenarios(self): + self.kwargs.update({ + "workspace_name": self.create_random_name('clitest', 18), + "discovery_scope_level1": f"/subscriptions/{self.get_subscription_id()}/resourceGroups/{self.kwargs['rg']}", + "discovery_scope_level2": f"/subscriptions/{self.get_subscription_id()}" + }) + + # Test create workspace with scope file + self.kwargs.update({ + "scope1_json": '[{"displayName":"test1","resourceTypes":["Microsoft.Storage/storageAccounts"],"tagKeysOnly":["e2etest1"],"tags":{"tag1":"value1","tag2":"value2"}}]' + }) + + # Create workspace + self.cmd('az storage-discovery workspace create ' + '-g {rg} -n {workspace_name} --location francecentral ' + '--description "123" --sku Standard ' + '--workspace-roots "{discovery_scope_level1}" ' + '--scopes "{scope1_json}"', + checks=[ + JMESPathCheck('name', self.kwargs.get('workspace_name', '')), + JMESPathCheck('location', "francecentral"), + JMESPathCheck('properties.description', "123"), + JMESPathCheck('properties.sku', "Standard"), + JMESPathCheck('properties.workspaceRoots[0]', self.kwargs.get('discovery_scope_level1', '')), + JMESPathCheck('properties.scopes[0].displayName', "test1"), + JMESPathCheck('properties.scopes[0].resourceTypes[0]', "Microsoft.Storage/storageAccounts"), + JMESPathCheck('properties.scopes[0].tagKeysOnly[0]', "e2etest1"), + JMESPathCheck('properties.scopes[0].tags.tag1', "value1"), + JMESPathCheck('properties.scopes[0].tags.tag2', "value2") + ]) + + # Test show workspace + self.cmd('az storage-discovery workspace show -g {rg} -n {workspace_name}', + checks=[ + JMESPathCheck('name', self.kwargs.get('workspace_name', '')), + JMESPathCheck('location', "francecentral"), + JMESPathCheck('properties.description', "123"), + JMESPathCheck('properties.sku', "Standard") + ]) + + # Test list workspaces from resource group + self.cmd('az storage-discovery workspace list -g {rg}', + checks=[JMESPathCheck('length(@)', 1)]) + + # Test update workspace + self.kwargs.update({ + "scope2_json": '[{"displayName":"test2","resourceTypes":["Microsoft.Storage/storageAccounts"],"tagKeysOnly":["e2etest2"],"tags":{"tag3":"value3"}}]' + }) + + self.cmd('az storage-discovery workspace update ' + '-g {rg} -n {workspace_name} ' + '--description "test2" --sku Free ' + '--workspace-roots "{discovery_scope_level2}" ' + '--scopes "{scope2_json}" ' + '--tags tag4=value4', + checks=[ + JMESPathCheck('properties.description', "test2"), + JMESPathCheck('properties.sku', "Free"), + JMESPathCheck('properties.workspaceRoots[0]', self.kwargs.get('discovery_scope_level2', '')), + JMESPathCheck('properties.scopes[0].displayName', "test2"), + JMESPathCheck('properties.scopes[0].tagKeysOnly[0]', "e2etest2"), + JMESPathCheck('properties.scopes[0].tags.tag3', "value3"), + JMESPathCheck('tags.tag4', "value4") + ]) + + # Test delete workspace + self.cmd('az storage-discovery workspace delete -g {rg} -n {workspace_name} -y') + + # Verify workspace is deleted + self.cmd('az storage-discovery workspace list -g {rg}', + checks=[JMESPathCheck('length(@)', 0)]) + + @ResourceGroupPreparer(location='eastus2') + def test_storage_discovery_workspace_basic_operations(self): + self.kwargs.update({ + "workspace_name": self.create_random_name('sdworkspace', 18), + "workspace_scope": f"/subscriptions/{self.get_subscription_id()}/resourceGroups/{self.kwargs['rg']}", + "basic_scope_json": '[{"displayName":"basic","resourceTypes":["Microsoft.Storage/storageAccounts"]}]' + }) + + # Test create workspace with minimal parameters but required scopes + self.cmd('az storage-discovery workspace create ' + '-g {rg} -n {workspace_name} --location eastus2 ' + '--workspace-roots "{workspace_scope}" ' + '--scopes "{basic_scope_json}"', + checks=[ + JMESPathCheck('name', self.kwargs.get('workspace_name', '')), + JMESPathCheck('location', "eastus2"), + JMESPathCheck('properties.workspaceRoots[0]', self.kwargs.get('workspace_scope', '')) + ]) + + # Test show workspace + self.cmd('az storage-discovery workspace show -g {rg} -n {workspace_name}', + checks=[ + JMESPathCheck('name', self.kwargs.get('workspace_name', '')), + JMESPathCheck('location', "eastus2") + ]) + + # Test update workspace with tags only + self.cmd('az storage-discovery workspace update ' + '-g {rg} -n {workspace_name} ' + '--tags environment=test purpose=demo', + checks=[ + JMESPathCheck('tags.environment', "test"), + JMESPathCheck('tags.purpose', "demo") + ]) + + # Clean up + self.cmd('az storage-discovery workspace delete -g {rg} -n {workspace_name} -y') + + def test_storage_discovery_workspace_list_subscription(self): + # Test list workspaces from subscription (may be empty) + result = self.cmd('az storage-discovery workspace list').get_output_in_json() + self.assertIsInstance(result, list) From 8c2e231c78395cb8c6fba101518481084f474d36 Mon Sep 17 00:00:00 2001 From: shanefujs <75388289+shanefujs@users.noreply.github.com> Date: Thu, 24 Jul 2025 21:53:53 +0000 Subject: [PATCH 03/10] Add help.py for azext_storage_discovery --- .../azext_storage_discovery/_help.py | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/src/storage-discovery/azext_storage_discovery/_help.py b/src/storage-discovery/azext_storage_discovery/_help.py index 126d5d00714..faed951223c 100644 --- a/src/storage-discovery/azext_storage_discovery/_help.py +++ b/src/storage-discovery/azext_storage_discovery/_help.py @@ -9,3 +9,53 @@ # pylint: disable=too-many-lines from knack.help_files import helps # pylint: disable=unused-import + +helps['storage-discovery workspace create'] = """ + type: command + short-summary: Create a storage discovery workspace. + examples: + - name: Create a storage discovery workspace with basic settings. + text: | + az storage-discovery workspace create \\ + --resource-group myRG \\ + --name myWorkspace \\ + --location eastus2 \\ + --workspace-roots "/subscriptions/mySubId/resourceGroups/myRG" \\ + --scopes '[{"displayName":"basic","resourceTypes":["Microsoft.Storage/storageAccounts"]}]' + - name: Create a storage discovery workspace with full configuration. + text: | + az storage-discovery workspace create \\ + --resource-group myRG \\ + --name myWorkspace \\ + --location francecentral \\ + --description "My workspace for storage discovery" \\ + --sku Standard \\ + --workspace-roots "/subscriptions/mySubId/resourceGroups/myRG" \\ + --scopes '[{"displayName":"production","resourceTypes":["Microsoft.Storage/storageAccounts"],"tagKeysOnly":["environment"],"tags":{"project":"demo","tier":"prod"}}]' +""" + +helps['storage-discovery workspace update'] = """ + type: command + short-summary: Update a storage discovery workspace. + examples: + - name: Update workspace description and SKU. + text: | + az storage-discovery workspace update \\ + --resource-group myRG \\ + --name myWorkspace \\ + --description "Updated description" \\ + --sku Free + - name: Update workspace with new scopes and tags. + text: | + az storage-discovery workspace update \\ + --resource-group myRG \\ + --name myWorkspace \\ + --scopes '[{"displayName":"updated","resourceTypes":["Microsoft.Storage/storageAccounts"],"tags":{"environment":"test"}}]' \\ + --tags environment=production team=storage + - name: Update workspace roots to subscription level. + text: | + az storage-discovery workspace update \\ + --resource-group myRG \\ + --name myWorkspace \\ + --workspace-roots "/subscriptions/mySubId" +""" From 70dd282bf80fdb16783fede093adb1372699bb0d Mon Sep 17 00:00:00 2001 From: shanefujs <75388289+shanefujs@users.noreply.github.com> Date: Thu, 24 Jul 2025 22:34:10 +0000 Subject: [PATCH 04/10] split test into test__ --- ..._discovery_workspace_basic_operations.yaml | 72 ++-- ...st_storage_discovery_workspace_create.yaml | 125 ++++++ ...covery_workspace_create_update_delete.yaml | 389 ++++++++++++++++++ ...st_storage_discovery_workspace_delete.yaml | 220 ++++++++++ ...test_storage_discovery_workspace_list.yaml | 50 +++ ...discovery_workspace_list_subscription.yaml | 6 +- ...storage_discovery_workspace_scenarios.yaml | 60 +-- ...test_storage_discovery_workspace_show.yaml | 291 +++++++++++++ ...storage_discovery_workspace_show_list.yaml | 291 +++++++++++++ ...st_storage_discovery_workspace_update.yaml | 242 +++++++++++ .../tests/latest/test_storage_discovery.py | 69 +++- 11 files changed, 1726 insertions(+), 89 deletions(-) create mode 100644 src/storage-discovery/azext_storage_discovery/tests/latest/recordings/test_storage_discovery_workspace_create.yaml create mode 100644 src/storage-discovery/azext_storage_discovery/tests/latest/recordings/test_storage_discovery_workspace_create_update_delete.yaml create mode 100644 src/storage-discovery/azext_storage_discovery/tests/latest/recordings/test_storage_discovery_workspace_delete.yaml create mode 100644 src/storage-discovery/azext_storage_discovery/tests/latest/recordings/test_storage_discovery_workspace_list.yaml create mode 100644 src/storage-discovery/azext_storage_discovery/tests/latest/recordings/test_storage_discovery_workspace_show.yaml create mode 100644 src/storage-discovery/azext_storage_discovery/tests/latest/recordings/test_storage_discovery_workspace_show_list.yaml create mode 100644 src/storage-discovery/azext_storage_discovery/tests/latest/recordings/test_storage_discovery_workspace_update.yaml diff --git a/src/storage-discovery/azext_storage_discovery/tests/latest/recordings/test_storage_discovery_workspace_basic_operations.yaml b/src/storage-discovery/azext_storage_discovery/tests/latest/recordings/test_storage_discovery_workspace_basic_operations.yaml index b8af95974b1..fe903f62d53 100644 --- a/src/storage-discovery/azext_storage_discovery/tests/latest/recordings/test_storage_discovery_workspace_basic_operations.yaml +++ b/src/storage-discovery/azext_storage_discovery/tests/latest/recordings/test_storage_discovery_workspace_basic_operations.yaml @@ -1,7 +1,7 @@ interactions: - request: - body: '{"location": "eastus2", "properties": {"scopes": [{"displayName": "basic", - "resourceTypes": ["Microsoft.Storage/storageAccounts"]}], "sku": "Standard", + body: '{"location": "francecentral", "properties": {"scopes": [{"displayName": + "basic", "resourceTypes": ["Microsoft.Storage/storageAccounts"]}], "sku": "Standard", "workspaceRoots": ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"]}}' headers: Accept: @@ -13,7 +13,7 @@ interactions: Connection: - keep-alive Content-Length: - - '259' + - '265' Content-Type: - application/json ParameterSetName: @@ -24,22 +24,22 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/sdworkspace000002?api-version=2025-06-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/sdworkspace000002","name":"sdworkspace000002","type":"microsoft.storagediscovery/storagediscoveryworkspaces","location":"eastus2","tags":{"team":"Discovery"},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-07-24T21:17:58.4629593Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-07-24T21:17:58.4629593Z"},"properties":{"sku":"Standard","workspaceRoots":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"],"description":null,"scopes":[{"displayName":"basic","resourceTypes":["Microsoft.Storage/storageAccounts"],"tagKeysOnly":null,"tags":null}],"provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/sdworkspace000002","name":"sdworkspace000002","type":"microsoft.storagediscovery/storagediscoveryworkspaces","location":"francecentral","tags":{"team":"Discovery"},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-07-24T22:14:39.2536939Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-07-24T22:14:39.2536939Z"},"properties":{"sku":"Standard","workspaceRoots":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"],"description":null,"scopes":[{"displayName":"basic","resourceTypes":["Microsoft.Storage/storageAccounts"],"tagKeysOnly":null,"tags":null}],"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache content-length: - - '845' + - '851' content-type: - application/json; charset=utf-8 date: - - Thu, 24 Jul 2025 21:17:59 GMT + - Thu, 24 Jul 2025 22:14:41 GMT etag: - - '"760050c5-0000-0200-0000-6882a3070000"' + - '"3300935e-0000-0e00-0000-6882b0500000"' expires: - '-1' mise-correlation-id: - - adde756f-f8e2-4d08-8a1a-4c5181739934 + - 9858e535-ac5a-4b83-8f59-3762dcd38419 pragma: - no-cache strict-transport-security: @@ -51,15 +51,15 @@ interactions: x-content-type-options: - nosniff x-ms-operation-identifier: - - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=2968a26f-a796-4124-8684-894f8a239db2/francecentral/09ccaf80-9622-4006-be16-ef807137e1af + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=2968a26f-a796-4124-8684-894f8a239db2/westus2/3db9766a-c245-4e51-b71a-d647544fc572 x-ms-providerhub-traffic: - 'True' x-ms-ratelimit-remaining-subscription-global-writes: - - '11999' + - '12000' x-ms-ratelimit-remaining-subscription-writes: - - '799' + - '800' x-msedge-ref: - - 'Ref A: C854DF3996E14D61870CC086040E22BC Ref B: MWH011020808062 Ref C: 2025-07-24T21:17:56Z' + - 'Ref A: 7B6AD229B3684856AF2A949B26BC6851 Ref B: CO6AA3150217017 Ref C: 2025-07-24T22:14:35Z' x-powered-by: - ASP.NET status: @@ -84,18 +84,18 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/sdworkspace000002?api-version=2025-06-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/sdworkspace000002","name":"sdworkspace000002","type":"microsoft.storagediscovery/storagediscoveryworkspaces","location":"eastus2","tags":{"team":"Discovery"},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-07-24T21:17:58.4629593Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-07-24T21:17:58.4629593Z"},"properties":{"sku":"Standard","workspaceRoots":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"],"description":null,"scopes":[{"displayName":"basic","resourceTypes":["Microsoft.Storage/storageAccounts"],"tagKeysOnly":null,"tags":null}],"provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/sdworkspace000002","name":"sdworkspace000002","type":"microsoft.storagediscovery/storagediscoveryworkspaces","location":"francecentral","tags":{"team":"Discovery"},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-07-24T22:14:39.2536939Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-07-24T22:14:39.2536939Z"},"properties":{"sku":"Standard","workspaceRoots":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"],"description":null,"scopes":[{"displayName":"basic","resourceTypes":["Microsoft.Storage/storageAccounts"],"tagKeysOnly":null,"tags":null}],"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache content-length: - - '845' + - '851' content-type: - application/json; charset=utf-8 date: - - Thu, 24 Jul 2025 21:17:59 GMT + - Thu, 24 Jul 2025 22:14:41 GMT etag: - - '"760050c5-0000-0200-0000-6882a3070000"' + - '"3300935e-0000-0e00-0000-6882b0500000"' expires: - '-1' pragma: @@ -111,7 +111,7 @@ interactions: x-ms-ratelimit-remaining-subscription-global-reads: - '16499' x-msedge-ref: - - 'Ref A: F6E7430F324E4975A24C90FD6E5086F8 Ref B: CO6AA3150220021 Ref C: 2025-07-24T21:17:59Z' + - 'Ref A: 375C73040750438DAE7B983500FF6AEA Ref B: MWH011020809062 Ref C: 2025-07-24T22:14:41Z' status: code: 200 message: OK @@ -134,18 +134,18 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/sdworkspace000002?api-version=2025-06-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/sdworkspace000002","name":"sdworkspace000002","type":"microsoft.storagediscovery/storagediscoveryworkspaces","location":"eastus2","tags":{"team":"Discovery"},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-07-24T21:17:58.4629593Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-07-24T21:17:58.4629593Z"},"properties":{"sku":"Standard","workspaceRoots":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"],"description":null,"scopes":[{"displayName":"basic","resourceTypes":["Microsoft.Storage/storageAccounts"],"tagKeysOnly":null,"tags":null}],"provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/sdworkspace000002","name":"sdworkspace000002","type":"microsoft.storagediscovery/storagediscoveryworkspaces","location":"francecentral","tags":{"team":"Discovery"},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-07-24T22:14:39.2536939Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-07-24T22:14:39.2536939Z"},"properties":{"sku":"Standard","workspaceRoots":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"],"description":null,"scopes":[{"displayName":"basic","resourceTypes":["Microsoft.Storage/storageAccounts"],"tagKeysOnly":null,"tags":null}],"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache content-length: - - '845' + - '851' content-type: - application/json; charset=utf-8 date: - - Thu, 24 Jul 2025 21:17:59 GMT + - Thu, 24 Jul 2025 22:14:42 GMT etag: - - '"760050c5-0000-0200-0000-6882a3070000"' + - '"3300935e-0000-0e00-0000-6882b0500000"' expires: - '-1' pragma: @@ -161,13 +161,13 @@ interactions: x-ms-ratelimit-remaining-subscription-global-reads: - '16499' x-msedge-ref: - - 'Ref A: B5112EA40BDA46D599C693382A064FF5 Ref B: CO6AA3150217017 Ref C: 2025-07-24T21:18:00Z' + - 'Ref A: 1D86B07E7B144DBD8CD53EFF36631ECD Ref B: MWH011020807034 Ref C: 2025-07-24T22:14:41Z' status: code: 200 message: OK - request: - body: '{"location": "eastus2", "properties": {"scopes": [{"displayName": "basic", - "resourceTypes": ["Microsoft.Storage/storageAccounts"]}], "sku": "Standard", + body: '{"location": "francecentral", "properties": {"scopes": [{"displayName": + "basic", "resourceTypes": ["Microsoft.Storage/storageAccounts"]}], "sku": "Standard", "workspaceRoots": ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"]}, "tags": {"team": "Discovery", "environment": "test", "purpose": "demo"}}' headers: @@ -180,7 +180,7 @@ interactions: Connection: - keep-alive Content-Length: - - '332' + - '338' Content-Type: - application/json ParameterSetName: @@ -191,22 +191,22 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/sdworkspace000002?api-version=2025-06-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/sdworkspace000002","name":"sdworkspace000002","type":"microsoft.storagediscovery/storagediscoveryworkspaces","location":"eastus2","tags":{"team":"Discovery","environment":"test","purpose":"demo"},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-07-24T21:17:58.4629593Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-07-24T21:18:00.3191058Z"},"properties":{"sku":"Standard","workspaceRoots":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"],"description":null,"scopes":[{"displayName":"basic","resourceTypes":["Microsoft.Storage/storageAccounts"],"tagKeysOnly":null,"tags":null}],"provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/sdworkspace000002","name":"sdworkspace000002","type":"microsoft.storagediscovery/storagediscoveryworkspaces","location":"francecentral","tags":{"team":"Discovery","environment":"test","purpose":"demo"},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-07-24T22:14:39.2536939Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-07-24T22:14:44.4601711Z"},"properties":{"sku":"Standard","workspaceRoots":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"],"description":null,"scopes":[{"displayName":"basic","resourceTypes":["Microsoft.Storage/storageAccounts"],"tagKeysOnly":null,"tags":null}],"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache content-length: - - '883' + - '889' content-type: - application/json; charset=utf-8 date: - - Thu, 24 Jul 2025 21:18:00 GMT + - Thu, 24 Jul 2025 22:14:45 GMT etag: - - '"760054c5-0000-0200-0000-6882a3080000"' + - '"3300b95e-0000-0e00-0000-6882b0540000"' expires: - '-1' mise-correlation-id: - - 1b1690c5-7c24-4c92-8fa9-2bfefbc27a69 + - 9825add9-4547-4ef3-b0fa-fdf26ac4cce4 pragma: - no-cache strict-transport-security: @@ -218,7 +218,7 @@ interactions: x-content-type-options: - nosniff x-ms-operation-identifier: - - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=2968a26f-a796-4124-8684-894f8a239db2/eastus2/b5631529-fe40-4673-ad4e-4a319042478b + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=2968a26f-a796-4124-8684-894f8a239db2/southcentralus/eb0deb71-07ae-43c1-bab7-c30f9213e1eb x-ms-providerhub-traffic: - 'True' x-ms-ratelimit-remaining-subscription-global-writes: @@ -226,7 +226,7 @@ interactions: x-ms-ratelimit-remaining-subscription-writes: - '799' x-msedge-ref: - - 'Ref A: 31540AE5E70C4EFBBBC6D0B26E558575 Ref B: CO6AA3150217045 Ref C: 2025-07-24T21:18:00Z' + - 'Ref A: E0AE81407E1A49DDBD3C003FC57111E5 Ref B: MWH011020806054 Ref C: 2025-07-24T22:14:42Z' x-powered-by: - ASP.NET status: @@ -260,11 +260,11 @@ interactions: content-length: - '0' date: - - Thu, 24 Jul 2025 21:18:01 GMT + - Thu, 24 Jul 2025 22:14:48 GMT expires: - '-1' mise-correlation-id: - - 35a5aff1-451d-41f0-9d3c-e969b2ec5f61 + - b0e151d1-254e-40ac-b3db-06e04a787a81 pragma: - no-cache strict-transport-security: @@ -274,7 +274,7 @@ interactions: x-content-type-options: - nosniff x-ms-operation-identifier: - - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=2968a26f-a796-4124-8684-894f8a239db2/eastus2/910433b8-5595-4799-935b-c4d7d1aa1885 + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=2968a26f-a796-4124-8684-894f8a239db2/eastus/f3d89981-b22f-4a0c-96e8-c0a239e6b34b x-ms-providerhub-traffic: - 'True' x-ms-ratelimit-remaining-subscription-deletes: @@ -282,7 +282,7 @@ interactions: x-ms-ratelimit-remaining-subscription-global-deletes: - '11999' x-msedge-ref: - - 'Ref A: B52DC749D3B04777871C205D5B1DD4C7 Ref B: CO6AA3150220023 Ref C: 2025-07-24T21:18:00Z' + - 'Ref A: 9FCFD30302A34336B43A9398B884967D Ref B: MWH011020808060 Ref C: 2025-07-24T22:14:46Z' x-powered-by: - ASP.NET status: diff --git a/src/storage-discovery/azext_storage_discovery/tests/latest/recordings/test_storage_discovery_workspace_create.yaml b/src/storage-discovery/azext_storage_discovery/tests/latest/recordings/test_storage_discovery_workspace_create.yaml new file mode 100644 index 00000000000..9ea2c713c73 --- /dev/null +++ b/src/storage-discovery/azext_storage_discovery/tests/latest/recordings/test_storage_discovery_workspace_create.yaml @@ -0,0 +1,125 @@ +interactions: +- request: + body: '{"location": "francecentral", "properties": {"description": "123", "scopes": + [{"displayName": "test1", "resourceTypes": ["Microsoft.Storage/storageAccounts"], + "tagKeysOnly": ["e2etest1"], "tags": {"tag1": "value1", "tag2": "value2"}}], + "sku": "Standard", "workspaceRoots": ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"]}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - storage-discovery workspace create + Connection: + - keep-alive + Content-Length: + - '362' + Content-Type: + - application/json + ParameterSetName: + - -g -n --location --description --sku --workspace-roots --scopes + User-Agent: + - AZURECLI/2.75.0 azsdk-python-core/1.35.0 Python/3.12.11 (Linux-6.8.0-1030-azure-x86_64-with-glibc2.36) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/clitest000002?api-version=2025-06-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/clitest000002","name":"clitest000002","type":"microsoft.storagediscovery/storagediscoveryworkspaces","location":"francecentral","tags":{"team":"Discovery"},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-07-24T22:37:31.0040945Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-07-24T22:37:31.0040945Z"},"properties":{"sku":"Standard","workspaceRoots":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"],"description":"123","scopes":[{"displayName":"test1","resourceTypes":["Microsoft.Storage/storageAccounts"],"tagKeysOnly":["e2etest1"],"tags":{"tag1":"value1","tag2":"value2"}}],"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '881' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 24 Jul 2025 22:37:32 GMT + etag: + - '"33008f77-0000-0e00-0000-6882b5ac0000"' + expires: + - '-1' + mise-correlation-id: + - bf476c15-52e7-424e-bd8f-28edaed96703 + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=2968a26f-a796-4124-8684-894f8a239db2/francecentral/973b4bd4-64ee-4e1a-82cb-13cf84e4165e + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-global-writes: + - '11999' + x-ms-ratelimit-remaining-subscription-writes: + - '799' + x-msedge-ref: + - 'Ref A: 457A9C83FC3C4C5FA6955307CD01DB72 Ref B: CO6AA3150220029 Ref C: 2025-07-24T22:37:30Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - storage-discovery workspace delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g -n -y + User-Agent: + - AZURECLI/2.75.0 azsdk-python-core/1.35.0 Python/3.12.11 (Linux-6.8.0-1030-azure-x86_64-with-glibc2.36) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/clitest000002?api-version=2025-06-01-preview + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Thu, 24 Jul 2025 22:37:36 GMT + expires: + - '-1' + mise-correlation-id: + - 5fb7c08e-7716-46e7-889d-d17a6d48815e + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=2968a26f-a796-4124-8684-894f8a239db2/westus2/1cd607f0-df48-45b1-9dec-38407f2ac8d9 + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-deletes: + - '799' + x-ms-ratelimit-remaining-subscription-global-deletes: + - '11999' + x-msedge-ref: + - 'Ref A: 23C3DD7E206948BC89D34D2FBE94F67A Ref B: MWH011020807034 Ref C: 2025-07-24T22:37:32Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +version: 1 diff --git a/src/storage-discovery/azext_storage_discovery/tests/latest/recordings/test_storage_discovery_workspace_create_update_delete.yaml b/src/storage-discovery/azext_storage_discovery/tests/latest/recordings/test_storage_discovery_workspace_create_update_delete.yaml new file mode 100644 index 00000000000..04e2fc457de --- /dev/null +++ b/src/storage-discovery/azext_storage_discovery/tests/latest/recordings/test_storage_discovery_workspace_create_update_delete.yaml @@ -0,0 +1,389 @@ +interactions: +- request: + body: '{"location": "francecentral", "properties": {"description": "123", "scopes": + [{"displayName": "test1", "resourceTypes": ["Microsoft.Storage/storageAccounts"], + "tagKeysOnly": ["e2etest1"], "tags": {"tag1": "value1", "tag2": "value2"}}], + "sku": "Standard", "workspaceRoots": ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"]}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - storage-discovery workspace create + Connection: + - keep-alive + Content-Length: + - '362' + Content-Type: + - application/json + ParameterSetName: + - -g -n --location --description --sku --workspace-roots --scopes + User-Agent: + - AZURECLI/2.75.0 azsdk-python-core/1.35.0 Python/3.12.11 (Linux-6.8.0-1030-azure-x86_64-with-glibc2.36) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/clitest000002?api-version=2025-06-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/clitest000002","name":"clitest000002","type":"microsoft.storagediscovery/storagediscoveryworkspaces","location":"francecentral","tags":{"team":"Discovery"},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-07-24T22:28:44.5662147Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-07-24T22:28:44.5662147Z"},"properties":{"sku":"Standard","workspaceRoots":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"],"description":"123","scopes":[{"displayName":"test1","resourceTypes":["Microsoft.Storage/storageAccounts"],"tagKeysOnly":["e2etest1"],"tags":{"tag1":"value1","tag2":"value2"}}],"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '881' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 24 Jul 2025 22:28:55 GMT + etag: + - '"33005f6e-0000-0e00-0000-6882b3a60000"' + expires: + - '-1' + mise-correlation-id: + - 914f4c74-dad1-47f9-a56a-3c4eea59b4c3 + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=2968a26f-a796-4124-8684-894f8a239db2/westus2/e5dcd45f-39d7-4eec-824c-288e7db831f0 + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-global-writes: + - '12000' + x-ms-ratelimit-remaining-subscription-writes: + - '800' + x-msedge-ref: + - 'Ref A: 629C1EC9CECB4F91B9F0AF294B2C157A Ref B: CO6AA3150217045 Ref C: 2025-07-24T22:28:41Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - storage-discovery workspace show + Connection: + - keep-alive + ParameterSetName: + - -g -n + User-Agent: + - AZURECLI/2.75.0 azsdk-python-core/1.35.0 Python/3.12.11 (Linux-6.8.0-1030-azure-x86_64-with-glibc2.36) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/clitest000002?api-version=2025-06-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/clitest000002","name":"clitest000002","type":"microsoft.storagediscovery/storagediscoveryworkspaces","location":"francecentral","tags":{"team":"Discovery"},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-07-24T22:28:44.5662147Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-07-24T22:28:44.5662147Z"},"properties":{"sku":"Standard","workspaceRoots":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"],"description":"123","scopes":[{"displayName":"test1","resourceTypes":["Microsoft.Storage/storageAccounts"],"tagKeysOnly":["e2etest1"],"tags":{"tag1":"value1","tag2":"value2"}}],"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '881' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 24 Jul 2025 22:28:55 GMT + etag: + - '"33005f6e-0000-0e00-0000-6882b3a60000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: 4830B56E26484A7AADE52CFD73222FDD Ref B: CO6AA3150220023 Ref C: 2025-07-24T22:28:55Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - storage-discovery workspace list + Connection: + - keep-alive + ParameterSetName: + - -g + User-Agent: + - AZURECLI/2.75.0 azsdk-python-core/1.35.0 Python/3.12.11 (Linux-6.8.0-1030-azure-x86_64-with-glibc2.36) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces?api-version=2025-06-01-preview + response: + body: + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/clitest000002","name":"clitest000002","type":"microsoft.storagediscovery/storagediscoveryworkspaces","location":"francecentral","tags":{"team":"Discovery"},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-07-24T22:28:44.5662147Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-07-24T22:28:44.5662147Z"},"properties":{"sku":"Standard","workspaceRoots":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"],"description":"123","scopes":[{"displayName":"test1","resourceTypes":["Microsoft.Storage/storageAccounts"],"tagKeysOnly":["e2etest1"],"tags":{"tag1":"value1","tag2":"value2"}}],"provisioningState":"Succeeded"}}]}' + headers: + cache-control: + - no-cache + content-length: + - '893' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 24 Jul 2025 22:28:56 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-original-request-ids: + - ae2c4c0a-512e-4d0b-ad6c-2923ab1d8f77 + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: DB06240E11CA4A1D866C78DD41C7AD7F Ref B: MWH011020807040 Ref C: 2025-07-24T22:28:56Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - storage-discovery workspace update + Connection: + - keep-alive + ParameterSetName: + - -g -n --description --sku --workspace-roots --scopes --tags + User-Agent: + - AZURECLI/2.75.0 azsdk-python-core/1.35.0 Python/3.12.11 (Linux-6.8.0-1030-azure-x86_64-with-glibc2.36) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/clitest000002?api-version=2025-06-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/clitest000002","name":"clitest000002","type":"microsoft.storagediscovery/storagediscoveryworkspaces","location":"francecentral","tags":{"team":"Discovery"},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-07-24T22:28:44.5662147Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-07-24T22:28:44.5662147Z"},"properties":{"sku":"Standard","workspaceRoots":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"],"description":"123","scopes":[{"displayName":"test1","resourceTypes":["Microsoft.Storage/storageAccounts"],"tagKeysOnly":["e2etest1"],"tags":{"tag1":"value1","tag2":"value2"}}],"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '881' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 24 Jul 2025 22:28:56 GMT + etag: + - '"33005f6e-0000-0e00-0000-6882b3a60000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: 8CFDDD275CEA47BC8B652C4EC4A7FC75 Ref B: MWH011020807034 Ref C: 2025-07-24T22:28:56Z' + status: + code: 200 + message: OK +- request: + body: '{"location": "francecentral", "properties": {"description": "test2", "scopes": + [{"displayName": "test2", "resourceTypes": ["Microsoft.Storage/storageAccounts"], + "tagKeysOnly": ["e2etest2"], "tags": {"tag3": "value3"}}], "sku": "Free", "workspaceRoots": + ["/subscriptions/00000000-0000-0000-0000-000000000000"]}, "tags": {"team": "Discovery", + "tag4": "value4"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - storage-discovery workspace update + Connection: + - keep-alive + Content-Length: + - '359' + Content-Type: + - application/json + ParameterSetName: + - -g -n --description --sku --workspace-roots --scopes --tags + User-Agent: + - AZURECLI/2.75.0 azsdk-python-core/1.35.0 Python/3.12.11 (Linux-6.8.0-1030-azure-x86_64-with-glibc2.36) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/clitest000002?api-version=2025-06-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/clitest000002","name":"clitest000002","type":"microsoft.storagediscovery/storagediscoveryworkspaces","location":"francecentral","tags":{"team":"Discovery","tag4":"value4"},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-07-24T22:28:44.5662147Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-07-24T22:28:59.067202Z"},"properties":{"sku":"Free","workspaceRoots":["/subscriptions/00000000-0000-0000-0000-000000000000"],"description":"test2","scopes":[{"displayName":"test2","resourceTypes":["Microsoft.Storage/storageAccounts"],"tagKeysOnly":["e2etest2"],"tags":{"tag3":"value3"}}],"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '846' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 24 Jul 2025 22:29:00 GMT + etag: + - '"3300736e-0000-0e00-0000-6882b3ab0000"' + expires: + - '-1' + mise-correlation-id: + - d62cbb49-ce0a-4980-8fd5-f90b88e592e2 + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=2968a26f-a796-4124-8684-894f8a239db2/eastus/301d3997-24d6-411f-98f9-d829c4b0ce4b + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-global-writes: + - '11999' + x-ms-ratelimit-remaining-subscription-writes: + - '799' + x-msedge-ref: + - 'Ref A: E3CFB4DF99B0477A8716A3C59F6C4764 Ref B: MWH011020806054 Ref C: 2025-07-24T22:28:57Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - storage-discovery workspace delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g -n -y + User-Agent: + - AZURECLI/2.75.0 azsdk-python-core/1.35.0 Python/3.12.11 (Linux-6.8.0-1030-azure-x86_64-with-glibc2.36) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/clitest000002?api-version=2025-06-01-preview + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Thu, 24 Jul 2025 22:29:04 GMT + expires: + - '-1' + mise-correlation-id: + - 9ac9d0c4-8b0b-4a4e-bfe0-4445fbbb84f0 + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=2968a26f-a796-4124-8684-894f8a239db2/westus/b219dfd7-9b90-4ab1-8e20-7a217a044b6e + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-deletes: + - '799' + x-ms-ratelimit-remaining-subscription-global-deletes: + - '11999' + x-msedge-ref: + - 'Ref A: 1E523ED9B7924FCA8067C259F0CB5CD2 Ref B: MWH011020808060 Ref C: 2025-07-24T22:29:00Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - storage-discovery workspace list + Connection: + - keep-alive + ParameterSetName: + - -g + User-Agent: + - AZURECLI/2.75.0 azsdk-python-core/1.35.0 Python/3.12.11 (Linux-6.8.0-1030-azure-x86_64-with-glibc2.36) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces?api-version=2025-06-01-preview + response: + body: + string: '{"value":[]}' + headers: + cache-control: + - no-cache + content-length: + - '12' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 24 Jul 2025 22:29:06 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: 5ECCE9107A2A4147BB1E9571E9EDF786 Ref B: MWH011020806023 Ref C: 2025-07-24T22:29:05Z' + status: + code: 200 + message: OK +version: 1 diff --git a/src/storage-discovery/azext_storage_discovery/tests/latest/recordings/test_storage_discovery_workspace_delete.yaml b/src/storage-discovery/azext_storage_discovery/tests/latest/recordings/test_storage_discovery_workspace_delete.yaml new file mode 100644 index 00000000000..64915c02653 --- /dev/null +++ b/src/storage-discovery/azext_storage_discovery/tests/latest/recordings/test_storage_discovery_workspace_delete.yaml @@ -0,0 +1,220 @@ +interactions: +- request: + body: '{"location": "francecentral", "properties": {"scopes": [{"displayName": + "basic", "resourceTypes": ["Microsoft.Storage/storageAccounts"]}], "sku": "Standard", + "workspaceRoots": ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"]}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - storage-discovery workspace create + Connection: + - keep-alive + Content-Length: + - '265' + Content-Type: + - application/json + ParameterSetName: + - -g -n --location --workspace-roots --scopes + User-Agent: + - AZURECLI/2.75.0 azsdk-python-core/1.35.0 Python/3.12.11 (Linux-6.8.0-1030-azure-x86_64-with-glibc2.36) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/deletews000002?api-version=2025-06-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/deletews000002","name":"deletews000002","type":"microsoft.storagediscovery/storagediscoveryworkspaces","location":"francecentral","tags":{"team":"Discovery"},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-07-24T22:37:33.7501037Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-07-24T22:37:33.7501037Z"},"properties":{"sku":"Standard","workspaceRoots":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"],"description":null,"scopes":[{"displayName":"basic","resourceTypes":["Microsoft.Storage/storageAccounts"],"tagKeysOnly":null,"tags":null}],"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '845' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 24 Jul 2025 22:37:35 GMT + etag: + - '"33009d77-0000-0e00-0000-6882b5ae0000"' + expires: + - '-1' + mise-correlation-id: + - 9724a1a3-cad6-40df-8564-a8776d4fc2f7 + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=2968a26f-a796-4124-8684-894f8a239db2/westus2/b0bccee9-4086-4f39-aef1-acb73b3ca4c3 + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-global-writes: + - '11999' + x-ms-ratelimit-remaining-subscription-writes: + - '799' + x-msedge-ref: + - 'Ref A: 1B1B11A046014511990BC078529BA863 Ref B: MWH011020809062 Ref C: 2025-07-24T22:37:30Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - storage-discovery workspace list + Connection: + - keep-alive + ParameterSetName: + - -g + User-Agent: + - AZURECLI/2.75.0 azsdk-python-core/1.35.0 Python/3.12.11 (Linux-6.8.0-1030-azure-x86_64-with-glibc2.36) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces?api-version=2025-06-01-preview + response: + body: + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/deletews000002","name":"deletews000002","type":"microsoft.storagediscovery/storagediscoveryworkspaces","location":"francecentral","tags":{"team":"Discovery"},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-07-24T22:37:33.7501037Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-07-24T22:37:33.7501037Z"},"properties":{"sku":"Standard","workspaceRoots":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"],"scopes":[{"displayName":"basic","resourceTypes":["Microsoft.Storage/storageAccounts"]}],"provisioningState":"Succeeded"}}]}' + headers: + cache-control: + - no-cache + content-length: + - '807' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 24 Jul 2025 22:37:35 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-original-request-ids: + - 9720d4f1-c255-450b-b0d6-315badfe9555 + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: C75AB7BF07F041D98D837E439A7B7252 Ref B: CO6AA3150217021 Ref C: 2025-07-24T22:37:35Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - storage-discovery workspace delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g -n -y + User-Agent: + - AZURECLI/2.75.0 azsdk-python-core/1.35.0 Python/3.12.11 (Linux-6.8.0-1030-azure-x86_64-with-glibc2.36) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/deletews000002?api-version=2025-06-01-preview + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Thu, 24 Jul 2025 22:37:38 GMT + expires: + - '-1' + mise-correlation-id: + - 6217a610-4a88-455e-b39d-478b1a117046 + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=2968a26f-a796-4124-8684-894f8a239db2/northeurope/bcf551bd-3810-44f7-b0d3-7b167d46b4f5 + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-deletes: + - '799' + x-ms-ratelimit-remaining-subscription-global-deletes: + - '11999' + x-msedge-ref: + - 'Ref A: 8398CC8A6169452E9419AA921CC72297 Ref B: MWH011020807029 Ref C: 2025-07-24T22:37:36Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - storage-discovery workspace list + Connection: + - keep-alive + ParameterSetName: + - -g + User-Agent: + - AZURECLI/2.75.0 azsdk-python-core/1.35.0 Python/3.12.11 (Linux-6.8.0-1030-azure-x86_64-with-glibc2.36) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces?api-version=2025-06-01-preview + response: + body: + string: '{"value":[]}' + headers: + cache-control: + - no-cache + content-length: + - '12' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 24 Jul 2025 22:37:38 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: E91AB6ED42D749B58726F3CA289ED686 Ref B: CO6AA3150217023 Ref C: 2025-07-24T22:37:38Z' + status: + code: 200 + message: OK +version: 1 diff --git a/src/storage-discovery/azext_storage_discovery/tests/latest/recordings/test_storage_discovery_workspace_list.yaml b/src/storage-discovery/azext_storage_discovery/tests/latest/recordings/test_storage_discovery_workspace_list.yaml new file mode 100644 index 00000000000..aac1d4d7bce --- /dev/null +++ b/src/storage-discovery/azext_storage_discovery/tests/latest/recordings/test_storage_discovery_workspace_list.yaml @@ -0,0 +1,50 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - storage-discovery workspace list + Connection: + - keep-alive + User-Agent: + - AZURECLI/2.75.0 azsdk-python-core/1.35.0 Python/3.12.11 (Linux-6.8.0-1030-azure-x86_64-with-glibc2.36) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces?api-version=2025-06-01-preview + response: + body: + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/shane_cli_test/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/clitest0724","name":"clitest0724","type":"microsoft.storagediscovery/storagediscoveryworkspaces","location":"francecentral","tags":{"team":"Discovery","tag4":"value4"},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-07-24T20:55:05.0509322Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-07-24T20:55:14.4024626Z"},"properties":{"sku":"Free","workspaceRoots":["/subscriptions/00000000-0000-0000-0000-000000000000"],"description":"test2","scopes":[{"displayName":"test2","resourceTypes":["Microsoft.Storage/storageAccounts"],"tagKeysOnly":["e2etest2"],"tags":{"tag3":"value3"}}],"provisioningState":"Succeeded"}}]}' + headers: + cache-control: + - no-cache + content-length: + - '853' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 24 Jul 2025 22:37:27 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-original-request-ids: + - 40312197-392b-4625-a884-d65e4fc80d9a + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: 016141B993444A46B293F28BB4974293 Ref B: CO6AA3150217045 Ref C: 2025-07-24T22:37:27Z' + status: + code: 200 + message: OK +version: 1 diff --git a/src/storage-discovery/azext_storage_discovery/tests/latest/recordings/test_storage_discovery_workspace_list_subscription.yaml b/src/storage-discovery/azext_storage_discovery/tests/latest/recordings/test_storage_discovery_workspace_list_subscription.yaml index 26146dd8522..c72f4bc7e73 100644 --- a/src/storage-discovery/azext_storage_discovery/tests/latest/recordings/test_storage_discovery_workspace_list_subscription.yaml +++ b/src/storage-discovery/azext_storage_discovery/tests/latest/recordings/test_storage_discovery_workspace_list_subscription.yaml @@ -25,7 +25,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 24 Jul 2025 21:18:02 GMT + - Thu, 24 Jul 2025 22:14:33 GMT expires: - '-1' pragma: @@ -37,13 +37,13 @@ interactions: x-content-type-options: - nosniff x-ms-original-request-ids: - - 92bf27dc-ec8f-4ad4-8a63-263a925996e2 + - d41c35b7-0e1b-4e3e-aba6-a91202deb7ff x-ms-providerhub-traffic: - 'True' x-ms-ratelimit-remaining-subscription-global-reads: - '16499' x-msedge-ref: - - 'Ref A: 66ED014298694DF598E9324C559D74AD Ref B: MWH011020807040 Ref C: 2025-07-24T21:18:02Z' + - 'Ref A: 40C2AB0E1C0A42E39A12357A571F1094 Ref B: CO6AA3150220021 Ref C: 2025-07-24T22:14:33Z' status: code: 200 message: OK diff --git a/src/storage-discovery/azext_storage_discovery/tests/latest/recordings/test_storage_discovery_workspace_scenarios.yaml b/src/storage-discovery/azext_storage_discovery/tests/latest/recordings/test_storage_discovery_workspace_scenarios.yaml index 4550bb0dfb7..6a0785a8805 100644 --- a/src/storage-discovery/azext_storage_discovery/tests/latest/recordings/test_storage_discovery_workspace_scenarios.yaml +++ b/src/storage-discovery/azext_storage_discovery/tests/latest/recordings/test_storage_discovery_workspace_scenarios.yaml @@ -25,7 +25,7 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/clitest000002?api-version=2025-06-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/clitest000002","name":"clitest000002","type":"microsoft.storagediscovery/storagediscoveryworkspaces","location":"francecentral","tags":{"team":"Discovery"},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-07-24T21:18:05.8416915Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-07-24T21:18:05.8416915Z"},"properties":{"sku":"Standard","workspaceRoots":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"],"description":"123","scopes":[{"displayName":"test1","resourceTypes":["Microsoft.Storage/storageAccounts"],"tagKeysOnly":["e2etest1"],"tags":{"tag1":"value1","tag2":"value2"}}],"provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/clitest000002","name":"clitest000002","type":"microsoft.storagediscovery/storagediscoveryworkspaces","location":"francecentral","tags":{"team":"Discovery"},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-07-24T22:14:37.1212669Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-07-24T22:14:37.1212669Z"},"properties":{"sku":"Standard","workspaceRoots":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"],"description":"123","scopes":[{"displayName":"test1","resourceTypes":["Microsoft.Storage/storageAccounts"],"tagKeysOnly":["e2etest1"],"tags":{"tag1":"value1","tag2":"value2"}}],"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache @@ -34,13 +34,13 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 24 Jul 2025 21:18:06 GMT + - Thu, 24 Jul 2025 22:14:38 GMT etag: - - '"3300ae17-0000-0e00-0000-6882a30e0000"' + - '"33008f5e-0000-0e00-0000-6882b04e0000"' expires: - '-1' mise-correlation-id: - - fd7d531b-97db-41a7-b24a-2744b8b26fbb + - 25b34baa-bfb1-4edd-a4f0-0104fbfc2f95 pragma: - no-cache strict-transport-security: @@ -52,7 +52,7 @@ interactions: x-content-type-options: - nosniff x-ms-operation-identifier: - - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=2968a26f-a796-4124-8684-894f8a239db2/francecentral/a25529cc-8a60-48ed-a20f-87f0b95aec2f + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=2968a26f-a796-4124-8684-894f8a239db2/francecentral/efbcba1d-258b-4ad4-9cc8-df076df5dd4b x-ms-providerhub-traffic: - 'True' x-ms-ratelimit-remaining-subscription-global-writes: @@ -60,7 +60,7 @@ interactions: x-ms-ratelimit-remaining-subscription-writes: - '799' x-msedge-ref: - - 'Ref A: 31BA6D06E25140799214D4ECF172EE94 Ref B: MWH011020809062 Ref C: 2025-07-24T21:18:05Z' + - 'Ref A: E03F413C8E8E467DA5202642B6904AEF Ref B: CO6AA3150217045 Ref C: 2025-07-24T22:14:36Z' x-powered-by: - ASP.NET status: @@ -85,7 +85,7 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/clitest000002?api-version=2025-06-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/clitest000002","name":"clitest000002","type":"microsoft.storagediscovery/storagediscoveryworkspaces","location":"francecentral","tags":{"team":"Discovery"},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-07-24T21:18:05.8416915Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-07-24T21:18:05.8416915Z"},"properties":{"sku":"Standard","workspaceRoots":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"],"description":"123","scopes":[{"displayName":"test1","resourceTypes":["Microsoft.Storage/storageAccounts"],"tagKeysOnly":["e2etest1"],"tags":{"tag1":"value1","tag2":"value2"}}],"provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/clitest000002","name":"clitest000002","type":"microsoft.storagediscovery/storagediscoveryworkspaces","location":"francecentral","tags":{"team":"Discovery"},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-07-24T22:14:37.1212669Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-07-24T22:14:37.1212669Z"},"properties":{"sku":"Standard","workspaceRoots":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"],"description":"123","scopes":[{"displayName":"test1","resourceTypes":["Microsoft.Storage/storageAccounts"],"tagKeysOnly":["e2etest1"],"tags":{"tag1":"value1","tag2":"value2"}}],"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache @@ -94,9 +94,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 24 Jul 2025 21:18:06 GMT + - Thu, 24 Jul 2025 22:14:39 GMT etag: - - '"3300ae17-0000-0e00-0000-6882a30e0000"' + - '"33008f5e-0000-0e00-0000-6882b04e0000"' expires: - '-1' pragma: @@ -112,7 +112,7 @@ interactions: x-ms-ratelimit-remaining-subscription-global-reads: - '16499' x-msedge-ref: - - 'Ref A: B7D8E70E4E7047A5850838D2568E474C Ref B: MWH011020806054 Ref C: 2025-07-24T21:18:06Z' + - 'Ref A: F6D09F2234784503A09BAC2E907FF30F Ref B: CO6AA3150220023 Ref C: 2025-07-24T22:14:38Z' status: code: 200 message: OK @@ -135,7 +135,7 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces?api-version=2025-06-01-preview response: body: - string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/clitest000002","name":"clitest000002","type":"microsoft.storagediscovery/storagediscoveryworkspaces","location":"francecentral","tags":{"team":"Discovery"},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-07-24T21:18:05.8416915Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-07-24T21:18:05.8416915Z"},"properties":{"sku":"Standard","workspaceRoots":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"],"description":"123","scopes":[{"displayName":"test1","resourceTypes":["Microsoft.Storage/storageAccounts"],"tagKeysOnly":["e2etest1"],"tags":{"tag1":"value1","tag2":"value2"}}],"provisioningState":"Succeeded"}}]}' + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/clitest000002","name":"clitest000002","type":"microsoft.storagediscovery/storagediscoveryworkspaces","location":"francecentral","tags":{"team":"Discovery"},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-07-24T22:14:37.1212669Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-07-24T22:14:37.1212669Z"},"properties":{"sku":"Standard","workspaceRoots":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"],"description":"123","scopes":[{"displayName":"test1","resourceTypes":["Microsoft.Storage/storageAccounts"],"tagKeysOnly":["e2etest1"],"tags":{"tag1":"value1","tag2":"value2"}}],"provisioningState":"Succeeded"}}]}' headers: cache-control: - no-cache @@ -144,7 +144,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 24 Jul 2025 21:18:07 GMT + - Thu, 24 Jul 2025 22:14:40 GMT expires: - '-1' pragma: @@ -156,13 +156,13 @@ interactions: x-content-type-options: - nosniff x-ms-original-request-ids: - - ff291698-87bf-4ea4-8059-23e5d3054c0c + - 8c20944d-26ee-4256-923b-00f68f480598 x-ms-providerhub-traffic: - 'True' x-ms-ratelimit-remaining-subscription-global-reads: - '16499' x-msedge-ref: - - 'Ref A: 259BFC808CE94006834EDC1CB2630EAF Ref B: MWH011020808034 Ref C: 2025-07-24T21:18:07Z' + - 'Ref A: 99ABC56CC3F14CB3BBBDB48448182D72 Ref B: CO6AA3150220029 Ref C: 2025-07-24T22:14:40Z' status: code: 200 message: OK @@ -185,7 +185,7 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/clitest000002?api-version=2025-06-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/clitest000002","name":"clitest000002","type":"microsoft.storagediscovery/storagediscoveryworkspaces","location":"francecentral","tags":{"team":"Discovery"},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-07-24T21:18:05.8416915Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-07-24T21:18:05.8416915Z"},"properties":{"sku":"Standard","workspaceRoots":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"],"description":"123","scopes":[{"displayName":"test1","resourceTypes":["Microsoft.Storage/storageAccounts"],"tagKeysOnly":["e2etest1"],"tags":{"tag1":"value1","tag2":"value2"}}],"provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/clitest000002","name":"clitest000002","type":"microsoft.storagediscovery/storagediscoveryworkspaces","location":"francecentral","tags":{"team":"Discovery"},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-07-24T22:14:37.1212669Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-07-24T22:14:37.1212669Z"},"properties":{"sku":"Standard","workspaceRoots":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"],"description":"123","scopes":[{"displayName":"test1","resourceTypes":["Microsoft.Storage/storageAccounts"],"tagKeysOnly":["e2etest1"],"tags":{"tag1":"value1","tag2":"value2"}}],"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache @@ -194,9 +194,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 24 Jul 2025 21:18:07 GMT + - Thu, 24 Jul 2025 22:14:40 GMT etag: - - '"3300ae17-0000-0e00-0000-6882a30e0000"' + - '"33008f5e-0000-0e00-0000-6882b04e0000"' expires: - '-1' pragma: @@ -212,7 +212,7 @@ interactions: x-ms-ratelimit-remaining-subscription-global-reads: - '16499' x-msedge-ref: - - 'Ref A: CBCCF3A9EE6E4464A4F7433387110968 Ref B: MWH011020808060 Ref C: 2025-07-24T21:18:07Z' + - 'Ref A: 991BCF26383C4B4CA737A4805D99046D Ref B: CO6AA3150220021 Ref C: 2025-07-24T22:14:40Z' status: code: 200 message: OK @@ -243,7 +243,7 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/clitest000002?api-version=2025-06-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/clitest000002","name":"clitest000002","type":"microsoft.storagediscovery/storagediscoveryworkspaces","location":"francecentral","tags":{"team":"Discovery","tag4":"value4"},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-07-24T21:18:05.8416915Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-07-24T21:18:09.3523493Z"},"properties":{"sku":"Free","workspaceRoots":["/subscriptions/00000000-0000-0000-0000-000000000000"],"description":"test2","scopes":[{"displayName":"test2","resourceTypes":["Microsoft.Storage/storageAccounts"],"tagKeysOnly":["e2etest2"],"tags":{"tag3":"value3"}}],"provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/clitest000002","name":"clitest000002","type":"microsoft.storagediscovery/storagediscoveryworkspaces","location":"francecentral","tags":{"team":"Discovery","tag4":"value4"},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-07-24T22:14:37.1212669Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-07-24T22:14:43.4604223Z"},"properties":{"sku":"Free","workspaceRoots":["/subscriptions/00000000-0000-0000-0000-000000000000"],"description":"test2","scopes":[{"displayName":"test2","resourceTypes":["Microsoft.Storage/storageAccounts"],"tagKeysOnly":["e2etest2"],"tags":{"tag3":"value3"}}],"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache @@ -252,13 +252,13 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 24 Jul 2025 21:18:10 GMT + - Thu, 24 Jul 2025 22:14:44 GMT etag: - - '"3300bf17-0000-0e00-0000-6882a3110000"' + - '"3300b55e-0000-0e00-0000-6882b0540000"' expires: - '-1' mise-correlation-id: - - 24e6754b-0746-4198-954b-81e67c3f2eab + - 143fb343-85ca-4cdc-9c74-f7ba3b8b752b pragma: - no-cache strict-transport-security: @@ -270,7 +270,7 @@ interactions: x-content-type-options: - nosniff x-ms-operation-identifier: - - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=2968a26f-a796-4124-8684-894f8a239db2/eastus2/567356aa-0931-4f2c-8768-dbad45dec229 + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=2968a26f-a796-4124-8684-894f8a239db2/northcentralus/e701502f-7d91-4894-bbe3-85c11e58ef27 x-ms-providerhub-traffic: - 'True' x-ms-ratelimit-remaining-subscription-global-writes: @@ -278,7 +278,7 @@ interactions: x-ms-ratelimit-remaining-subscription-writes: - '799' x-msedge-ref: - - 'Ref A: BBD8ED0892C54EEA82E87554BBB3F0E2 Ref B: CO6AA3150217045 Ref C: 2025-07-24T21:18:08Z' + - 'Ref A: 7FA295D3F1CD4A9A96786EB6ED18A324 Ref B: MWH011020807040 Ref C: 2025-07-24T22:14:41Z' x-powered-by: - ASP.NET status: @@ -312,11 +312,11 @@ interactions: content-length: - '0' date: - - Thu, 24 Jul 2025 21:18:11 GMT + - Thu, 24 Jul 2025 22:14:48 GMT expires: - '-1' mise-correlation-id: - - 693399cb-e188-4c95-8afa-fcfae74390a0 + - a6fe7771-3e85-4ffb-a485-8a6ee3b3ea58 pragma: - no-cache strict-transport-security: @@ -326,7 +326,7 @@ interactions: x-content-type-options: - nosniff x-ms-operation-identifier: - - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=2968a26f-a796-4124-8684-894f8a239db2/francecentral/31cf46f0-d44c-49ea-a236-1e84306267d3 + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=2968a26f-a796-4124-8684-894f8a239db2/eastus/09477364-317a-4639-a3d7-16fc25dee276 x-ms-providerhub-traffic: - 'True' x-ms-ratelimit-remaining-subscription-deletes: @@ -334,7 +334,7 @@ interactions: x-ms-ratelimit-remaining-subscription-global-deletes: - '11999' x-msedge-ref: - - 'Ref A: 37FE7A0DF8354C8AAED4C55F5CA5BE1F Ref B: MWH011020808062 Ref C: 2025-07-24T21:18:10Z' + - 'Ref A: 14BF7E760550459E9DA68858A9115C48 Ref B: MWH011020808034 Ref C: 2025-07-24T22:14:45Z' x-powered-by: - ASP.NET status: @@ -368,7 +368,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 24 Jul 2025 21:18:12 GMT + - Thu, 24 Jul 2025 22:14:48 GMT expires: - '-1' pragma: @@ -382,7 +382,7 @@ interactions: x-ms-ratelimit-remaining-subscription-global-reads: - '16499' x-msedge-ref: - - 'Ref A: 1F75A70F45B3414CAF12FA7B301AAEF4 Ref B: CO6AA3150220021 Ref C: 2025-07-24T21:18:12Z' + - 'Ref A: A5A132FF28D2496F89604B4EA84E838C Ref B: CO6AA3150217021 Ref C: 2025-07-24T22:14:49Z' status: code: 200 message: OK diff --git a/src/storage-discovery/azext_storage_discovery/tests/latest/recordings/test_storage_discovery_workspace_show.yaml b/src/storage-discovery/azext_storage_discovery/tests/latest/recordings/test_storage_discovery_workspace_show.yaml new file mode 100644 index 00000000000..8f0ee441bfc --- /dev/null +++ b/src/storage-discovery/azext_storage_discovery/tests/latest/recordings/test_storage_discovery_workspace_show.yaml @@ -0,0 +1,291 @@ +interactions: +- request: + body: '{"location": "francecentral", "properties": {"scopes": [{"displayName": + "basic", "resourceTypes": ["Microsoft.Storage/storageAccounts"]}], "sku": "Standard", + "workspaceRoots": ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"]}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - storage-discovery workspace create + Connection: + - keep-alive + Content-Length: + - '265' + Content-Type: + - application/json + ParameterSetName: + - -g -n --location --workspace-roots --scopes + User-Agent: + - AZURECLI/2.75.0 azsdk-python-core/1.35.0 Python/3.12.11 (Linux-6.8.0-1030-azure-x86_64-with-glibc2.36) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/sdworkspace000002?api-version=2025-06-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/sdworkspace000002","name":"sdworkspace000002","type":"microsoft.storagediscovery/storagediscoveryworkspaces","location":"francecentral","tags":{"team":"Discovery"},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-07-24T22:37:32.8910454Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-07-24T22:37:32.8910454Z"},"properties":{"sku":"Standard","workspaceRoots":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"],"description":null,"scopes":[{"displayName":"basic","resourceTypes":["Microsoft.Storage/storageAccounts"],"tagKeysOnly":null,"tags":null}],"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '851' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 24 Jul 2025 22:37:34 GMT + etag: + - '"33009a77-0000-0e00-0000-6882b5ad0000"' + expires: + - '-1' + mise-correlation-id: + - 0bc68731-f485-42d8-b2a8-2a5e82cf262d + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=2968a26f-a796-4124-8684-894f8a239db2/eastus/8e283da5-5db3-4a55-8aba-2c3fd8daf213 + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-global-writes: + - '11999' + x-ms-ratelimit-remaining-subscription-writes: + - '799' + x-msedge-ref: + - 'Ref A: 0B7B45F1F5B642E4A0BB49E8895EF3B9 Ref B: MWH011020806042 Ref C: 2025-07-24T22:37:30Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - storage-discovery workspace show + Connection: + - keep-alive + ParameterSetName: + - -g -n + User-Agent: + - AZURECLI/2.75.0 azsdk-python-core/1.35.0 Python/3.12.11 (Linux-6.8.0-1030-azure-x86_64-with-glibc2.36) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/sdworkspace000002?api-version=2025-06-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/sdworkspace000002","name":"sdworkspace000002","type":"microsoft.storagediscovery/storagediscoveryworkspaces","location":"francecentral","tags":{"team":"Discovery"},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-07-24T22:37:32.8910454Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-07-24T22:37:32.8910454Z"},"properties":{"sku":"Standard","workspaceRoots":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"],"description":null,"scopes":[{"displayName":"basic","resourceTypes":["Microsoft.Storage/storageAccounts"],"tagKeysOnly":null,"tags":null}],"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '851' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 24 Jul 2025 22:37:34 GMT + etag: + - '"33009a77-0000-0e00-0000-6882b5ad0000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: A09F13BAEAB54C8FB214D8DADC733597 Ref B: MWH011020808034 Ref C: 2025-07-24T22:37:34Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - storage-discovery workspace update + Connection: + - keep-alive + ParameterSetName: + - -g -n --tags + User-Agent: + - AZURECLI/2.75.0 azsdk-python-core/1.35.0 Python/3.12.11 (Linux-6.8.0-1030-azure-x86_64-with-glibc2.36) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/sdworkspace000002?api-version=2025-06-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/sdworkspace000002","name":"sdworkspace000002","type":"microsoft.storagediscovery/storagediscoveryworkspaces","location":"francecentral","tags":{"team":"Discovery"},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-07-24T22:37:32.8910454Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-07-24T22:37:32.8910454Z"},"properties":{"sku":"Standard","workspaceRoots":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"],"description":null,"scopes":[{"displayName":"basic","resourceTypes":["Microsoft.Storage/storageAccounts"],"tagKeysOnly":null,"tags":null}],"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '851' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 24 Jul 2025 22:37:35 GMT + etag: + - '"33009a77-0000-0e00-0000-6882b5ad0000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: A6F27078F3B14762BBEA53FF5D541687 Ref B: MWH011020808060 Ref C: 2025-07-24T22:37:35Z' + status: + code: 200 + message: OK +- request: + body: '{"location": "francecentral", "properties": {"scopes": [{"displayName": + "basic", "resourceTypes": ["Microsoft.Storage/storageAccounts"]}], "sku": "Standard", + "workspaceRoots": ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"]}, + "tags": {"team": "Discovery", "environment": "test", "purpose": "demo"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - storage-discovery workspace update + Connection: + - keep-alive + Content-Length: + - '338' + Content-Type: + - application/json + ParameterSetName: + - -g -n --tags + User-Agent: + - AZURECLI/2.75.0 azsdk-python-core/1.35.0 Python/3.12.11 (Linux-6.8.0-1030-azure-x86_64-with-glibc2.36) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/sdworkspace000002?api-version=2025-06-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/sdworkspace000002","name":"sdworkspace000002","type":"microsoft.storagediscovery/storagediscoveryworkspaces","location":"francecentral","tags":{"team":"Discovery","environment":"test","purpose":"demo"},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-07-24T22:37:32.8910454Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-07-24T22:37:38.7091622Z"},"properties":{"sku":"Standard","workspaceRoots":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"],"description":null,"scopes":[{"displayName":"basic","resourceTypes":["Microsoft.Storage/storageAccounts"],"tagKeysOnly":null,"tags":null}],"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '889' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 24 Jul 2025 22:37:40 GMT + etag: + - '"3300a377-0000-0e00-0000-6882b5b30000"' + expires: + - '-1' + mise-correlation-id: + - 3f2fc50c-ea5b-4dcc-88f3-78e24c83f1d6 + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=2968a26f-a796-4124-8684-894f8a239db2/westus2/2727bb74-6876-40a9-b482-b2cfd6fd9d42 + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-global-writes: + - '11999' + x-ms-ratelimit-remaining-subscription-writes: + - '799' + x-msedge-ref: + - 'Ref A: B7D351BDA5664FB1B24FD94DE50C551A Ref B: CO6AA3150220021 Ref C: 2025-07-24T22:37:35Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - storage-discovery workspace delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g -n -y + User-Agent: + - AZURECLI/2.75.0 azsdk-python-core/1.35.0 Python/3.12.11 (Linux-6.8.0-1030-azure-x86_64-with-glibc2.36) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/sdworkspace000002?api-version=2025-06-01-preview + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Thu, 24 Jul 2025 22:37:42 GMT + expires: + - '-1' + mise-correlation-id: + - 238bbeaf-d12d-478c-86b7-6426a020a96d + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=2968a26f-a796-4124-8684-894f8a239db2/francecentral/30d19d8d-65a0-485f-a795-467e7eba6540 + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-deletes: + - '799' + x-ms-ratelimit-remaining-subscription-global-deletes: + - '11999' + x-msedge-ref: + - 'Ref A: D2D62273ECC1444D94D853163ADE16F0 Ref B: CO6AA3150220045 Ref C: 2025-07-24T22:37:40Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +version: 1 diff --git a/src/storage-discovery/azext_storage_discovery/tests/latest/recordings/test_storage_discovery_workspace_show_list.yaml b/src/storage-discovery/azext_storage_discovery/tests/latest/recordings/test_storage_discovery_workspace_show_list.yaml new file mode 100644 index 00000000000..1e06bb5e5c1 --- /dev/null +++ b/src/storage-discovery/azext_storage_discovery/tests/latest/recordings/test_storage_discovery_workspace_show_list.yaml @@ -0,0 +1,291 @@ +interactions: +- request: + body: '{"location": "francecentral", "properties": {"scopes": [{"displayName": + "basic", "resourceTypes": ["Microsoft.Storage/storageAccounts"]}], "sku": "Standard", + "workspaceRoots": ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"]}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - storage-discovery workspace create + Connection: + - keep-alive + Content-Length: + - '265' + Content-Type: + - application/json + ParameterSetName: + - -g -n --location --workspace-roots --scopes + User-Agent: + - AZURECLI/2.75.0 azsdk-python-core/1.35.0 Python/3.12.11 (Linux-6.8.0-1030-azure-x86_64-with-glibc2.36) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/sdworkspace000002?api-version=2025-06-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/sdworkspace000002","name":"sdworkspace000002","type":"microsoft.storagediscovery/storagediscoveryworkspaces","location":"francecentral","tags":{"team":"Discovery"},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-07-24T22:28:44.9931022Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-07-24T22:28:44.9931022Z"},"properties":{"sku":"Standard","workspaceRoots":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"],"description":null,"scopes":[{"displayName":"basic","resourceTypes":["Microsoft.Storage/storageAccounts"],"tagKeysOnly":null,"tags":null}],"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '851' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 24 Jul 2025 22:28:54 GMT + etag: + - '"3300616e-0000-0e00-0000-6882b3a60000"' + expires: + - '-1' + mise-correlation-id: + - 6b4f128e-5651-4c65-a74c-85330ee9fdf6 + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=2968a26f-a796-4124-8684-894f8a239db2/westus2/6e818e41-f7f0-4208-ba9b-de525401c0d9 + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-global-writes: + - '12000' + x-ms-ratelimit-remaining-subscription-writes: + - '800' + x-msedge-ref: + - 'Ref A: 31CD780F907446C9B3E60B364869EE50 Ref B: CO6AA3150217017 Ref C: 2025-07-24T22:28:41Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - storage-discovery workspace show + Connection: + - keep-alive + ParameterSetName: + - -g -n + User-Agent: + - AZURECLI/2.75.0 azsdk-python-core/1.35.0 Python/3.12.11 (Linux-6.8.0-1030-azure-x86_64-with-glibc2.36) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/sdworkspace000002?api-version=2025-06-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/sdworkspace000002","name":"sdworkspace000002","type":"microsoft.storagediscovery/storagediscoveryworkspaces","location":"francecentral","tags":{"team":"Discovery"},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-07-24T22:28:44.9931022Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-07-24T22:28:44.9931022Z"},"properties":{"sku":"Standard","workspaceRoots":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"],"description":null,"scopes":[{"displayName":"basic","resourceTypes":["Microsoft.Storage/storageAccounts"],"tagKeysOnly":null,"tags":null}],"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '851' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 24 Jul 2025 22:28:55 GMT + etag: + - '"3300616e-0000-0e00-0000-6882b3a60000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: 1756914FAD5F4482AAE093E658215237 Ref B: CO6AA3150217045 Ref C: 2025-07-24T22:28:55Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - storage-discovery workspace update + Connection: + - keep-alive + ParameterSetName: + - -g -n --tags + User-Agent: + - AZURECLI/2.75.0 azsdk-python-core/1.35.0 Python/3.12.11 (Linux-6.8.0-1030-azure-x86_64-with-glibc2.36) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/sdworkspace000002?api-version=2025-06-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/sdworkspace000002","name":"sdworkspace000002","type":"microsoft.storagediscovery/storagediscoveryworkspaces","location":"francecentral","tags":{"team":"Discovery"},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-07-24T22:28:44.9931022Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-07-24T22:28:44.9931022Z"},"properties":{"sku":"Standard","workspaceRoots":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"],"description":null,"scopes":[{"displayName":"basic","resourceTypes":["Microsoft.Storage/storageAccounts"],"tagKeysOnly":null,"tags":null}],"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '851' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 24 Jul 2025 22:28:55 GMT + etag: + - '"3300616e-0000-0e00-0000-6882b3a60000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: CFC0737525B343A0B5A2F5236311CF4F Ref B: CO6AA3150220029 Ref C: 2025-07-24T22:28:55Z' + status: + code: 200 + message: OK +- request: + body: '{"location": "francecentral", "properties": {"scopes": [{"displayName": + "basic", "resourceTypes": ["Microsoft.Storage/storageAccounts"]}], "sku": "Standard", + "workspaceRoots": ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"]}, + "tags": {"team": "Discovery", "environment": "test", "purpose": "demo"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - storage-discovery workspace update + Connection: + - keep-alive + Content-Length: + - '338' + Content-Type: + - application/json + ParameterSetName: + - -g -n --tags + User-Agent: + - AZURECLI/2.75.0 azsdk-python-core/1.35.0 Python/3.12.11 (Linux-6.8.0-1030-azure-x86_64-with-glibc2.36) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/sdworkspace000002?api-version=2025-06-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/sdworkspace000002","name":"sdworkspace000002","type":"microsoft.storagediscovery/storagediscoveryworkspaces","location":"francecentral","tags":{"team":"Discovery","environment":"test","purpose":"demo"},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-07-24T22:28:44.9931022Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-07-24T22:28:58.4103502Z"},"properties":{"sku":"Standard","workspaceRoots":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"],"description":null,"scopes":[{"displayName":"basic","resourceTypes":["Microsoft.Storage/storageAccounts"],"tagKeysOnly":null,"tags":null}],"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '889' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 24 Jul 2025 22:28:59 GMT + etag: + - '"3300706e-0000-0e00-0000-6882b3aa0000"' + expires: + - '-1' + mise-correlation-id: + - 6bbc7466-f956-407b-82d3-36220e976be0 + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=2968a26f-a796-4124-8684-894f8a239db2/southcentralus/e8f00f56-ff7e-47f9-86f8-8abbff8e76e4 + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-global-writes: + - '11999' + x-ms-ratelimit-remaining-subscription-writes: + - '799' + x-msedge-ref: + - 'Ref A: 90448CF4E4EE48539366636F42076E76 Ref B: MWH011020809062 Ref C: 2025-07-24T22:28:56Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - storage-discovery workspace delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g -n -y + User-Agent: + - AZURECLI/2.75.0 azsdk-python-core/1.35.0 Python/3.12.11 (Linux-6.8.0-1030-azure-x86_64-with-glibc2.36) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/sdworkspace000002?api-version=2025-06-01-preview + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Thu, 24 Jul 2025 22:29:04 GMT + expires: + - '-1' + mise-correlation-id: + - 4d0609ea-b016-4c80-b840-be859f1f50be + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=2968a26f-a796-4124-8684-894f8a239db2/southcentralus/9f71dd64-7812-4251-9b89-6491b364b331 + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-deletes: + - '799' + x-ms-ratelimit-remaining-subscription-global-deletes: + - '11999' + x-msedge-ref: + - 'Ref A: F919272FDC3D4586B5AE45061D9537B2 Ref B: MWH011020808034 Ref C: 2025-07-24T22:29:00Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +version: 1 diff --git a/src/storage-discovery/azext_storage_discovery/tests/latest/recordings/test_storage_discovery_workspace_update.yaml b/src/storage-discovery/azext_storage_discovery/tests/latest/recordings/test_storage_discovery_workspace_update.yaml new file mode 100644 index 00000000000..3e71660c38f --- /dev/null +++ b/src/storage-discovery/azext_storage_discovery/tests/latest/recordings/test_storage_discovery_workspace_update.yaml @@ -0,0 +1,242 @@ +interactions: +- request: + body: '{"location": "eastus2", "properties": {"description": "initial", "scopes": + [{"displayName": "test1", "resourceTypes": ["Microsoft.Storage/storageAccounts"]}], + "sku": "Standard", "workspaceRoots": ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"]}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - storage-discovery workspace create + Connection: + - keep-alive + Content-Length: + - '285' + Content-Type: + - application/json + ParameterSetName: + - -g -n --location --description --sku --workspace-roots --scopes + User-Agent: + - AZURECLI/2.75.0 azsdk-python-core/1.35.0 Python/3.12.11 (Linux-6.8.0-1030-azure-x86_64-with-glibc2.36) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/updatews000002?api-version=2025-06-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/updatews000002","name":"updatews000002","type":"microsoft.storagediscovery/storagediscoveryworkspaces","location":"eastus2","tags":{"team":"Discovery"},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-07-24T22:37:31.1956913Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-07-24T22:37:31.1956913Z"},"properties":{"sku":"Standard","workspaceRoots":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"],"description":"initial","scopes":[{"displayName":"test1","resourceTypes":["Microsoft.Storage/storageAccounts"],"tagKeysOnly":null,"tags":null}],"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '844' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 24 Jul 2025 22:37:33 GMT + etag: + - '"7700d54a-0000-0200-0000-6882b5ad0000"' + expires: + - '-1' + mise-correlation-id: + - c1ae1ae7-2ade-45e4-a423-9d1e3601332f + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=2968a26f-a796-4124-8684-894f8a239db2/westus2/fdfe1cf3-ceda-4419-959a-2c2170a6a847 + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-global-writes: + - '11999' + x-ms-ratelimit-remaining-subscription-writes: + - '799' + x-msedge-ref: + - 'Ref A: 03E58D2EDB4544ABB678C7EAAFCD010C Ref B: CO6AA3150220023 Ref C: 2025-07-24T22:37:29Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - storage-discovery workspace update + Connection: + - keep-alive + ParameterSetName: + - -g -n --description --sku --workspace-roots --scopes --tags + User-Agent: + - AZURECLI/2.75.0 azsdk-python-core/1.35.0 Python/3.12.11 (Linux-6.8.0-1030-azure-x86_64-with-glibc2.36) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/updatews000002?api-version=2025-06-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/updatews000002","name":"updatews000002","type":"microsoft.storagediscovery/storagediscoveryworkspaces","location":"eastus2","tags":{"team":"Discovery"},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-07-24T22:37:31.1956913Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-07-24T22:37:31.1956913Z"},"properties":{"sku":"Standard","workspaceRoots":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"],"description":"initial","scopes":[{"displayName":"test1","resourceTypes":["Microsoft.Storage/storageAccounts"],"tagKeysOnly":null,"tags":null}],"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '844' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 24 Jul 2025 22:37:33 GMT + etag: + - '"7700d54a-0000-0200-0000-6882b5ad0000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: F1E5993E27414B6497B66F3396499E8D Ref B: CO6AA3150217045 Ref C: 2025-07-24T22:37:33Z' + status: + code: 200 + message: OK +- request: + body: '{"location": "eastus2", "properties": {"description": "test2", "scopes": + [{"displayName": "test2", "resourceTypes": ["Microsoft.Storage/storageAccounts"], + "tagKeysOnly": ["e2etest2"], "tags": {"tag3": "value3"}}], "sku": "Free", "workspaceRoots": + ["/subscriptions/00000000-0000-0000-0000-000000000000"]}, "tags": {"team": "Discovery", + "tag4": "value4"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - storage-discovery workspace update + Connection: + - keep-alive + Content-Length: + - '353' + Content-Type: + - application/json + ParameterSetName: + - -g -n --description --sku --workspace-roots --scopes --tags + User-Agent: + - AZURECLI/2.75.0 azsdk-python-core/1.35.0 Python/3.12.11 (Linux-6.8.0-1030-azure-x86_64-with-glibc2.36) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/updatews000002?api-version=2025-06-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/updatews000002","name":"updatews000002","type":"microsoft.storagediscovery/storagediscoveryworkspaces","location":"eastus2","tags":{"team":"Discovery","tag4":"value4"},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-07-24T22:37:31.1956913Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-07-24T22:37:35.2267057Z"},"properties":{"sku":"Free","workspaceRoots":["/subscriptions/00000000-0000-0000-0000-000000000000"],"description":"test2","scopes":[{"displayName":"test2","resourceTypes":["Microsoft.Storage/storageAccounts"],"tagKeysOnly":["e2etest2"],"tags":{"tag3":"value3"}}],"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '843' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 24 Jul 2025 22:37:35 GMT + etag: + - '"7700e74a-0000-0200-0000-6882b5af0000"' + expires: + - '-1' + mise-correlation-id: + - bd9b84ef-a7d1-4cce-803a-c6b4b203cbfc + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=2968a26f-a796-4124-8684-894f8a239db2/eastus2/ae51415a-34e8-40a5-bcd1-6dc0e21add09 + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-global-writes: + - '11999' + x-ms-ratelimit-remaining-subscription-writes: + - '799' + x-msedge-ref: + - 'Ref A: 532B3E55D4984DE6A8898B453D3FC5BC Ref B: MWH011020806054 Ref C: 2025-07-24T22:37:34Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - storage-discovery workspace delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g -n -y + User-Agent: + - AZURECLI/2.75.0 azsdk-python-core/1.35.0 Python/3.12.11 (Linux-6.8.0-1030-azure-x86_64-with-glibc2.36) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/updatews000002?api-version=2025-06-01-preview + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Thu, 24 Jul 2025 22:37:37 GMT + expires: + - '-1' + mise-correlation-id: + - 2839fe3a-1b6a-4d8a-a420-4ee087cbc454 + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=2968a26f-a796-4124-8684-894f8a239db2/eastus2/af06a9e1-d471-4d35-9a54-deab5ec2af9b + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-deletes: + - '799' + x-ms-ratelimit-remaining-subscription-global-deletes: + - '11999' + x-msedge-ref: + - 'Ref A: 616181CB0F654F5882DB2D812FB3EC4B Ref B: MWH011020806023 Ref C: 2025-07-24T22:37:35Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +version: 1 diff --git a/src/storage-discovery/azext_storage_discovery/tests/latest/test_storage_discovery.py b/src/storage-discovery/azext_storage_discovery/tests/latest/test_storage_discovery.py index 6ef6547ea5c..8df91148088 100644 --- a/src/storage-discovery/azext_storage_discovery/tests/latest/test_storage_discovery.py +++ b/src/storage-discovery/azext_storage_discovery/tests/latest/test_storage_discovery.py @@ -10,11 +10,10 @@ class StorageDiscoveryScenario(ScenarioTest): @ResourceGroupPreparer(location='francecentral') - def test_storage_discovery_workspace_scenarios(self): + def test_storage_discovery_workspace_create(self): self.kwargs.update({ "workspace_name": self.create_random_name('clitest', 18), - "discovery_scope_level1": f"/subscriptions/{self.get_subscription_id()}/resourceGroups/{self.kwargs['rg']}", - "discovery_scope_level2": f"/subscriptions/{self.get_subscription_id()}" + "discovery_scope_level1": f"/subscriptions/{self.get_subscription_id()}/resourceGroups/{self.kwargs['rg']}" }) # Test create workspace with scope file @@ -41,18 +40,27 @@ def test_storage_discovery_workspace_scenarios(self): JMESPathCheck('properties.scopes[0].tags.tag2', "value2") ]) - # Test show workspace - self.cmd('az storage-discovery workspace show -g {rg} -n {workspace_name}', - checks=[ - JMESPathCheck('name', self.kwargs.get('workspace_name', '')), - JMESPathCheck('location', "francecentral"), - JMESPathCheck('properties.description', "123"), - JMESPathCheck('properties.sku', "Standard") - ]) + # Clean up + self.cmd('az storage-discovery workspace delete -g {rg} -n {workspace_name} -y') + + @ResourceGroupPreparer(location='eastus2') + def test_storage_discovery_workspace_update(self): + self.kwargs.update({ + "workspace_name": self.create_random_name('updatews', 18), + "discovery_scope_level1": f"/subscriptions/{self.get_subscription_id()}/resourceGroups/{self.kwargs['rg']}", + "discovery_scope_level2": f"/subscriptions/{self.get_subscription_id()}" + }) - # Test list workspaces from resource group - self.cmd('az storage-discovery workspace list -g {rg}', - checks=[JMESPathCheck('length(@)', 1)]) + # Create initial workspace + self.kwargs.update({ + "scope1_json": '[{"displayName":"test1","resourceTypes":["Microsoft.Storage/storageAccounts"]}]' + }) + + self.cmd('az storage-discovery workspace create ' + '-g {rg} -n {workspace_name} --location eastus2 ' + '--description "initial" --sku Standard ' + '--workspace-roots "{discovery_scope_level1}" ' + '--scopes "{scope1_json}"') # Test update workspace self.kwargs.update({ @@ -75,6 +83,27 @@ def test_storage_discovery_workspace_scenarios(self): JMESPathCheck('tags.tag4', "value4") ]) + # Clean up + self.cmd('az storage-discovery workspace delete -g {rg} -n {workspace_name} -y') + + @ResourceGroupPreparer(location='francecentral') + def test_storage_discovery_workspace_delete(self): + self.kwargs.update({ + "workspace_name": self.create_random_name('deletews', 18), + "workspace_scope": f"/subscriptions/{self.get_subscription_id()}/resourceGroups/{self.kwargs['rg']}", + "basic_scope_json": '[{"displayName":"basic","resourceTypes":["Microsoft.Storage/storageAccounts"]}]' + }) + + # Create workspace + self.cmd('az storage-discovery workspace create ' + '-g {rg} -n {workspace_name} --location francecentral ' + '--workspace-roots "{workspace_scope}" ' + '--scopes "{basic_scope_json}"') + + # Verify workspace exists + self.cmd('az storage-discovery workspace list -g {rg}', + checks=[JMESPathCheck('length(@)', 1)]) + # Test delete workspace self.cmd('az storage-discovery workspace delete -g {rg} -n {workspace_name} -y') @@ -82,8 +111,8 @@ def test_storage_discovery_workspace_scenarios(self): self.cmd('az storage-discovery workspace list -g {rg}', checks=[JMESPathCheck('length(@)', 0)]) - @ResourceGroupPreparer(location='eastus2') - def test_storage_discovery_workspace_basic_operations(self): + @ResourceGroupPreparer(location='francecentral') + def test_storage_discovery_workspace_show(self): self.kwargs.update({ "workspace_name": self.create_random_name('sdworkspace', 18), "workspace_scope": f"/subscriptions/{self.get_subscription_id()}/resourceGroups/{self.kwargs['rg']}", @@ -92,12 +121,12 @@ def test_storage_discovery_workspace_basic_operations(self): # Test create workspace with minimal parameters but required scopes self.cmd('az storage-discovery workspace create ' - '-g {rg} -n {workspace_name} --location eastus2 ' + '-g {rg} -n {workspace_name} --location francecentral ' '--workspace-roots "{workspace_scope}" ' '--scopes "{basic_scope_json}"', checks=[ JMESPathCheck('name', self.kwargs.get('workspace_name', '')), - JMESPathCheck('location', "eastus2"), + JMESPathCheck('location', "francecentral"), JMESPathCheck('properties.workspaceRoots[0]', self.kwargs.get('workspace_scope', '')) ]) @@ -105,7 +134,7 @@ def test_storage_discovery_workspace_basic_operations(self): self.cmd('az storage-discovery workspace show -g {rg} -n {workspace_name}', checks=[ JMESPathCheck('name', self.kwargs.get('workspace_name', '')), - JMESPathCheck('location', "eastus2") + JMESPathCheck('location', "francecentral") ]) # Test update workspace with tags only @@ -120,7 +149,7 @@ def test_storage_discovery_workspace_basic_operations(self): # Clean up self.cmd('az storage-discovery workspace delete -g {rg} -n {workspace_name} -y') - def test_storage_discovery_workspace_list_subscription(self): + def test_storage_discovery_workspace_list(self): # Test list workspaces from subscription (may be empty) result = self.cmd('az storage-discovery workspace list').get_output_in_json() self.assertIsInstance(result, list) From 06ae52a703211133041d3ae12ad9d1bc0d4530ca Mon Sep 17 00:00:00 2001 From: shanefujs <75388289+shanefujs@users.noreply.github.com> Date: Thu, 24 Jul 2025 22:53:30 +0000 Subject: [PATCH 05/10] add examples for all workspace features --- .../aaz/latest/storage_discovery/workspace/_create.py | 3 +++ .../aaz/latest/storage_discovery/workspace/_delete.py | 3 +++ .../aaz/latest/storage_discovery/workspace/_list.py | 3 +++ .../aaz/latest/storage_discovery/workspace/_show.py | 3 +++ .../aaz/latest/storage_discovery/workspace/_update.py | 3 +++ 5 files changed, 15 insertions(+) diff --git a/src/storage-discovery/azext_storage_discovery/aaz/latest/storage_discovery/workspace/_create.py b/src/storage-discovery/azext_storage_discovery/aaz/latest/storage_discovery/workspace/_create.py index 2161c124e44..503a553e2ab 100644 --- a/src/storage-discovery/azext_storage_discovery/aaz/latest/storage_discovery/workspace/_create.py +++ b/src/storage-discovery/azext_storage_discovery/aaz/latest/storage_discovery/workspace/_create.py @@ -17,6 +17,9 @@ ) class Create(AAZCommand): """Create a StorageDiscoveryWorkspace + + :example: Create StorageDiscoveryWorkspace + az storage-discovery workspace create --resource-group sample-rg --storage-discovery-workspace-name Sample-Storage-Workspace --location westeurope --tags "{tag1:value1,tag2:value2}" --workspace-roots "[/subscriptions/b79cb3ba-745e-5d9a-8903-4a02327a7e09]" --description Sample Storage Discovery Workspace --scopes "[{display-name:Sample-Collection,resource-types:[/subscriptions/b79cb3ba-745e-5d9a-8903-4a02327a7e09/resourceGroups/sample-rg/providers/Microsoft.Storage/storageAccounts/sample-storageAccount],tag-keys-only:[filterTag1,filterTag2],tags:{filterTag3:value3,filterTag4:value4}},{display-name:Sample-Collection-2,resource-types:[/subscriptions/b79cb3ba-745e-5d9a-8903-4a02327a7e09/resourceGroups/sample-rg/providers/Microsoft.Storage/storageAccounts/sample-storageAccount],tag-keys-only:[filterTag5],tags:{filterTag6:value6}}]" """ _aaz_info = { diff --git a/src/storage-discovery/azext_storage_discovery/aaz/latest/storage_discovery/workspace/_delete.py b/src/storage-discovery/azext_storage_discovery/aaz/latest/storage_discovery/workspace/_delete.py index a41ed6ef55a..c2fe87c77ff 100644 --- a/src/storage-discovery/azext_storage_discovery/aaz/latest/storage_discovery/workspace/_delete.py +++ b/src/storage-discovery/azext_storage_discovery/aaz/latest/storage_discovery/workspace/_delete.py @@ -18,6 +18,9 @@ ) class Delete(AAZCommand): """Delete a StorageDiscoveryWorkspace + + :example: Delete a StorageDiscoveryWorkspace + az storage-discovery workspace delete --resource-group sample-rg --storage-discovery-workspace-name sampleworkspace """ _aaz_info = { diff --git a/src/storage-discovery/azext_storage_discovery/aaz/latest/storage_discovery/workspace/_list.py b/src/storage-discovery/azext_storage_discovery/aaz/latest/storage_discovery/workspace/_list.py index 077f1c754ff..328421796be 100644 --- a/src/storage-discovery/azext_storage_discovery/aaz/latest/storage_discovery/workspace/_list.py +++ b/src/storage-discovery/azext_storage_discovery/aaz/latest/storage_discovery/workspace/_list.py @@ -17,6 +17,9 @@ ) class List(AAZCommand): """List StorageDiscoveryWorkspace resources by subscription ID + + :example: List StorageDiscoveryWorkspaces by Subscription + az storage-discovery workspace list """ _aaz_info = { diff --git a/src/storage-discovery/azext_storage_discovery/aaz/latest/storage_discovery/workspace/_show.py b/src/storage-discovery/azext_storage_discovery/aaz/latest/storage_discovery/workspace/_show.py index 16d34e09f9d..2b999b0d1e0 100644 --- a/src/storage-discovery/azext_storage_discovery/aaz/latest/storage_discovery/workspace/_show.py +++ b/src/storage-discovery/azext_storage_discovery/aaz/latest/storage_discovery/workspace/_show.py @@ -17,6 +17,9 @@ ) class Show(AAZCommand): """Get a StorageDiscoveryWorkspace + + :example: Get a StorageDiscoveryWorkspace + az storage-discovery workspace show --resource-group sample-rg --storage-discovery-workspace-name Sample-Storage-Workspace """ _aaz_info = { diff --git a/src/storage-discovery/azext_storage_discovery/aaz/latest/storage_discovery/workspace/_update.py b/src/storage-discovery/azext_storage_discovery/aaz/latest/storage_discovery/workspace/_update.py index d92649d211a..13816791bf4 100644 --- a/src/storage-discovery/azext_storage_discovery/aaz/latest/storage_discovery/workspace/_update.py +++ b/src/storage-discovery/azext_storage_discovery/aaz/latest/storage_discovery/workspace/_update.py @@ -17,6 +17,9 @@ ) class Update(AAZCommand): """Update a StorageDiscoveryWorkspace + + :example: Update a StorageDiscoveryWorkspace + az storage-discovery workspace update --resource-group sample-rg --storage-discovery-workspace-name Sample-Storage-Workspace --location westeurope --tags "{tag1:value1,tag2:value2}" --workspace-roots "[/subscriptions/b79cb3ba-745e-5d9a-8903-4a02327a7e09]" --description Sample Storage Discovery Workspace --scopes "[{display-name:Sample-Collection,resource-types:[/subscriptions/b79cb3ba-745e-5d9a-8903-4a02327a7e09/resourceGroups/sample-rg/providers/Microsoft.Storage/storageAccounts/sample-storageAccount],tag-keys-only:[filterTag1,filterTag2],tags:{filterTag3:value3,filterTag4:value4}},{display-name:Sample-Collection-2,resource-types:[/subscriptions/b79cb3ba-745e-5d9a-8903-4a02327a7e09/resourceGroups/sample-rg/providers/Microsoft.Storage/storageAccounts/sample-storageAccount],tag-keys-only:[filterTag5],tags:{filterTag6:value6}}]" """ _aaz_info = { From 69afede4fd2b4ccdb39c2760f10b6b49097d2cf7 Mon Sep 17 00:00:00 2001 From: shanefujs <75388289+shanefujs@users.noreply.github.com> Date: Thu, 31 Jul 2025 08:18:31 +0000 Subject: [PATCH 06/10] add storage-discovery to service_name.json --- src/service_name.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/service_name.json b/src/service_name.json index d32d6e02332..64acbe82abe 100644 --- a/src/service_name.json +++ b/src/service_name.json @@ -884,6 +884,11 @@ "AzureServiceName": "Azure Storage Actions", "URL": "https://learn.microsoft.com/azure/storage-actions/" }, + { + "Command": "az storage-discovery", + "AzureServiceName": "Azure Storage Discovery", + "URL": "https://learn.microsoft.com/azure/storage-discovery/" + }, { "Command": "az baremetalinstance", "AzureServiceName": "BareMetal Infrastructure", From a2e73c3f25562ec9e7af71d69530d60f85f5b26d Mon Sep 17 00:00:00 2001 From: shanefujs <75388289+shanefujs@users.noreply.github.com> Date: Thu, 31 Jul 2025 08:50:10 +0000 Subject: [PATCH 07/10] update README and examples --- src/storage-discovery/README.md | 53 ++++++++++++++++++- .../storage_discovery/workspace/_create.py | 5 +- .../storage_discovery/workspace/_delete.py | 2 +- .../storage_discovery/workspace/_list.py | 1 + .../storage_discovery/workspace/_show.py | 2 +- .../storage_discovery/workspace/_update.py | 2 +- 6 files changed, 59 insertions(+), 6 deletions(-) diff --git a/src/storage-discovery/README.md b/src/storage-discovery/README.md index 501e9c7939b..de165da4d1f 100644 --- a/src/storage-discovery/README.md +++ b/src/storage-discovery/README.md @@ -2,4 +2,55 @@ This is an extension to Azure CLI to manage StorageDiscovery resources. ## How to use ## -Please add commands usage here. \ No newline at end of file +### az storage-discovery workspace create ### +```commandline +az storage-discovery workspace create \ + --resource-group myRG \ + --name myWorkspace \ + --location francecentral \ + --workspace-roots "/subscriptions/mySubId/resourceGroups/myRG" \ + --scopes '[{"displayName":"basic","resourceTypes":["Microsoft.Storage/storageAccounts"]}]' +``` + +### az storage-discovery workspace create (with full configuration) ### +```commandline +az storage-discovery workspace create \ + --resource-group myRG \ + --name myWorkspace \ + --location francecentral \ + --description "My workspace for storage discovery" \ + --sku Standard \ + --workspace-roots "/subscriptions/mySubId/resourceGroups/myRG" \ + --scopes '[{"displayName":"production","resourceTypes":["Microsoft.Storage/storageAccounts"],"tagKeysOnly":["environment"],"tags":{"project":"demo","tier":"prod"}}]' +``` + +### az storage-discovery workspace show ### +```commandline +az storage-discovery workspace show --resource-group myRG --name myWorkspace +``` + +### az storage-discovery workspace update ### +```commandline +az storage-discovery workspace update \ + --resource-group myRG \ + --name myWorkspace \ + --description "Updated description" \ + --sku Free \ + --scopes '[{"displayName":"updated","resourceTypes":["Microsoft.Storage/storageAccounts"],"tags":{"environment":"test"}}]' \ + --tags environment=production team=storage +``` + +### az storage-discovery workspace list ### +```commandline +az storage-discovery workspace list --resource-group myRG +``` + +### az storage-discovery workspace list (subscription level) ### +```commandline +az storage-discovery workspace list +``` + +### az storage-discovery workspace delete ### +```commandline +az storage-discovery workspace delete --resource-group myRG --name myWorkspace +``` \ No newline at end of file diff --git a/src/storage-discovery/azext_storage_discovery/aaz/latest/storage_discovery/workspace/_create.py b/src/storage-discovery/azext_storage_discovery/aaz/latest/storage_discovery/workspace/_create.py index 503a553e2ab..f8a8a5ef3e0 100644 --- a/src/storage-discovery/azext_storage_discovery/aaz/latest/storage_discovery/workspace/_create.py +++ b/src/storage-discovery/azext_storage_discovery/aaz/latest/storage_discovery/workspace/_create.py @@ -18,8 +18,9 @@ class Create(AAZCommand): """Create a StorageDiscoveryWorkspace - :example: Create StorageDiscoveryWorkspace - az storage-discovery workspace create --resource-group sample-rg --storage-discovery-workspace-name Sample-Storage-Workspace --location westeurope --tags "{tag1:value1,tag2:value2}" --workspace-roots "[/subscriptions/b79cb3ba-745e-5d9a-8903-4a02327a7e09]" --description Sample Storage Discovery Workspace --scopes "[{display-name:Sample-Collection,resource-types:[/subscriptions/b79cb3ba-745e-5d9a-8903-4a02327a7e09/resourceGroups/sample-rg/providers/Microsoft.Storage/storageAccounts/sample-storageAccount],tag-keys-only:[filterTag1,filterTag2],tags:{filterTag3:value3,filterTag4:value4}},{display-name:Sample-Collection-2,resource-types:[/subscriptions/b79cb3ba-745e-5d9a-8903-4a02327a7e09/resourceGroups/sample-rg/providers/Microsoft.Storage/storageAccounts/sample-storageAccount],tag-keys-only:[filterTag5],tags:{filterTag6:value6}}]" + :example: Create or Update a StorageDiscoveryWorkspace + az az storage-discovery workspace create --resource-group myRG --name myWorkspace --location francecentral --workspace-roots "/subscriptions/mySubId/resourceGroups/myRG" --scopes '[{"displayName":"basic","resourceTypes":["Microsoft.Storage/storageAccounts"]}]' + az storage-discovery workspace create --resource-group myRG --name myWorkspace --location francecentral --description "My workspace for storage discovery" --sku Standard --workspace-roots "/subscriptions/mySubId/resourceGroups/myRG" --scopes '[{"displayName":"production","resourceTypes":["Microsoft.Storage/storageAccounts"],"tagKeysOnly":["environment"],"tags":{"project":"demo","tier":"prod"}}]' """ _aaz_info = { diff --git a/src/storage-discovery/azext_storage_discovery/aaz/latest/storage_discovery/workspace/_delete.py b/src/storage-discovery/azext_storage_discovery/aaz/latest/storage_discovery/workspace/_delete.py index c2fe87c77ff..40a6be3b136 100644 --- a/src/storage-discovery/azext_storage_discovery/aaz/latest/storage_discovery/workspace/_delete.py +++ b/src/storage-discovery/azext_storage_discovery/aaz/latest/storage_discovery/workspace/_delete.py @@ -20,7 +20,7 @@ class Delete(AAZCommand): """Delete a StorageDiscoveryWorkspace :example: Delete a StorageDiscoveryWorkspace - az storage-discovery workspace delete --resource-group sample-rg --storage-discovery-workspace-name sampleworkspace + az storage-discovery workspace delete --resource-group myRG --name myWorkspace """ _aaz_info = { diff --git a/src/storage-discovery/azext_storage_discovery/aaz/latest/storage_discovery/workspace/_list.py b/src/storage-discovery/azext_storage_discovery/aaz/latest/storage_discovery/workspace/_list.py index 328421796be..aa08bbc021d 100644 --- a/src/storage-discovery/azext_storage_discovery/aaz/latest/storage_discovery/workspace/_list.py +++ b/src/storage-discovery/azext_storage_discovery/aaz/latest/storage_discovery/workspace/_list.py @@ -20,6 +20,7 @@ class List(AAZCommand): :example: List StorageDiscoveryWorkspaces by Subscription az storage-discovery workspace list + az storage-discovery workspace list --resource-group myRG """ _aaz_info = { diff --git a/src/storage-discovery/azext_storage_discovery/aaz/latest/storage_discovery/workspace/_show.py b/src/storage-discovery/azext_storage_discovery/aaz/latest/storage_discovery/workspace/_show.py index 2b999b0d1e0..e3d9494b0a1 100644 --- a/src/storage-discovery/azext_storage_discovery/aaz/latest/storage_discovery/workspace/_show.py +++ b/src/storage-discovery/azext_storage_discovery/aaz/latest/storage_discovery/workspace/_show.py @@ -19,7 +19,7 @@ class Show(AAZCommand): """Get a StorageDiscoveryWorkspace :example: Get a StorageDiscoveryWorkspace - az storage-discovery workspace show --resource-group sample-rg --storage-discovery-workspace-name Sample-Storage-Workspace + az storage-discovery workspace show --resource-group myRG --name myWorkspace """ _aaz_info = { diff --git a/src/storage-discovery/azext_storage_discovery/aaz/latest/storage_discovery/workspace/_update.py b/src/storage-discovery/azext_storage_discovery/aaz/latest/storage_discovery/workspace/_update.py index 13816791bf4..bb7c20148b1 100644 --- a/src/storage-discovery/azext_storage_discovery/aaz/latest/storage_discovery/workspace/_update.py +++ b/src/storage-discovery/azext_storage_discovery/aaz/latest/storage_discovery/workspace/_update.py @@ -19,7 +19,7 @@ class Update(AAZCommand): """Update a StorageDiscoveryWorkspace :example: Update a StorageDiscoveryWorkspace - az storage-discovery workspace update --resource-group sample-rg --storage-discovery-workspace-name Sample-Storage-Workspace --location westeurope --tags "{tag1:value1,tag2:value2}" --workspace-roots "[/subscriptions/b79cb3ba-745e-5d9a-8903-4a02327a7e09]" --description Sample Storage Discovery Workspace --scopes "[{display-name:Sample-Collection,resource-types:[/subscriptions/b79cb3ba-745e-5d9a-8903-4a02327a7e09/resourceGroups/sample-rg/providers/Microsoft.Storage/storageAccounts/sample-storageAccount],tag-keys-only:[filterTag1,filterTag2],tags:{filterTag3:value3,filterTag4:value4}},{display-name:Sample-Collection-2,resource-types:[/subscriptions/b79cb3ba-745e-5d9a-8903-4a02327a7e09/resourceGroups/sample-rg/providers/Microsoft.Storage/storageAccounts/sample-storageAccount],tag-keys-only:[filterTag5],tags:{filterTag6:value6}}]" + az storage-discovery workspace update --resource-group myRG --name myWorkspace --description "Updated description" --sku Free --scopes '[{"displayName":"updated","resourceTypes":["Microsoft.Storage/storageAccounts"],"tags":{"environment":"test"}}]' --tags environment=production team=storage """ _aaz_info = { From 7f126f417b540910b36618c02540c06b40198c49 Mon Sep 17 00:00:00 2001 From: shanefujs <75388289+shanefujs@users.noreply.github.com> Date: Mon, 4 Aug 2025 23:31:07 +0000 Subject: [PATCH 08/10] update test cases and recordings --- ..._discovery_workspace_basic_operations.yaml | 291 ------------- ...st_storage_discovery_workspace_create.yaml | 24 +- ...covery_workspace_create_update_delete.yaml | 389 ------------------ ...st_storage_discovery_workspace_delete.yaml | 32 +- ...test_storage_discovery_workspace_list.yaml | 12 +- ...discovery_workspace_list_subscription.yaml | 50 --- ...storage_discovery_workspace_scenarios.yaml | 389 ------------------ ...test_storage_discovery_workspace_show.yaml | 48 +-- ...storage_discovery_workspace_show_list.yaml | 291 ------------- ...st_storage_discovery_workspace_update.yaml | 52 +-- .../tests/latest/test_storage_discovery.py | 6 +- 11 files changed, 84 insertions(+), 1500 deletions(-) delete mode 100644 src/storage-discovery/azext_storage_discovery/tests/latest/recordings/test_storage_discovery_workspace_basic_operations.yaml delete mode 100644 src/storage-discovery/azext_storage_discovery/tests/latest/recordings/test_storage_discovery_workspace_create_update_delete.yaml delete mode 100644 src/storage-discovery/azext_storage_discovery/tests/latest/recordings/test_storage_discovery_workspace_list_subscription.yaml delete mode 100644 src/storage-discovery/azext_storage_discovery/tests/latest/recordings/test_storage_discovery_workspace_scenarios.yaml delete mode 100644 src/storage-discovery/azext_storage_discovery/tests/latest/recordings/test_storage_discovery_workspace_show_list.yaml diff --git a/src/storage-discovery/azext_storage_discovery/tests/latest/recordings/test_storage_discovery_workspace_basic_operations.yaml b/src/storage-discovery/azext_storage_discovery/tests/latest/recordings/test_storage_discovery_workspace_basic_operations.yaml deleted file mode 100644 index fe903f62d53..00000000000 --- a/src/storage-discovery/azext_storage_discovery/tests/latest/recordings/test_storage_discovery_workspace_basic_operations.yaml +++ /dev/null @@ -1,291 +0,0 @@ -interactions: -- request: - body: '{"location": "francecentral", "properties": {"scopes": [{"displayName": - "basic", "resourceTypes": ["Microsoft.Storage/storageAccounts"]}], "sku": "Standard", - "workspaceRoots": ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"]}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - storage-discovery workspace create - Connection: - - keep-alive - Content-Length: - - '265' - Content-Type: - - application/json - ParameterSetName: - - -g -n --location --workspace-roots --scopes - User-Agent: - - AZURECLI/2.75.0 azsdk-python-core/1.35.0 Python/3.12.11 (Linux-6.8.0-1030-azure-x86_64-with-glibc2.36) - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/sdworkspace000002?api-version=2025-06-01-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/sdworkspace000002","name":"sdworkspace000002","type":"microsoft.storagediscovery/storagediscoveryworkspaces","location":"francecentral","tags":{"team":"Discovery"},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-07-24T22:14:39.2536939Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-07-24T22:14:39.2536939Z"},"properties":{"sku":"Standard","workspaceRoots":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"],"description":null,"scopes":[{"displayName":"basic","resourceTypes":["Microsoft.Storage/storageAccounts"],"tagKeysOnly":null,"tags":null}],"provisioningState":"Succeeded"}}' - headers: - cache-control: - - no-cache - content-length: - - '851' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 24 Jul 2025 22:14:41 GMT - etag: - - '"3300935e-0000-0e00-0000-6882b0500000"' - expires: - - '-1' - mise-correlation-id: - - 9858e535-ac5a-4b83-8f59-3762dcd38419 - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - vary: - - Accept-Encoding - x-cache: - - CONFIG_NOCACHE - x-content-type-options: - - nosniff - x-ms-operation-identifier: - - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=2968a26f-a796-4124-8684-894f8a239db2/westus2/3db9766a-c245-4e51-b71a-d647544fc572 - x-ms-providerhub-traffic: - - 'True' - x-ms-ratelimit-remaining-subscription-global-writes: - - '12000' - x-ms-ratelimit-remaining-subscription-writes: - - '800' - x-msedge-ref: - - 'Ref A: 7B6AD229B3684856AF2A949B26BC6851 Ref B: CO6AA3150217017 Ref C: 2025-07-24T22:14:35Z' - x-powered-by: - - ASP.NET - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - storage-discovery workspace show - Connection: - - keep-alive - ParameterSetName: - - -g -n - User-Agent: - - AZURECLI/2.75.0 azsdk-python-core/1.35.0 Python/3.12.11 (Linux-6.8.0-1030-azure-x86_64-with-glibc2.36) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/sdworkspace000002?api-version=2025-06-01-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/sdworkspace000002","name":"sdworkspace000002","type":"microsoft.storagediscovery/storagediscoveryworkspaces","location":"francecentral","tags":{"team":"Discovery"},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-07-24T22:14:39.2536939Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-07-24T22:14:39.2536939Z"},"properties":{"sku":"Standard","workspaceRoots":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"],"description":null,"scopes":[{"displayName":"basic","resourceTypes":["Microsoft.Storage/storageAccounts"],"tagKeysOnly":null,"tags":null}],"provisioningState":"Succeeded"}}' - headers: - cache-control: - - no-cache - content-length: - - '851' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 24 Jul 2025 22:14:41 GMT - etag: - - '"3300935e-0000-0e00-0000-6882b0500000"' - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - x-cache: - - CONFIG_NOCACHE - x-content-type-options: - - nosniff - x-ms-providerhub-traffic: - - 'True' - x-ms-ratelimit-remaining-subscription-global-reads: - - '16499' - x-msedge-ref: - - 'Ref A: 375C73040750438DAE7B983500FF6AEA Ref B: MWH011020809062 Ref C: 2025-07-24T22:14:41Z' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - storage-discovery workspace update - Connection: - - keep-alive - ParameterSetName: - - -g -n --tags - User-Agent: - - AZURECLI/2.75.0 azsdk-python-core/1.35.0 Python/3.12.11 (Linux-6.8.0-1030-azure-x86_64-with-glibc2.36) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/sdworkspace000002?api-version=2025-06-01-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/sdworkspace000002","name":"sdworkspace000002","type":"microsoft.storagediscovery/storagediscoveryworkspaces","location":"francecentral","tags":{"team":"Discovery"},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-07-24T22:14:39.2536939Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-07-24T22:14:39.2536939Z"},"properties":{"sku":"Standard","workspaceRoots":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"],"description":null,"scopes":[{"displayName":"basic","resourceTypes":["Microsoft.Storage/storageAccounts"],"tagKeysOnly":null,"tags":null}],"provisioningState":"Succeeded"}}' - headers: - cache-control: - - no-cache - content-length: - - '851' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 24 Jul 2025 22:14:42 GMT - etag: - - '"3300935e-0000-0e00-0000-6882b0500000"' - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - x-cache: - - CONFIG_NOCACHE - x-content-type-options: - - nosniff - x-ms-providerhub-traffic: - - 'True' - x-ms-ratelimit-remaining-subscription-global-reads: - - '16499' - x-msedge-ref: - - 'Ref A: 1D86B07E7B144DBD8CD53EFF36631ECD Ref B: MWH011020807034 Ref C: 2025-07-24T22:14:41Z' - status: - code: 200 - message: OK -- request: - body: '{"location": "francecentral", "properties": {"scopes": [{"displayName": - "basic", "resourceTypes": ["Microsoft.Storage/storageAccounts"]}], "sku": "Standard", - "workspaceRoots": ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"]}, - "tags": {"team": "Discovery", "environment": "test", "purpose": "demo"}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - storage-discovery workspace update - Connection: - - keep-alive - Content-Length: - - '338' - Content-Type: - - application/json - ParameterSetName: - - -g -n --tags - User-Agent: - - AZURECLI/2.75.0 azsdk-python-core/1.35.0 Python/3.12.11 (Linux-6.8.0-1030-azure-x86_64-with-glibc2.36) - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/sdworkspace000002?api-version=2025-06-01-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/sdworkspace000002","name":"sdworkspace000002","type":"microsoft.storagediscovery/storagediscoveryworkspaces","location":"francecentral","tags":{"team":"Discovery","environment":"test","purpose":"demo"},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-07-24T22:14:39.2536939Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-07-24T22:14:44.4601711Z"},"properties":{"sku":"Standard","workspaceRoots":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"],"description":null,"scopes":[{"displayName":"basic","resourceTypes":["Microsoft.Storage/storageAccounts"],"tagKeysOnly":null,"tags":null}],"provisioningState":"Succeeded"}}' - headers: - cache-control: - - no-cache - content-length: - - '889' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 24 Jul 2025 22:14:45 GMT - etag: - - '"3300b95e-0000-0e00-0000-6882b0540000"' - expires: - - '-1' - mise-correlation-id: - - 9825add9-4547-4ef3-b0fa-fdf26ac4cce4 - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - vary: - - Accept-Encoding - x-cache: - - CONFIG_NOCACHE - x-content-type-options: - - nosniff - x-ms-operation-identifier: - - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=2968a26f-a796-4124-8684-894f8a239db2/southcentralus/eb0deb71-07ae-43c1-bab7-c30f9213e1eb - x-ms-providerhub-traffic: - - 'True' - x-ms-ratelimit-remaining-subscription-global-writes: - - '11999' - x-ms-ratelimit-remaining-subscription-writes: - - '799' - x-msedge-ref: - - 'Ref A: E0AE81407E1A49DDBD3C003FC57111E5 Ref B: MWH011020806054 Ref C: 2025-07-24T22:14:42Z' - x-powered-by: - - ASP.NET - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - storage-discovery workspace delete - Connection: - - keep-alive - Content-Length: - - '0' - ParameterSetName: - - -g -n -y - User-Agent: - - AZURECLI/2.75.0 azsdk-python-core/1.35.0 Python/3.12.11 (Linux-6.8.0-1030-azure-x86_64-with-glibc2.36) - method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/sdworkspace000002?api-version=2025-06-01-preview - response: - body: - string: '' - headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Thu, 24 Jul 2025 22:14:48 GMT - expires: - - '-1' - mise-correlation-id: - - b0e151d1-254e-40ac-b3db-06e04a787a81 - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - x-cache: - - CONFIG_NOCACHE - x-content-type-options: - - nosniff - x-ms-operation-identifier: - - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=2968a26f-a796-4124-8684-894f8a239db2/eastus/f3d89981-b22f-4a0c-96e8-c0a239e6b34b - x-ms-providerhub-traffic: - - 'True' - x-ms-ratelimit-remaining-subscription-deletes: - - '799' - x-ms-ratelimit-remaining-subscription-global-deletes: - - '11999' - x-msedge-ref: - - 'Ref A: 9FCFD30302A34336B43A9398B884967D Ref B: MWH011020808060 Ref C: 2025-07-24T22:14:46Z' - x-powered-by: - - ASP.NET - status: - code: 200 - message: OK -version: 1 diff --git a/src/storage-discovery/azext_storage_discovery/tests/latest/recordings/test_storage_discovery_workspace_create.yaml b/src/storage-discovery/azext_storage_discovery/tests/latest/recordings/test_storage_discovery_workspace_create.yaml index 9ea2c713c73..e06bf4edf31 100644 --- a/src/storage-discovery/azext_storage_discovery/tests/latest/recordings/test_storage_discovery_workspace_create.yaml +++ b/src/storage-discovery/azext_storage_discovery/tests/latest/recordings/test_storage_discovery_workspace_create.yaml @@ -25,7 +25,7 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/clitest000002?api-version=2025-06-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/clitest000002","name":"clitest000002","type":"microsoft.storagediscovery/storagediscoveryworkspaces","location":"francecentral","tags":{"team":"Discovery"},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-07-24T22:37:31.0040945Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-07-24T22:37:31.0040945Z"},"properties":{"sku":"Standard","workspaceRoots":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"],"description":"123","scopes":[{"displayName":"test1","resourceTypes":["Microsoft.Storage/storageAccounts"],"tagKeysOnly":["e2etest1"],"tags":{"tag1":"value1","tag2":"value2"}}],"provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/clitest000002","name":"clitest000002","type":"microsoft.storagediscovery/storagediscoveryworkspaces","location":"francecentral","tags":{"team":"Discovery"},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-08-04T23:29:28.1808107Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-08-04T23:29:28.1808107Z"},"properties":{"sku":"Standard","workspaceRoots":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"],"description":"123","scopes":[{"displayName":"test1","resourceTypes":["Microsoft.Storage/storageAccounts"],"tagKeysOnly":["e2etest1"],"tags":{"tag1":"value1","tag2":"value2"}}],"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache @@ -34,13 +34,13 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 24 Jul 2025 22:37:32 GMT + - Mon, 04 Aug 2025 23:29:30 GMT etag: - - '"33008f77-0000-0e00-0000-6882b5ac0000"' + - '"090059b8-0000-0e00-0000-689142590000"' expires: - '-1' mise-correlation-id: - - bf476c15-52e7-424e-bd8f-28edaed96703 + - fac33fd9-8aa1-4496-89b0-6af67af1888d pragma: - no-cache strict-transport-security: @@ -52,15 +52,15 @@ interactions: x-content-type-options: - nosniff x-ms-operation-identifier: - - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=2968a26f-a796-4124-8684-894f8a239db2/francecentral/973b4bd4-64ee-4e1a-82cb-13cf84e4165e + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=2968a26f-a796-4124-8684-894f8a239db2/westus2/4e992be2-4596-4c39-95e1-97adf9548c55 x-ms-providerhub-traffic: - 'True' x-ms-ratelimit-remaining-subscription-global-writes: - - '11999' + - '12000' x-ms-ratelimit-remaining-subscription-writes: - - '799' + - '800' x-msedge-ref: - - 'Ref A: 457A9C83FC3C4C5FA6955307CD01DB72 Ref B: CO6AA3150220029 Ref C: 2025-07-24T22:37:30Z' + - 'Ref A: AC03343244A64C4FB3B2828575B28EB1 Ref B: MWH011020806034 Ref C: 2025-08-04T23:29:23Z' x-powered-by: - ASP.NET status: @@ -94,11 +94,11 @@ interactions: content-length: - '0' date: - - Thu, 24 Jul 2025 22:37:36 GMT + - Mon, 04 Aug 2025 23:29:32 GMT expires: - '-1' mise-correlation-id: - - 5fb7c08e-7716-46e7-889d-d17a6d48815e + - acdfb41a-4273-454b-b469-7663f8488611 pragma: - no-cache strict-transport-security: @@ -108,7 +108,7 @@ interactions: x-content-type-options: - nosniff x-ms-operation-identifier: - - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=2968a26f-a796-4124-8684-894f8a239db2/westus2/1cd607f0-df48-45b1-9dec-38407f2ac8d9 + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=2968a26f-a796-4124-8684-894f8a239db2/francecentral/eb34bd5a-f682-480d-826c-a928dd78a13c x-ms-providerhub-traffic: - 'True' x-ms-ratelimit-remaining-subscription-deletes: @@ -116,7 +116,7 @@ interactions: x-ms-ratelimit-remaining-subscription-global-deletes: - '11999' x-msedge-ref: - - 'Ref A: 23C3DD7E206948BC89D34D2FBE94F67A Ref B: MWH011020807034 Ref C: 2025-07-24T22:37:32Z' + - 'Ref A: 310594CEBFF04E7B9C181863183270B8 Ref B: MWH011020806054 Ref C: 2025-08-04T23:29:30Z' x-powered-by: - ASP.NET status: diff --git a/src/storage-discovery/azext_storage_discovery/tests/latest/recordings/test_storage_discovery_workspace_create_update_delete.yaml b/src/storage-discovery/azext_storage_discovery/tests/latest/recordings/test_storage_discovery_workspace_create_update_delete.yaml deleted file mode 100644 index 04e2fc457de..00000000000 --- a/src/storage-discovery/azext_storage_discovery/tests/latest/recordings/test_storage_discovery_workspace_create_update_delete.yaml +++ /dev/null @@ -1,389 +0,0 @@ -interactions: -- request: - body: '{"location": "francecentral", "properties": {"description": "123", "scopes": - [{"displayName": "test1", "resourceTypes": ["Microsoft.Storage/storageAccounts"], - "tagKeysOnly": ["e2etest1"], "tags": {"tag1": "value1", "tag2": "value2"}}], - "sku": "Standard", "workspaceRoots": ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"]}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - storage-discovery workspace create - Connection: - - keep-alive - Content-Length: - - '362' - Content-Type: - - application/json - ParameterSetName: - - -g -n --location --description --sku --workspace-roots --scopes - User-Agent: - - AZURECLI/2.75.0 azsdk-python-core/1.35.0 Python/3.12.11 (Linux-6.8.0-1030-azure-x86_64-with-glibc2.36) - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/clitest000002?api-version=2025-06-01-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/clitest000002","name":"clitest000002","type":"microsoft.storagediscovery/storagediscoveryworkspaces","location":"francecentral","tags":{"team":"Discovery"},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-07-24T22:28:44.5662147Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-07-24T22:28:44.5662147Z"},"properties":{"sku":"Standard","workspaceRoots":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"],"description":"123","scopes":[{"displayName":"test1","resourceTypes":["Microsoft.Storage/storageAccounts"],"tagKeysOnly":["e2etest1"],"tags":{"tag1":"value1","tag2":"value2"}}],"provisioningState":"Succeeded"}}' - headers: - cache-control: - - no-cache - content-length: - - '881' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 24 Jul 2025 22:28:55 GMT - etag: - - '"33005f6e-0000-0e00-0000-6882b3a60000"' - expires: - - '-1' - mise-correlation-id: - - 914f4c74-dad1-47f9-a56a-3c4eea59b4c3 - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - vary: - - Accept-Encoding - x-cache: - - CONFIG_NOCACHE - x-content-type-options: - - nosniff - x-ms-operation-identifier: - - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=2968a26f-a796-4124-8684-894f8a239db2/westus2/e5dcd45f-39d7-4eec-824c-288e7db831f0 - x-ms-providerhub-traffic: - - 'True' - x-ms-ratelimit-remaining-subscription-global-writes: - - '12000' - x-ms-ratelimit-remaining-subscription-writes: - - '800' - x-msedge-ref: - - 'Ref A: 629C1EC9CECB4F91B9F0AF294B2C157A Ref B: CO6AA3150217045 Ref C: 2025-07-24T22:28:41Z' - x-powered-by: - - ASP.NET - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - storage-discovery workspace show - Connection: - - keep-alive - ParameterSetName: - - -g -n - User-Agent: - - AZURECLI/2.75.0 azsdk-python-core/1.35.0 Python/3.12.11 (Linux-6.8.0-1030-azure-x86_64-with-glibc2.36) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/clitest000002?api-version=2025-06-01-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/clitest000002","name":"clitest000002","type":"microsoft.storagediscovery/storagediscoveryworkspaces","location":"francecentral","tags":{"team":"Discovery"},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-07-24T22:28:44.5662147Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-07-24T22:28:44.5662147Z"},"properties":{"sku":"Standard","workspaceRoots":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"],"description":"123","scopes":[{"displayName":"test1","resourceTypes":["Microsoft.Storage/storageAccounts"],"tagKeysOnly":["e2etest1"],"tags":{"tag1":"value1","tag2":"value2"}}],"provisioningState":"Succeeded"}}' - headers: - cache-control: - - no-cache - content-length: - - '881' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 24 Jul 2025 22:28:55 GMT - etag: - - '"33005f6e-0000-0e00-0000-6882b3a60000"' - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - x-cache: - - CONFIG_NOCACHE - x-content-type-options: - - nosniff - x-ms-providerhub-traffic: - - 'True' - x-ms-ratelimit-remaining-subscription-global-reads: - - '16499' - x-msedge-ref: - - 'Ref A: 4830B56E26484A7AADE52CFD73222FDD Ref B: CO6AA3150220023 Ref C: 2025-07-24T22:28:55Z' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - storage-discovery workspace list - Connection: - - keep-alive - ParameterSetName: - - -g - User-Agent: - - AZURECLI/2.75.0 azsdk-python-core/1.35.0 Python/3.12.11 (Linux-6.8.0-1030-azure-x86_64-with-glibc2.36) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces?api-version=2025-06-01-preview - response: - body: - string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/clitest000002","name":"clitest000002","type":"microsoft.storagediscovery/storagediscoveryworkspaces","location":"francecentral","tags":{"team":"Discovery"},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-07-24T22:28:44.5662147Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-07-24T22:28:44.5662147Z"},"properties":{"sku":"Standard","workspaceRoots":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"],"description":"123","scopes":[{"displayName":"test1","resourceTypes":["Microsoft.Storage/storageAccounts"],"tagKeysOnly":["e2etest1"],"tags":{"tag1":"value1","tag2":"value2"}}],"provisioningState":"Succeeded"}}]}' - headers: - cache-control: - - no-cache - content-length: - - '893' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 24 Jul 2025 22:28:56 GMT - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - x-cache: - - CONFIG_NOCACHE - x-content-type-options: - - nosniff - x-ms-original-request-ids: - - ae2c4c0a-512e-4d0b-ad6c-2923ab1d8f77 - x-ms-providerhub-traffic: - - 'True' - x-ms-ratelimit-remaining-subscription-global-reads: - - '16499' - x-msedge-ref: - - 'Ref A: DB06240E11CA4A1D866C78DD41C7AD7F Ref B: MWH011020807040 Ref C: 2025-07-24T22:28:56Z' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - storage-discovery workspace update - Connection: - - keep-alive - ParameterSetName: - - -g -n --description --sku --workspace-roots --scopes --tags - User-Agent: - - AZURECLI/2.75.0 azsdk-python-core/1.35.0 Python/3.12.11 (Linux-6.8.0-1030-azure-x86_64-with-glibc2.36) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/clitest000002?api-version=2025-06-01-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/clitest000002","name":"clitest000002","type":"microsoft.storagediscovery/storagediscoveryworkspaces","location":"francecentral","tags":{"team":"Discovery"},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-07-24T22:28:44.5662147Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-07-24T22:28:44.5662147Z"},"properties":{"sku":"Standard","workspaceRoots":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"],"description":"123","scopes":[{"displayName":"test1","resourceTypes":["Microsoft.Storage/storageAccounts"],"tagKeysOnly":["e2etest1"],"tags":{"tag1":"value1","tag2":"value2"}}],"provisioningState":"Succeeded"}}' - headers: - cache-control: - - no-cache - content-length: - - '881' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 24 Jul 2025 22:28:56 GMT - etag: - - '"33005f6e-0000-0e00-0000-6882b3a60000"' - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - x-cache: - - CONFIG_NOCACHE - x-content-type-options: - - nosniff - x-ms-providerhub-traffic: - - 'True' - x-ms-ratelimit-remaining-subscription-global-reads: - - '16499' - x-msedge-ref: - - 'Ref A: 8CFDDD275CEA47BC8B652C4EC4A7FC75 Ref B: MWH011020807034 Ref C: 2025-07-24T22:28:56Z' - status: - code: 200 - message: OK -- request: - body: '{"location": "francecentral", "properties": {"description": "test2", "scopes": - [{"displayName": "test2", "resourceTypes": ["Microsoft.Storage/storageAccounts"], - "tagKeysOnly": ["e2etest2"], "tags": {"tag3": "value3"}}], "sku": "Free", "workspaceRoots": - ["/subscriptions/00000000-0000-0000-0000-000000000000"]}, "tags": {"team": "Discovery", - "tag4": "value4"}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - storage-discovery workspace update - Connection: - - keep-alive - Content-Length: - - '359' - Content-Type: - - application/json - ParameterSetName: - - -g -n --description --sku --workspace-roots --scopes --tags - User-Agent: - - AZURECLI/2.75.0 azsdk-python-core/1.35.0 Python/3.12.11 (Linux-6.8.0-1030-azure-x86_64-with-glibc2.36) - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/clitest000002?api-version=2025-06-01-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/clitest000002","name":"clitest000002","type":"microsoft.storagediscovery/storagediscoveryworkspaces","location":"francecentral","tags":{"team":"Discovery","tag4":"value4"},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-07-24T22:28:44.5662147Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-07-24T22:28:59.067202Z"},"properties":{"sku":"Free","workspaceRoots":["/subscriptions/00000000-0000-0000-0000-000000000000"],"description":"test2","scopes":[{"displayName":"test2","resourceTypes":["Microsoft.Storage/storageAccounts"],"tagKeysOnly":["e2etest2"],"tags":{"tag3":"value3"}}],"provisioningState":"Succeeded"}}' - headers: - cache-control: - - no-cache - content-length: - - '846' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 24 Jul 2025 22:29:00 GMT - etag: - - '"3300736e-0000-0e00-0000-6882b3ab0000"' - expires: - - '-1' - mise-correlation-id: - - d62cbb49-ce0a-4980-8fd5-f90b88e592e2 - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - vary: - - Accept-Encoding - x-cache: - - CONFIG_NOCACHE - x-content-type-options: - - nosniff - x-ms-operation-identifier: - - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=2968a26f-a796-4124-8684-894f8a239db2/eastus/301d3997-24d6-411f-98f9-d829c4b0ce4b - x-ms-providerhub-traffic: - - 'True' - x-ms-ratelimit-remaining-subscription-global-writes: - - '11999' - x-ms-ratelimit-remaining-subscription-writes: - - '799' - x-msedge-ref: - - 'Ref A: E3CFB4DF99B0477A8716A3C59F6C4764 Ref B: MWH011020806054 Ref C: 2025-07-24T22:28:57Z' - x-powered-by: - - ASP.NET - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - storage-discovery workspace delete - Connection: - - keep-alive - Content-Length: - - '0' - ParameterSetName: - - -g -n -y - User-Agent: - - AZURECLI/2.75.0 azsdk-python-core/1.35.0 Python/3.12.11 (Linux-6.8.0-1030-azure-x86_64-with-glibc2.36) - method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/clitest000002?api-version=2025-06-01-preview - response: - body: - string: '' - headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Thu, 24 Jul 2025 22:29:04 GMT - expires: - - '-1' - mise-correlation-id: - - 9ac9d0c4-8b0b-4a4e-bfe0-4445fbbb84f0 - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - x-cache: - - CONFIG_NOCACHE - x-content-type-options: - - nosniff - x-ms-operation-identifier: - - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=2968a26f-a796-4124-8684-894f8a239db2/westus/b219dfd7-9b90-4ab1-8e20-7a217a044b6e - x-ms-providerhub-traffic: - - 'True' - x-ms-ratelimit-remaining-subscription-deletes: - - '799' - x-ms-ratelimit-remaining-subscription-global-deletes: - - '11999' - x-msedge-ref: - - 'Ref A: 1E523ED9B7924FCA8067C259F0CB5CD2 Ref B: MWH011020808060 Ref C: 2025-07-24T22:29:00Z' - x-powered-by: - - ASP.NET - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - storage-discovery workspace list - Connection: - - keep-alive - ParameterSetName: - - -g - User-Agent: - - AZURECLI/2.75.0 azsdk-python-core/1.35.0 Python/3.12.11 (Linux-6.8.0-1030-azure-x86_64-with-glibc2.36) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces?api-version=2025-06-01-preview - response: - body: - string: '{"value":[]}' - headers: - cache-control: - - no-cache - content-length: - - '12' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 24 Jul 2025 22:29:06 GMT - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - x-cache: - - CONFIG_NOCACHE - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-subscription-global-reads: - - '16499' - x-msedge-ref: - - 'Ref A: 5ECCE9107A2A4147BB1E9571E9EDF786 Ref B: MWH011020806023 Ref C: 2025-07-24T22:29:05Z' - status: - code: 200 - message: OK -version: 1 diff --git a/src/storage-discovery/azext_storage_discovery/tests/latest/recordings/test_storage_discovery_workspace_delete.yaml b/src/storage-discovery/azext_storage_discovery/tests/latest/recordings/test_storage_discovery_workspace_delete.yaml index 64915c02653..888b1b3d38b 100644 --- a/src/storage-discovery/azext_storage_discovery/tests/latest/recordings/test_storage_discovery_workspace_delete.yaml +++ b/src/storage-discovery/azext_storage_discovery/tests/latest/recordings/test_storage_discovery_workspace_delete.yaml @@ -24,7 +24,7 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/deletews000002?api-version=2025-06-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/deletews000002","name":"deletews000002","type":"microsoft.storagediscovery/storagediscoveryworkspaces","location":"francecentral","tags":{"team":"Discovery"},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-07-24T22:37:33.7501037Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-07-24T22:37:33.7501037Z"},"properties":{"sku":"Standard","workspaceRoots":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"],"description":null,"scopes":[{"displayName":"basic","resourceTypes":["Microsoft.Storage/storageAccounts"],"tagKeysOnly":null,"tags":null}],"provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/deletews000002","name":"deletews000002","type":"microsoft.storagediscovery/storagediscoveryworkspaces","location":"francecentral","tags":{"team":"Discovery"},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-08-04T23:29:41.8247547Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-08-04T23:29:41.8247547Z"},"properties":{"sku":"Standard","workspaceRoots":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"],"description":null,"scopes":[{"displayName":"basic","resourceTypes":["Microsoft.Storage/storageAccounts"],"tagKeysOnly":null,"tags":null}],"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache @@ -33,13 +33,13 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 24 Jul 2025 22:37:35 GMT + - Mon, 04 Aug 2025 23:29:43 GMT etag: - - '"33009d77-0000-0e00-0000-6882b5ae0000"' + - '"090062b8-0000-0e00-0000-689142660000"' expires: - '-1' mise-correlation-id: - - 9724a1a3-cad6-40df-8564-a8776d4fc2f7 + - 748fe106-fb11-405a-ad5d-9a86f802d9aa pragma: - no-cache strict-transport-security: @@ -51,7 +51,7 @@ interactions: x-content-type-options: - nosniff x-ms-operation-identifier: - - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=2968a26f-a796-4124-8684-894f8a239db2/westus2/b0bccee9-4086-4f39-aef1-acb73b3ca4c3 + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=2968a26f-a796-4124-8684-894f8a239db2/westus2/d2d6173c-ab66-4379-86e6-9e8896a65670 x-ms-providerhub-traffic: - 'True' x-ms-ratelimit-remaining-subscription-global-writes: @@ -59,7 +59,7 @@ interactions: x-ms-ratelimit-remaining-subscription-writes: - '799' x-msedge-ref: - - 'Ref A: 1B1B11A046014511990BC078529BA863 Ref B: MWH011020809062 Ref C: 2025-07-24T22:37:30Z' + - 'Ref A: B33F382167A1452A8F8471132F9E9788 Ref B: CO6AA3150217029 Ref C: 2025-08-04T23:29:35Z' x-powered-by: - ASP.NET status: @@ -84,7 +84,7 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces?api-version=2025-06-01-preview response: body: - string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/deletews000002","name":"deletews000002","type":"microsoft.storagediscovery/storagediscoveryworkspaces","location":"francecentral","tags":{"team":"Discovery"},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-07-24T22:37:33.7501037Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-07-24T22:37:33.7501037Z"},"properties":{"sku":"Standard","workspaceRoots":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"],"scopes":[{"displayName":"basic","resourceTypes":["Microsoft.Storage/storageAccounts"]}],"provisioningState":"Succeeded"}}]}' + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/deletews000002","name":"deletews000002","type":"microsoft.storagediscovery/storagediscoveryworkspaces","location":"francecentral","tags":{"team":"Discovery"},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-08-04T23:29:41.8247547Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-08-04T23:29:41.8247547Z"},"properties":{"sku":"Standard","workspaceRoots":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"],"scopes":[{"displayName":"basic","resourceTypes":["Microsoft.Storage/storageAccounts"]}],"provisioningState":"Succeeded"}}]}' headers: cache-control: - no-cache @@ -93,7 +93,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 24 Jul 2025 22:37:35 GMT + - Mon, 04 Aug 2025 23:29:43 GMT expires: - '-1' pragma: @@ -105,13 +105,13 @@ interactions: x-content-type-options: - nosniff x-ms-original-request-ids: - - 9720d4f1-c255-450b-b0d6-315badfe9555 + - 5f3c8c89-0910-4842-88ed-ee88de715b9a x-ms-providerhub-traffic: - 'True' x-ms-ratelimit-remaining-subscription-global-reads: - '16499' x-msedge-ref: - - 'Ref A: C75AB7BF07F041D98D837E439A7B7252 Ref B: CO6AA3150217021 Ref C: 2025-07-24T22:37:35Z' + - 'Ref A: 56CE892D385848CB861266251F93CBD8 Ref B: MWH011020808040 Ref C: 2025-08-04T23:29:43Z' status: code: 200 message: OK @@ -143,11 +143,11 @@ interactions: content-length: - '0' date: - - Thu, 24 Jul 2025 22:37:38 GMT + - Mon, 04 Aug 2025 23:29:45 GMT expires: - '-1' mise-correlation-id: - - 6217a610-4a88-455e-b39d-478b1a117046 + - 552b9331-ee56-4859-91a0-9c289a747489 pragma: - no-cache strict-transport-security: @@ -157,7 +157,7 @@ interactions: x-content-type-options: - nosniff x-ms-operation-identifier: - - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=2968a26f-a796-4124-8684-894f8a239db2/northeurope/bcf551bd-3810-44f7-b0d3-7b167d46b4f5 + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=2968a26f-a796-4124-8684-894f8a239db2/francecentral/db7d9842-9526-4bb7-98f3-e870a607b64a x-ms-providerhub-traffic: - 'True' x-ms-ratelimit-remaining-subscription-deletes: @@ -165,7 +165,7 @@ interactions: x-ms-ratelimit-remaining-subscription-global-deletes: - '11999' x-msedge-ref: - - 'Ref A: 8398CC8A6169452E9419AA921CC72297 Ref B: MWH011020807029 Ref C: 2025-07-24T22:37:36Z' + - 'Ref A: C7CEB4F880B14271AE4B0550DB827BF3 Ref B: MWH011020806034 Ref C: 2025-08-04T23:29:44Z' x-powered-by: - ASP.NET status: @@ -199,7 +199,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 24 Jul 2025 22:37:38 GMT + - Mon, 04 Aug 2025 23:29:46 GMT expires: - '-1' pragma: @@ -213,7 +213,7 @@ interactions: x-ms-ratelimit-remaining-subscription-global-reads: - '16499' x-msedge-ref: - - 'Ref A: E91AB6ED42D749B58726F3CA289ED686 Ref B: CO6AA3150217023 Ref C: 2025-07-24T22:37:38Z' + - 'Ref A: 30DD03447EA1481D915F67BE2AF24EB8 Ref B: MWH011020806054 Ref C: 2025-08-04T23:29:45Z' status: code: 200 message: OK diff --git a/src/storage-discovery/azext_storage_discovery/tests/latest/recordings/test_storage_discovery_workspace_list.yaml b/src/storage-discovery/azext_storage_discovery/tests/latest/recordings/test_storage_discovery_workspace_list.yaml index aac1d4d7bce..5b18aa11db6 100644 --- a/src/storage-discovery/azext_storage_discovery/tests/latest/recordings/test_storage_discovery_workspace_list.yaml +++ b/src/storage-discovery/azext_storage_discovery/tests/latest/recordings/test_storage_discovery_workspace_list.yaml @@ -16,16 +16,16 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces?api-version=2025-06-01-preview response: body: - string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/shane_cli_test/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/clitest0724","name":"clitest0724","type":"microsoft.storagediscovery/storagediscoveryworkspaces","location":"francecentral","tags":{"team":"Discovery","tag4":"value4"},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-07-24T20:55:05.0509322Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-07-24T20:55:14.4024626Z"},"properties":{"sku":"Free","workspaceRoots":["/subscriptions/00000000-0000-0000-0000-000000000000"],"description":"test2","scopes":[{"displayName":"test2","resourceTypes":["Microsoft.Storage/storageAccounts"],"tagKeysOnly":["e2etest2"],"tags":{"tag3":"value3"}}],"provisioningState":"Succeeded"}}]}' + string: '{"value":[]}' headers: cache-control: - no-cache content-length: - - '853' + - '12' content-type: - application/json; charset=utf-8 date: - - Thu, 24 Jul 2025 22:37:27 GMT + - Mon, 04 Aug 2025 23:29:50 GMT expires: - '-1' pragma: @@ -36,14 +36,10 @@ interactions: - CONFIG_NOCACHE x-content-type-options: - nosniff - x-ms-original-request-ids: - - 40312197-392b-4625-a884-d65e4fc80d9a - x-ms-providerhub-traffic: - - 'True' x-ms-ratelimit-remaining-subscription-global-reads: - '16499' x-msedge-ref: - - 'Ref A: 016141B993444A46B293F28BB4974293 Ref B: CO6AA3150217045 Ref C: 2025-07-24T22:37:27Z' + - 'Ref A: F664E3FFDE704CD8A2323D2980414ED8 Ref B: MWH011020807023 Ref C: 2025-08-04T23:29:50Z' status: code: 200 message: OK diff --git a/src/storage-discovery/azext_storage_discovery/tests/latest/recordings/test_storage_discovery_workspace_list_subscription.yaml b/src/storage-discovery/azext_storage_discovery/tests/latest/recordings/test_storage_discovery_workspace_list_subscription.yaml deleted file mode 100644 index c72f4bc7e73..00000000000 --- a/src/storage-discovery/azext_storage_discovery/tests/latest/recordings/test_storage_discovery_workspace_list_subscription.yaml +++ /dev/null @@ -1,50 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - storage-discovery workspace list - Connection: - - keep-alive - User-Agent: - - AZURECLI/2.75.0 azsdk-python-core/1.35.0 Python/3.12.11 (Linux-6.8.0-1030-azure-x86_64-with-glibc2.36) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces?api-version=2025-06-01-preview - response: - body: - string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/shane_cli_test/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/clitest0724","name":"clitest0724","type":"microsoft.storagediscovery/storagediscoveryworkspaces","location":"francecentral","tags":{"team":"Discovery","tag4":"value4"},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-07-24T20:55:05.0509322Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-07-24T20:55:14.4024626Z"},"properties":{"sku":"Free","workspaceRoots":["/subscriptions/00000000-0000-0000-0000-000000000000"],"description":"test2","scopes":[{"displayName":"test2","resourceTypes":["Microsoft.Storage/storageAccounts"],"tagKeysOnly":["e2etest2"],"tags":{"tag3":"value3"}}],"provisioningState":"Succeeded"}}]}' - headers: - cache-control: - - no-cache - content-length: - - '853' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 24 Jul 2025 22:14:33 GMT - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - x-cache: - - CONFIG_NOCACHE - x-content-type-options: - - nosniff - x-ms-original-request-ids: - - d41c35b7-0e1b-4e3e-aba6-a91202deb7ff - x-ms-providerhub-traffic: - - 'True' - x-ms-ratelimit-remaining-subscription-global-reads: - - '16499' - x-msedge-ref: - - 'Ref A: 40C2AB0E1C0A42E39A12357A571F1094 Ref B: CO6AA3150220021 Ref C: 2025-07-24T22:14:33Z' - status: - code: 200 - message: OK -version: 1 diff --git a/src/storage-discovery/azext_storage_discovery/tests/latest/recordings/test_storage_discovery_workspace_scenarios.yaml b/src/storage-discovery/azext_storage_discovery/tests/latest/recordings/test_storage_discovery_workspace_scenarios.yaml deleted file mode 100644 index 6a0785a8805..00000000000 --- a/src/storage-discovery/azext_storage_discovery/tests/latest/recordings/test_storage_discovery_workspace_scenarios.yaml +++ /dev/null @@ -1,389 +0,0 @@ -interactions: -- request: - body: '{"location": "francecentral", "properties": {"description": "123", "scopes": - [{"displayName": "test1", "resourceTypes": ["Microsoft.Storage/storageAccounts"], - "tagKeysOnly": ["e2etest1"], "tags": {"tag1": "value1", "tag2": "value2"}}], - "sku": "Standard", "workspaceRoots": ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"]}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - storage-discovery workspace create - Connection: - - keep-alive - Content-Length: - - '362' - Content-Type: - - application/json - ParameterSetName: - - -g -n --location --description --sku --workspace-roots --scopes - User-Agent: - - AZURECLI/2.75.0 azsdk-python-core/1.35.0 Python/3.12.11 (Linux-6.8.0-1030-azure-x86_64-with-glibc2.36) - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/clitest000002?api-version=2025-06-01-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/clitest000002","name":"clitest000002","type":"microsoft.storagediscovery/storagediscoveryworkspaces","location":"francecentral","tags":{"team":"Discovery"},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-07-24T22:14:37.1212669Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-07-24T22:14:37.1212669Z"},"properties":{"sku":"Standard","workspaceRoots":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"],"description":"123","scopes":[{"displayName":"test1","resourceTypes":["Microsoft.Storage/storageAccounts"],"tagKeysOnly":["e2etest1"],"tags":{"tag1":"value1","tag2":"value2"}}],"provisioningState":"Succeeded"}}' - headers: - cache-control: - - no-cache - content-length: - - '881' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 24 Jul 2025 22:14:38 GMT - etag: - - '"33008f5e-0000-0e00-0000-6882b04e0000"' - expires: - - '-1' - mise-correlation-id: - - 25b34baa-bfb1-4edd-a4f0-0104fbfc2f95 - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - vary: - - Accept-Encoding - x-cache: - - CONFIG_NOCACHE - x-content-type-options: - - nosniff - x-ms-operation-identifier: - - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=2968a26f-a796-4124-8684-894f8a239db2/francecentral/efbcba1d-258b-4ad4-9cc8-df076df5dd4b - x-ms-providerhub-traffic: - - 'True' - x-ms-ratelimit-remaining-subscription-global-writes: - - '11999' - x-ms-ratelimit-remaining-subscription-writes: - - '799' - x-msedge-ref: - - 'Ref A: E03F413C8E8E467DA5202642B6904AEF Ref B: CO6AA3150217045 Ref C: 2025-07-24T22:14:36Z' - x-powered-by: - - ASP.NET - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - storage-discovery workspace show - Connection: - - keep-alive - ParameterSetName: - - -g -n - User-Agent: - - AZURECLI/2.75.0 azsdk-python-core/1.35.0 Python/3.12.11 (Linux-6.8.0-1030-azure-x86_64-with-glibc2.36) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/clitest000002?api-version=2025-06-01-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/clitest000002","name":"clitest000002","type":"microsoft.storagediscovery/storagediscoveryworkspaces","location":"francecentral","tags":{"team":"Discovery"},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-07-24T22:14:37.1212669Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-07-24T22:14:37.1212669Z"},"properties":{"sku":"Standard","workspaceRoots":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"],"description":"123","scopes":[{"displayName":"test1","resourceTypes":["Microsoft.Storage/storageAccounts"],"tagKeysOnly":["e2etest1"],"tags":{"tag1":"value1","tag2":"value2"}}],"provisioningState":"Succeeded"}}' - headers: - cache-control: - - no-cache - content-length: - - '881' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 24 Jul 2025 22:14:39 GMT - etag: - - '"33008f5e-0000-0e00-0000-6882b04e0000"' - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - x-cache: - - CONFIG_NOCACHE - x-content-type-options: - - nosniff - x-ms-providerhub-traffic: - - 'True' - x-ms-ratelimit-remaining-subscription-global-reads: - - '16499' - x-msedge-ref: - - 'Ref A: F6D09F2234784503A09BAC2E907FF30F Ref B: CO6AA3150220023 Ref C: 2025-07-24T22:14:38Z' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - storage-discovery workspace list - Connection: - - keep-alive - ParameterSetName: - - -g - User-Agent: - - AZURECLI/2.75.0 azsdk-python-core/1.35.0 Python/3.12.11 (Linux-6.8.0-1030-azure-x86_64-with-glibc2.36) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces?api-version=2025-06-01-preview - response: - body: - string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/clitest000002","name":"clitest000002","type":"microsoft.storagediscovery/storagediscoveryworkspaces","location":"francecentral","tags":{"team":"Discovery"},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-07-24T22:14:37.1212669Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-07-24T22:14:37.1212669Z"},"properties":{"sku":"Standard","workspaceRoots":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"],"description":"123","scopes":[{"displayName":"test1","resourceTypes":["Microsoft.Storage/storageAccounts"],"tagKeysOnly":["e2etest1"],"tags":{"tag1":"value1","tag2":"value2"}}],"provisioningState":"Succeeded"}}]}' - headers: - cache-control: - - no-cache - content-length: - - '893' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 24 Jul 2025 22:14:40 GMT - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - x-cache: - - CONFIG_NOCACHE - x-content-type-options: - - nosniff - x-ms-original-request-ids: - - 8c20944d-26ee-4256-923b-00f68f480598 - x-ms-providerhub-traffic: - - 'True' - x-ms-ratelimit-remaining-subscription-global-reads: - - '16499' - x-msedge-ref: - - 'Ref A: 99ABC56CC3F14CB3BBBDB48448182D72 Ref B: CO6AA3150220029 Ref C: 2025-07-24T22:14:40Z' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - storage-discovery workspace update - Connection: - - keep-alive - ParameterSetName: - - -g -n --description --sku --workspace-roots --scopes --tags - User-Agent: - - AZURECLI/2.75.0 azsdk-python-core/1.35.0 Python/3.12.11 (Linux-6.8.0-1030-azure-x86_64-with-glibc2.36) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/clitest000002?api-version=2025-06-01-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/clitest000002","name":"clitest000002","type":"microsoft.storagediscovery/storagediscoveryworkspaces","location":"francecentral","tags":{"team":"Discovery"},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-07-24T22:14:37.1212669Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-07-24T22:14:37.1212669Z"},"properties":{"sku":"Standard","workspaceRoots":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"],"description":"123","scopes":[{"displayName":"test1","resourceTypes":["Microsoft.Storage/storageAccounts"],"tagKeysOnly":["e2etest1"],"tags":{"tag1":"value1","tag2":"value2"}}],"provisioningState":"Succeeded"}}' - headers: - cache-control: - - no-cache - content-length: - - '881' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 24 Jul 2025 22:14:40 GMT - etag: - - '"33008f5e-0000-0e00-0000-6882b04e0000"' - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - x-cache: - - CONFIG_NOCACHE - x-content-type-options: - - nosniff - x-ms-providerhub-traffic: - - 'True' - x-ms-ratelimit-remaining-subscription-global-reads: - - '16499' - x-msedge-ref: - - 'Ref A: 991BCF26383C4B4CA737A4805D99046D Ref B: CO6AA3150220021 Ref C: 2025-07-24T22:14:40Z' - status: - code: 200 - message: OK -- request: - body: '{"location": "francecentral", "properties": {"description": "test2", "scopes": - [{"displayName": "test2", "resourceTypes": ["Microsoft.Storage/storageAccounts"], - "tagKeysOnly": ["e2etest2"], "tags": {"tag3": "value3"}}], "sku": "Free", "workspaceRoots": - ["/subscriptions/00000000-0000-0000-0000-000000000000"]}, "tags": {"team": "Discovery", - "tag4": "value4"}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - storage-discovery workspace update - Connection: - - keep-alive - Content-Length: - - '359' - Content-Type: - - application/json - ParameterSetName: - - -g -n --description --sku --workspace-roots --scopes --tags - User-Agent: - - AZURECLI/2.75.0 azsdk-python-core/1.35.0 Python/3.12.11 (Linux-6.8.0-1030-azure-x86_64-with-glibc2.36) - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/clitest000002?api-version=2025-06-01-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/clitest000002","name":"clitest000002","type":"microsoft.storagediscovery/storagediscoveryworkspaces","location":"francecentral","tags":{"team":"Discovery","tag4":"value4"},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-07-24T22:14:37.1212669Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-07-24T22:14:43.4604223Z"},"properties":{"sku":"Free","workspaceRoots":["/subscriptions/00000000-0000-0000-0000-000000000000"],"description":"test2","scopes":[{"displayName":"test2","resourceTypes":["Microsoft.Storage/storageAccounts"],"tagKeysOnly":["e2etest2"],"tags":{"tag3":"value3"}}],"provisioningState":"Succeeded"}}' - headers: - cache-control: - - no-cache - content-length: - - '847' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 24 Jul 2025 22:14:44 GMT - etag: - - '"3300b55e-0000-0e00-0000-6882b0540000"' - expires: - - '-1' - mise-correlation-id: - - 143fb343-85ca-4cdc-9c74-f7ba3b8b752b - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - vary: - - Accept-Encoding - x-cache: - - CONFIG_NOCACHE - x-content-type-options: - - nosniff - x-ms-operation-identifier: - - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=2968a26f-a796-4124-8684-894f8a239db2/northcentralus/e701502f-7d91-4894-bbe3-85c11e58ef27 - x-ms-providerhub-traffic: - - 'True' - x-ms-ratelimit-remaining-subscription-global-writes: - - '11999' - x-ms-ratelimit-remaining-subscription-writes: - - '799' - x-msedge-ref: - - 'Ref A: 7FA295D3F1CD4A9A96786EB6ED18A324 Ref B: MWH011020807040 Ref C: 2025-07-24T22:14:41Z' - x-powered-by: - - ASP.NET - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - storage-discovery workspace delete - Connection: - - keep-alive - Content-Length: - - '0' - ParameterSetName: - - -g -n -y - User-Agent: - - AZURECLI/2.75.0 azsdk-python-core/1.35.0 Python/3.12.11 (Linux-6.8.0-1030-azure-x86_64-with-glibc2.36) - method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/clitest000002?api-version=2025-06-01-preview - response: - body: - string: '' - headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Thu, 24 Jul 2025 22:14:48 GMT - expires: - - '-1' - mise-correlation-id: - - a6fe7771-3e85-4ffb-a485-8a6ee3b3ea58 - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - x-cache: - - CONFIG_NOCACHE - x-content-type-options: - - nosniff - x-ms-operation-identifier: - - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=2968a26f-a796-4124-8684-894f8a239db2/eastus/09477364-317a-4639-a3d7-16fc25dee276 - x-ms-providerhub-traffic: - - 'True' - x-ms-ratelimit-remaining-subscription-deletes: - - '799' - x-ms-ratelimit-remaining-subscription-global-deletes: - - '11999' - x-msedge-ref: - - 'Ref A: 14BF7E760550459E9DA68858A9115C48 Ref B: MWH011020808034 Ref C: 2025-07-24T22:14:45Z' - x-powered-by: - - ASP.NET - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - storage-discovery workspace list - Connection: - - keep-alive - ParameterSetName: - - -g - User-Agent: - - AZURECLI/2.75.0 azsdk-python-core/1.35.0 Python/3.12.11 (Linux-6.8.0-1030-azure-x86_64-with-glibc2.36) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces?api-version=2025-06-01-preview - response: - body: - string: '{"value":[]}' - headers: - cache-control: - - no-cache - content-length: - - '12' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 24 Jul 2025 22:14:48 GMT - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - x-cache: - - CONFIG_NOCACHE - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-subscription-global-reads: - - '16499' - x-msedge-ref: - - 'Ref A: A5A132FF28D2496F89604B4EA84E838C Ref B: CO6AA3150217021 Ref C: 2025-07-24T22:14:49Z' - status: - code: 200 - message: OK -version: 1 diff --git a/src/storage-discovery/azext_storage_discovery/tests/latest/recordings/test_storage_discovery_workspace_show.yaml b/src/storage-discovery/azext_storage_discovery/tests/latest/recordings/test_storage_discovery_workspace_show.yaml index 8f0ee441bfc..3becfa3cf7b 100644 --- a/src/storage-discovery/azext_storage_discovery/tests/latest/recordings/test_storage_discovery_workspace_show.yaml +++ b/src/storage-discovery/azext_storage_discovery/tests/latest/recordings/test_storage_discovery_workspace_show.yaml @@ -24,7 +24,7 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/sdworkspace000002?api-version=2025-06-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/sdworkspace000002","name":"sdworkspace000002","type":"microsoft.storagediscovery/storagediscoveryworkspaces","location":"francecentral","tags":{"team":"Discovery"},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-07-24T22:37:32.8910454Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-07-24T22:37:32.8910454Z"},"properties":{"sku":"Standard","workspaceRoots":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"],"description":null,"scopes":[{"displayName":"basic","resourceTypes":["Microsoft.Storage/storageAccounts"],"tagKeysOnly":null,"tags":null}],"provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/sdworkspace000002","name":"sdworkspace000002","type":"microsoft.storagediscovery/storagediscoveryworkspaces","location":"francecentral","tags":{"team":"Discovery"},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-08-04T23:29:54.6494315Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-08-04T23:29:54.6494315Z"},"properties":{"sku":"Standard","workspaceRoots":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"],"description":null,"scopes":[{"displayName":"basic","resourceTypes":["Microsoft.Storage/storageAccounts"],"tagKeysOnly":null,"tags":null}],"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache @@ -33,13 +33,13 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 24 Jul 2025 22:37:34 GMT + - Mon, 04 Aug 2025 23:29:56 GMT etag: - - '"33009a77-0000-0e00-0000-6882b5ad0000"' + - '"09006bb8-0000-0e00-0000-689142730000"' expires: - '-1' mise-correlation-id: - - 0bc68731-f485-42d8-b2a8-2a5e82cf262d + - b72d91a8-185b-466c-8c91-78fbf003c95d pragma: - no-cache strict-transport-security: @@ -51,7 +51,7 @@ interactions: x-content-type-options: - nosniff x-ms-operation-identifier: - - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=2968a26f-a796-4124-8684-894f8a239db2/eastus/8e283da5-5db3-4a55-8aba-2c3fd8daf213 + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=2968a26f-a796-4124-8684-894f8a239db2/eastus/02aa6289-e7c8-4130-bfb5-2df9ce33a101 x-ms-providerhub-traffic: - 'True' x-ms-ratelimit-remaining-subscription-global-writes: @@ -59,7 +59,7 @@ interactions: x-ms-ratelimit-remaining-subscription-writes: - '799' x-msedge-ref: - - 'Ref A: 0B7B45F1F5B642E4A0BB49E8895EF3B9 Ref B: MWH011020806042 Ref C: 2025-07-24T22:37:30Z' + - 'Ref A: B385D508333E4FD3B3D3E13DF52C4220 Ref B: CO6AA3150220039 Ref C: 2025-08-04T23:29:52Z' x-powered-by: - ASP.NET status: @@ -84,7 +84,7 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/sdworkspace000002?api-version=2025-06-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/sdworkspace000002","name":"sdworkspace000002","type":"microsoft.storagediscovery/storagediscoveryworkspaces","location":"francecentral","tags":{"team":"Discovery"},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-07-24T22:37:32.8910454Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-07-24T22:37:32.8910454Z"},"properties":{"sku":"Standard","workspaceRoots":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"],"description":null,"scopes":[{"displayName":"basic","resourceTypes":["Microsoft.Storage/storageAccounts"],"tagKeysOnly":null,"tags":null}],"provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/sdworkspace000002","name":"sdworkspace000002","type":"microsoft.storagediscovery/storagediscoveryworkspaces","location":"francecentral","tags":{"team":"Discovery"},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-08-04T23:29:54.6494315Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-08-04T23:29:54.6494315Z"},"properties":{"sku":"Standard","workspaceRoots":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"],"description":null,"scopes":[{"displayName":"basic","resourceTypes":["Microsoft.Storage/storageAccounts"],"tagKeysOnly":null,"tags":null}],"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache @@ -93,9 +93,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 24 Jul 2025 22:37:34 GMT + - Mon, 04 Aug 2025 23:29:55 GMT etag: - - '"33009a77-0000-0e00-0000-6882b5ad0000"' + - '"09006bb8-0000-0e00-0000-689142730000"' expires: - '-1' pragma: @@ -111,7 +111,7 @@ interactions: x-ms-ratelimit-remaining-subscription-global-reads: - '16499' x-msedge-ref: - - 'Ref A: A09F13BAEAB54C8FB214D8DADC733597 Ref B: MWH011020808034 Ref C: 2025-07-24T22:37:34Z' + - 'Ref A: 06796561D4BE45AFABC6791B58279A0F Ref B: MWH011020808040 Ref C: 2025-08-04T23:29:56Z' status: code: 200 message: OK @@ -134,7 +134,7 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/sdworkspace000002?api-version=2025-06-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/sdworkspace000002","name":"sdworkspace000002","type":"microsoft.storagediscovery/storagediscoveryworkspaces","location":"francecentral","tags":{"team":"Discovery"},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-07-24T22:37:32.8910454Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-07-24T22:37:32.8910454Z"},"properties":{"sku":"Standard","workspaceRoots":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"],"description":null,"scopes":[{"displayName":"basic","resourceTypes":["Microsoft.Storage/storageAccounts"],"tagKeysOnly":null,"tags":null}],"provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/sdworkspace000002","name":"sdworkspace000002","type":"microsoft.storagediscovery/storagediscoveryworkspaces","location":"francecentral","tags":{"team":"Discovery"},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-08-04T23:29:54.6494315Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-08-04T23:29:54.6494315Z"},"properties":{"sku":"Standard","workspaceRoots":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"],"description":null,"scopes":[{"displayName":"basic","resourceTypes":["Microsoft.Storage/storageAccounts"],"tagKeysOnly":null,"tags":null}],"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache @@ -143,9 +143,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 24 Jul 2025 22:37:35 GMT + - Mon, 04 Aug 2025 23:29:56 GMT etag: - - '"33009a77-0000-0e00-0000-6882b5ad0000"' + - '"09006bb8-0000-0e00-0000-689142730000"' expires: - '-1' pragma: @@ -161,7 +161,7 @@ interactions: x-ms-ratelimit-remaining-subscription-global-reads: - '16499' x-msedge-ref: - - 'Ref A: A6F27078F3B14762BBEA53FF5D541687 Ref B: MWH011020808060 Ref C: 2025-07-24T22:37:35Z' + - 'Ref A: 74A0503C09744CA2B3909A5F3EE0D321 Ref B: MWH011020806034 Ref C: 2025-08-04T23:29:56Z' status: code: 200 message: OK @@ -191,7 +191,7 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/sdworkspace000002?api-version=2025-06-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/sdworkspace000002","name":"sdworkspace000002","type":"microsoft.storagediscovery/storagediscoveryworkspaces","location":"francecentral","tags":{"team":"Discovery","environment":"test","purpose":"demo"},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-07-24T22:37:32.8910454Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-07-24T22:37:38.7091622Z"},"properties":{"sku":"Standard","workspaceRoots":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"],"description":null,"scopes":[{"displayName":"basic","resourceTypes":["Microsoft.Storage/storageAccounts"],"tagKeysOnly":null,"tags":null}],"provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/sdworkspace000002","name":"sdworkspace000002","type":"microsoft.storagediscovery/storagediscoveryworkspaces","location":"francecentral","tags":{"team":"Discovery","environment":"test","purpose":"demo"},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-08-04T23:29:54.6494315Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-08-04T23:29:57.4392952Z"},"properties":{"sku":"Standard","workspaceRoots":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"],"description":null,"scopes":[{"displayName":"basic","resourceTypes":["Microsoft.Storage/storageAccounts"],"tagKeysOnly":null,"tags":null}],"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache @@ -200,13 +200,13 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 24 Jul 2025 22:37:40 GMT + - Mon, 04 Aug 2025 23:29:57 GMT etag: - - '"3300a377-0000-0e00-0000-6882b5b30000"' + - '"09006db8-0000-0e00-0000-689142750000"' expires: - '-1' mise-correlation-id: - - 3f2fc50c-ea5b-4dcc-88f3-78e24c83f1d6 + - af47ee19-128e-466d-91cd-f1465729fca4 pragma: - no-cache strict-transport-security: @@ -218,7 +218,7 @@ interactions: x-content-type-options: - nosniff x-ms-operation-identifier: - - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=2968a26f-a796-4124-8684-894f8a239db2/westus2/2727bb74-6876-40a9-b482-b2cfd6fd9d42 + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=2968a26f-a796-4124-8684-894f8a239db2/francecentral/75920b46-4ad2-4883-a5e6-a206214578e8 x-ms-providerhub-traffic: - 'True' x-ms-ratelimit-remaining-subscription-global-writes: @@ -226,7 +226,7 @@ interactions: x-ms-ratelimit-remaining-subscription-writes: - '799' x-msedge-ref: - - 'Ref A: B7D351BDA5664FB1B24FD94DE50C551A Ref B: CO6AA3150220021 Ref C: 2025-07-24T22:37:35Z' + - 'Ref A: 899958593F714EDFAF8564814EDECB2B Ref B: MWH011020806054 Ref C: 2025-08-04T23:29:57Z' x-powered-by: - ASP.NET status: @@ -260,11 +260,11 @@ interactions: content-length: - '0' date: - - Thu, 24 Jul 2025 22:37:42 GMT + - Mon, 04 Aug 2025 23:30:02 GMT expires: - '-1' mise-correlation-id: - - 238bbeaf-d12d-478c-86b7-6426a020a96d + - 8229b5f0-4a68-443b-9b51-ac0d57a03832 pragma: - no-cache strict-transport-security: @@ -274,7 +274,7 @@ interactions: x-content-type-options: - nosniff x-ms-operation-identifier: - - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=2968a26f-a796-4124-8684-894f8a239db2/francecentral/30d19d8d-65a0-485f-a795-467e7eba6540 + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=2968a26f-a796-4124-8684-894f8a239db2/westus2/fc97b20c-b512-4db5-9fc5-86f717bfa127 x-ms-providerhub-traffic: - 'True' x-ms-ratelimit-remaining-subscription-deletes: @@ -282,7 +282,7 @@ interactions: x-ms-ratelimit-remaining-subscription-global-deletes: - '11999' x-msedge-ref: - - 'Ref A: D2D62273ECC1444D94D853163ADE16F0 Ref B: CO6AA3150220045 Ref C: 2025-07-24T22:37:40Z' + - 'Ref A: 0A7DE7E6BC4F4DCAA2042FFCF198FFC7 Ref B: MWH011020808062 Ref C: 2025-08-04T23:29:58Z' x-powered-by: - ASP.NET status: diff --git a/src/storage-discovery/azext_storage_discovery/tests/latest/recordings/test_storage_discovery_workspace_show_list.yaml b/src/storage-discovery/azext_storage_discovery/tests/latest/recordings/test_storage_discovery_workspace_show_list.yaml deleted file mode 100644 index 1e06bb5e5c1..00000000000 --- a/src/storage-discovery/azext_storage_discovery/tests/latest/recordings/test_storage_discovery_workspace_show_list.yaml +++ /dev/null @@ -1,291 +0,0 @@ -interactions: -- request: - body: '{"location": "francecentral", "properties": {"scopes": [{"displayName": - "basic", "resourceTypes": ["Microsoft.Storage/storageAccounts"]}], "sku": "Standard", - "workspaceRoots": ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"]}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - storage-discovery workspace create - Connection: - - keep-alive - Content-Length: - - '265' - Content-Type: - - application/json - ParameterSetName: - - -g -n --location --workspace-roots --scopes - User-Agent: - - AZURECLI/2.75.0 azsdk-python-core/1.35.0 Python/3.12.11 (Linux-6.8.0-1030-azure-x86_64-with-glibc2.36) - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/sdworkspace000002?api-version=2025-06-01-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/sdworkspace000002","name":"sdworkspace000002","type":"microsoft.storagediscovery/storagediscoveryworkspaces","location":"francecentral","tags":{"team":"Discovery"},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-07-24T22:28:44.9931022Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-07-24T22:28:44.9931022Z"},"properties":{"sku":"Standard","workspaceRoots":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"],"description":null,"scopes":[{"displayName":"basic","resourceTypes":["Microsoft.Storage/storageAccounts"],"tagKeysOnly":null,"tags":null}],"provisioningState":"Succeeded"}}' - headers: - cache-control: - - no-cache - content-length: - - '851' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 24 Jul 2025 22:28:54 GMT - etag: - - '"3300616e-0000-0e00-0000-6882b3a60000"' - expires: - - '-1' - mise-correlation-id: - - 6b4f128e-5651-4c65-a74c-85330ee9fdf6 - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - vary: - - Accept-Encoding - x-cache: - - CONFIG_NOCACHE - x-content-type-options: - - nosniff - x-ms-operation-identifier: - - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=2968a26f-a796-4124-8684-894f8a239db2/westus2/6e818e41-f7f0-4208-ba9b-de525401c0d9 - x-ms-providerhub-traffic: - - 'True' - x-ms-ratelimit-remaining-subscription-global-writes: - - '12000' - x-ms-ratelimit-remaining-subscription-writes: - - '800' - x-msedge-ref: - - 'Ref A: 31CD780F907446C9B3E60B364869EE50 Ref B: CO6AA3150217017 Ref C: 2025-07-24T22:28:41Z' - x-powered-by: - - ASP.NET - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - storage-discovery workspace show - Connection: - - keep-alive - ParameterSetName: - - -g -n - User-Agent: - - AZURECLI/2.75.0 azsdk-python-core/1.35.0 Python/3.12.11 (Linux-6.8.0-1030-azure-x86_64-with-glibc2.36) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/sdworkspace000002?api-version=2025-06-01-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/sdworkspace000002","name":"sdworkspace000002","type":"microsoft.storagediscovery/storagediscoveryworkspaces","location":"francecentral","tags":{"team":"Discovery"},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-07-24T22:28:44.9931022Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-07-24T22:28:44.9931022Z"},"properties":{"sku":"Standard","workspaceRoots":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"],"description":null,"scopes":[{"displayName":"basic","resourceTypes":["Microsoft.Storage/storageAccounts"],"tagKeysOnly":null,"tags":null}],"provisioningState":"Succeeded"}}' - headers: - cache-control: - - no-cache - content-length: - - '851' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 24 Jul 2025 22:28:55 GMT - etag: - - '"3300616e-0000-0e00-0000-6882b3a60000"' - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - x-cache: - - CONFIG_NOCACHE - x-content-type-options: - - nosniff - x-ms-providerhub-traffic: - - 'True' - x-ms-ratelimit-remaining-subscription-global-reads: - - '16499' - x-msedge-ref: - - 'Ref A: 1756914FAD5F4482AAE093E658215237 Ref B: CO6AA3150217045 Ref C: 2025-07-24T22:28:55Z' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - storage-discovery workspace update - Connection: - - keep-alive - ParameterSetName: - - -g -n --tags - User-Agent: - - AZURECLI/2.75.0 azsdk-python-core/1.35.0 Python/3.12.11 (Linux-6.8.0-1030-azure-x86_64-with-glibc2.36) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/sdworkspace000002?api-version=2025-06-01-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/sdworkspace000002","name":"sdworkspace000002","type":"microsoft.storagediscovery/storagediscoveryworkspaces","location":"francecentral","tags":{"team":"Discovery"},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-07-24T22:28:44.9931022Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-07-24T22:28:44.9931022Z"},"properties":{"sku":"Standard","workspaceRoots":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"],"description":null,"scopes":[{"displayName":"basic","resourceTypes":["Microsoft.Storage/storageAccounts"],"tagKeysOnly":null,"tags":null}],"provisioningState":"Succeeded"}}' - headers: - cache-control: - - no-cache - content-length: - - '851' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 24 Jul 2025 22:28:55 GMT - etag: - - '"3300616e-0000-0e00-0000-6882b3a60000"' - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - x-cache: - - CONFIG_NOCACHE - x-content-type-options: - - nosniff - x-ms-providerhub-traffic: - - 'True' - x-ms-ratelimit-remaining-subscription-global-reads: - - '16499' - x-msedge-ref: - - 'Ref A: CFC0737525B343A0B5A2F5236311CF4F Ref B: CO6AA3150220029 Ref C: 2025-07-24T22:28:55Z' - status: - code: 200 - message: OK -- request: - body: '{"location": "francecentral", "properties": {"scopes": [{"displayName": - "basic", "resourceTypes": ["Microsoft.Storage/storageAccounts"]}], "sku": "Standard", - "workspaceRoots": ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"]}, - "tags": {"team": "Discovery", "environment": "test", "purpose": "demo"}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - storage-discovery workspace update - Connection: - - keep-alive - Content-Length: - - '338' - Content-Type: - - application/json - ParameterSetName: - - -g -n --tags - User-Agent: - - AZURECLI/2.75.0 azsdk-python-core/1.35.0 Python/3.12.11 (Linux-6.8.0-1030-azure-x86_64-with-glibc2.36) - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/sdworkspace000002?api-version=2025-06-01-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/sdworkspace000002","name":"sdworkspace000002","type":"microsoft.storagediscovery/storagediscoveryworkspaces","location":"francecentral","tags":{"team":"Discovery","environment":"test","purpose":"demo"},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-07-24T22:28:44.9931022Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-07-24T22:28:58.4103502Z"},"properties":{"sku":"Standard","workspaceRoots":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"],"description":null,"scopes":[{"displayName":"basic","resourceTypes":["Microsoft.Storage/storageAccounts"],"tagKeysOnly":null,"tags":null}],"provisioningState":"Succeeded"}}' - headers: - cache-control: - - no-cache - content-length: - - '889' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 24 Jul 2025 22:28:59 GMT - etag: - - '"3300706e-0000-0e00-0000-6882b3aa0000"' - expires: - - '-1' - mise-correlation-id: - - 6bbc7466-f956-407b-82d3-36220e976be0 - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - vary: - - Accept-Encoding - x-cache: - - CONFIG_NOCACHE - x-content-type-options: - - nosniff - x-ms-operation-identifier: - - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=2968a26f-a796-4124-8684-894f8a239db2/southcentralus/e8f00f56-ff7e-47f9-86f8-8abbff8e76e4 - x-ms-providerhub-traffic: - - 'True' - x-ms-ratelimit-remaining-subscription-global-writes: - - '11999' - x-ms-ratelimit-remaining-subscription-writes: - - '799' - x-msedge-ref: - - 'Ref A: 90448CF4E4EE48539366636F42076E76 Ref B: MWH011020809062 Ref C: 2025-07-24T22:28:56Z' - x-powered-by: - - ASP.NET - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - storage-discovery workspace delete - Connection: - - keep-alive - Content-Length: - - '0' - ParameterSetName: - - -g -n -y - User-Agent: - - AZURECLI/2.75.0 azsdk-python-core/1.35.0 Python/3.12.11 (Linux-6.8.0-1030-azure-x86_64-with-glibc2.36) - method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/sdworkspace000002?api-version=2025-06-01-preview - response: - body: - string: '' - headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Thu, 24 Jul 2025 22:29:04 GMT - expires: - - '-1' - mise-correlation-id: - - 4d0609ea-b016-4c80-b840-be859f1f50be - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - x-cache: - - CONFIG_NOCACHE - x-content-type-options: - - nosniff - x-ms-operation-identifier: - - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=2968a26f-a796-4124-8684-894f8a239db2/southcentralus/9f71dd64-7812-4251-9b89-6491b364b331 - x-ms-providerhub-traffic: - - 'True' - x-ms-ratelimit-remaining-subscription-deletes: - - '799' - x-ms-ratelimit-remaining-subscription-global-deletes: - - '11999' - x-msedge-ref: - - 'Ref A: F919272FDC3D4586B5AE45061D9537B2 Ref B: MWH011020808034 Ref C: 2025-07-24T22:29:00Z' - x-powered-by: - - ASP.NET - status: - code: 200 - message: OK -version: 1 diff --git a/src/storage-discovery/azext_storage_discovery/tests/latest/recordings/test_storage_discovery_workspace_update.yaml b/src/storage-discovery/azext_storage_discovery/tests/latest/recordings/test_storage_discovery_workspace_update.yaml index 3e71660c38f..0f6f9266030 100644 --- a/src/storage-discovery/azext_storage_discovery/tests/latest/recordings/test_storage_discovery_workspace_update.yaml +++ b/src/storage-discovery/azext_storage_discovery/tests/latest/recordings/test_storage_discovery_workspace_update.yaml @@ -24,7 +24,7 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/updatews000002?api-version=2025-06-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/updatews000002","name":"updatews000002","type":"microsoft.storagediscovery/storagediscoveryworkspaces","location":"eastus2","tags":{"team":"Discovery"},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-07-24T22:37:31.1956913Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-07-24T22:37:31.1956913Z"},"properties":{"sku":"Standard","workspaceRoots":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"],"description":"initial","scopes":[{"displayName":"test1","resourceTypes":["Microsoft.Storage/storageAccounts"],"tagKeysOnly":null,"tags":null}],"provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/updatews000002","name":"updatews000002","type":"microsoft.storagediscovery/storagediscoveryworkspaces","location":"eastus2","tags":{"team":"Discovery"},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-08-04T23:30:11.6266581Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-08-04T23:30:11.6266581Z"},"properties":{"sku":"Standard","workspaceRoots":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"],"description":"initial","scopes":[{"displayName":"test1","resourceTypes":["Microsoft.Storage/storageAccounts"],"tagKeysOnly":null,"tags":null}],"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache @@ -33,13 +33,13 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 24 Jul 2025 22:37:33 GMT + - Mon, 04 Aug 2025 23:30:12 GMT etag: - - '"7700d54a-0000-0200-0000-6882b5ad0000"' + - '"58009008-0000-0200-0000-689142840000"' expires: - '-1' mise-correlation-id: - - c1ae1ae7-2ade-45e4-a423-9d1e3601332f + - 92f4c0d4-cef9-4975-9d6e-c2372e903ba2 pragma: - no-cache strict-transport-security: @@ -51,7 +51,7 @@ interactions: x-content-type-options: - nosniff x-ms-operation-identifier: - - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=2968a26f-a796-4124-8684-894f8a239db2/westus2/fdfe1cf3-ceda-4419-959a-2c2170a6a847 + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=2968a26f-a796-4124-8684-894f8a239db2/francecentral/7aa65700-31aa-4efc-84fc-8008e43ad790 x-ms-providerhub-traffic: - 'True' x-ms-ratelimit-remaining-subscription-global-writes: @@ -59,7 +59,7 @@ interactions: x-ms-ratelimit-remaining-subscription-writes: - '799' x-msedge-ref: - - 'Ref A: 03E58D2EDB4544ABB678C7EAAFCD010C Ref B: CO6AA3150220023 Ref C: 2025-07-24T22:37:29Z' + - 'Ref A: 9089F56B6AC54BA5AAE602995780D0CE Ref B: MWH011020807023 Ref C: 2025-08-04T23:30:07Z' x-powered-by: - ASP.NET status: @@ -77,14 +77,14 @@ interactions: Connection: - keep-alive ParameterSetName: - - -g -n --description --sku --workspace-roots --scopes --tags + - -g -n --description --sku --scopes --tags User-Agent: - AZURECLI/2.75.0 azsdk-python-core/1.35.0 Python/3.12.11 (Linux-6.8.0-1030-azure-x86_64-with-glibc2.36) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/updatews000002?api-version=2025-06-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/updatews000002","name":"updatews000002","type":"microsoft.storagediscovery/storagediscoveryworkspaces","location":"eastus2","tags":{"team":"Discovery"},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-07-24T22:37:31.1956913Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-07-24T22:37:31.1956913Z"},"properties":{"sku":"Standard","workspaceRoots":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"],"description":"initial","scopes":[{"displayName":"test1","resourceTypes":["Microsoft.Storage/storageAccounts"],"tagKeysOnly":null,"tags":null}],"provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/updatews000002","name":"updatews000002","type":"microsoft.storagediscovery/storagediscoveryworkspaces","location":"eastus2","tags":{"team":"Discovery"},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-08-04T23:30:11.6266581Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-08-04T23:30:11.6266581Z"},"properties":{"sku":"Standard","workspaceRoots":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"],"description":"initial","scopes":[{"displayName":"test1","resourceTypes":["Microsoft.Storage/storageAccounts"],"tagKeysOnly":null,"tags":null}],"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache @@ -93,9 +93,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 24 Jul 2025 22:37:33 GMT + - Mon, 04 Aug 2025 23:30:12 GMT etag: - - '"7700d54a-0000-0200-0000-6882b5ad0000"' + - '"58009008-0000-0200-0000-689142840000"' expires: - '-1' pragma: @@ -111,7 +111,7 @@ interactions: x-ms-ratelimit-remaining-subscription-global-reads: - '16499' x-msedge-ref: - - 'Ref A: F1E5993E27414B6497B66F3396499E8D Ref B: CO6AA3150217045 Ref C: 2025-07-24T22:37:33Z' + - 'Ref A: 5E181EC47A6E4D8AB377299AAFD2EB97 Ref B: MWH011020808040 Ref C: 2025-08-04T23:30:13Z' status: code: 200 message: OK @@ -119,8 +119,8 @@ interactions: body: '{"location": "eastus2", "properties": {"description": "test2", "scopes": [{"displayName": "test2", "resourceTypes": ["Microsoft.Storage/storageAccounts"], "tagKeysOnly": ["e2etest2"], "tags": {"tag3": "value3"}}], "sku": "Free", "workspaceRoots": - ["/subscriptions/00000000-0000-0000-0000-000000000000"]}, "tags": {"team": "Discovery", - "tag4": "value4"}}' + ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"]}, + "tags": {"team": "Discovery", "tag4": "value4"}}' headers: Accept: - application/json @@ -131,33 +131,33 @@ interactions: Connection: - keep-alive Content-Length: - - '353' + - '385' Content-Type: - application/json ParameterSetName: - - -g -n --description --sku --workspace-roots --scopes --tags + - -g -n --description --sku --scopes --tags User-Agent: - AZURECLI/2.75.0 azsdk-python-core/1.35.0 Python/3.12.11 (Linux-6.8.0-1030-azure-x86_64-with-glibc2.36) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/updatews000002?api-version=2025-06-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/updatews000002","name":"updatews000002","type":"microsoft.storagediscovery/storagediscoveryworkspaces","location":"eastus2","tags":{"team":"Discovery","tag4":"value4"},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-07-24T22:37:31.1956913Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-07-24T22:37:35.2267057Z"},"properties":{"sku":"Free","workspaceRoots":["/subscriptions/00000000-0000-0000-0000-000000000000"],"description":"test2","scopes":[{"displayName":"test2","resourceTypes":["Microsoft.Storage/storageAccounts"],"tagKeysOnly":["e2etest2"],"tags":{"tag3":"value3"}}],"provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/updatews000002","name":"updatews000002","type":"microsoft.storagediscovery/storagediscoveryworkspaces","location":"eastus2","tags":{"team":"Discovery","tag4":"value4"},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-08-04T23:30:11.6266581Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-08-04T23:30:15.0798664Z"},"properties":{"sku":"Free","workspaceRoots":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"],"description":"test2","scopes":[{"displayName":"test2","resourceTypes":["Microsoft.Storage/storageAccounts"],"tagKeysOnly":["e2etest2"],"tags":{"tag3":"value3"}}],"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache content-length: - - '843' + - '875' content-type: - application/json; charset=utf-8 date: - - Thu, 24 Jul 2025 22:37:35 GMT + - Mon, 04 Aug 2025 23:30:16 GMT etag: - - '"7700e74a-0000-0200-0000-6882b5af0000"' + - '"5800da08-0000-0200-0000-689142880000"' expires: - '-1' mise-correlation-id: - - bd9b84ef-a7d1-4cce-803a-c6b4b203cbfc + - 6b808c42-905f-4413-be6c-5c1903655569 pragma: - no-cache strict-transport-security: @@ -169,7 +169,7 @@ interactions: x-content-type-options: - nosniff x-ms-operation-identifier: - - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=2968a26f-a796-4124-8684-894f8a239db2/eastus2/ae51415a-34e8-40a5-bcd1-6dc0e21add09 + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=2968a26f-a796-4124-8684-894f8a239db2/francecentral/8f2427a1-c296-4b84-85d2-fb9f2d2c4ba4 x-ms-providerhub-traffic: - 'True' x-ms-ratelimit-remaining-subscription-global-writes: @@ -177,7 +177,7 @@ interactions: x-ms-ratelimit-remaining-subscription-writes: - '799' x-msedge-ref: - - 'Ref A: 532B3E55D4984DE6A8898B453D3FC5BC Ref B: MWH011020806054 Ref C: 2025-07-24T22:37:34Z' + - 'Ref A: 5DD30D9CB71042BA82DA13177A014CAD Ref B: MWH011020806034 Ref C: 2025-08-04T23:30:13Z' x-powered-by: - ASP.NET status: @@ -211,11 +211,11 @@ interactions: content-length: - '0' date: - - Thu, 24 Jul 2025 22:37:37 GMT + - Mon, 04 Aug 2025 23:30:21 GMT expires: - '-1' mise-correlation-id: - - 2839fe3a-1b6a-4d8a-a420-4ee087cbc454 + - b7cc6ad7-94e4-4e51-a2b2-0175e3b61635 pragma: - no-cache strict-transport-security: @@ -225,7 +225,7 @@ interactions: x-content-type-options: - nosniff x-ms-operation-identifier: - - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=2968a26f-a796-4124-8684-894f8a239db2/eastus2/af06a9e1-d471-4d35-9a54-deab5ec2af9b + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=2968a26f-a796-4124-8684-894f8a239db2/francecentral/2d7e8b65-3881-43c9-9d81-ddff7091116c x-ms-providerhub-traffic: - 'True' x-ms-ratelimit-remaining-subscription-deletes: @@ -233,7 +233,7 @@ interactions: x-ms-ratelimit-remaining-subscription-global-deletes: - '11999' x-msedge-ref: - - 'Ref A: 616181CB0F654F5882DB2D812FB3EC4B Ref B: MWH011020806023 Ref C: 2025-07-24T22:37:35Z' + - 'Ref A: DC545F3002364484B83808C00634EFE5 Ref B: MWH011020806054 Ref C: 2025-08-04T23:30:17Z' x-powered-by: - ASP.NET status: diff --git a/src/storage-discovery/azext_storage_discovery/tests/latest/test_storage_discovery.py b/src/storage-discovery/azext_storage_discovery/tests/latest/test_storage_discovery.py index 8df91148088..522cc3aba66 100644 --- a/src/storage-discovery/azext_storage_discovery/tests/latest/test_storage_discovery.py +++ b/src/storage-discovery/azext_storage_discovery/tests/latest/test_storage_discovery.py @@ -47,8 +47,7 @@ def test_storage_discovery_workspace_create(self): def test_storage_discovery_workspace_update(self): self.kwargs.update({ "workspace_name": self.create_random_name('updatews', 18), - "discovery_scope_level1": f"/subscriptions/{self.get_subscription_id()}/resourceGroups/{self.kwargs['rg']}", - "discovery_scope_level2": f"/subscriptions/{self.get_subscription_id()}" + "discovery_scope_level1": f"/subscriptions/{self.get_subscription_id()}/resourceGroups/{self.kwargs['rg']}" }) # Create initial workspace @@ -70,13 +69,12 @@ def test_storage_discovery_workspace_update(self): self.cmd('az storage-discovery workspace update ' '-g {rg} -n {workspace_name} ' '--description "test2" --sku Free ' - '--workspace-roots "{discovery_scope_level2}" ' '--scopes "{scope2_json}" ' '--tags tag4=value4', checks=[ JMESPathCheck('properties.description', "test2"), JMESPathCheck('properties.sku', "Free"), - JMESPathCheck('properties.workspaceRoots[0]', self.kwargs.get('discovery_scope_level2', '')), + JMESPathCheck('properties.workspaceRoots[0]', self.kwargs.get('discovery_scope_level1', '')), JMESPathCheck('properties.scopes[0].displayName', "test2"), JMESPathCheck('properties.scopes[0].tagKeysOnly[0]', "e2etest2"), JMESPathCheck('properties.scopes[0].tags.tag3', "value3"), From 6602e104e908b0f47745dfb57e8b56f3490d842e Mon Sep 17 00:00:00 2001 From: zhiyihuang <17182306+calvinhzy@users.noreply.github.com> Date: Tue, 5 Aug 2025 09:46:40 +0800 Subject: [PATCH 09/10] add codeowner --- .github/CODEOWNERS | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 53bcda971dc..27522a9811a 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -333,3 +333,5 @@ /src/carbon/ @itiinani /src/amlfs/ @Aman-Jain-14 @amajai @mawhite @brpanask @tibanyas + +/src/storage-discovery/ @shanefujs From ffd3d5c3fed291f9e27cb456bf85e8ba2c7f9753 Mon Sep 17 00:00:00 2001 From: zhiyihuang <17182306+calvinhzy@users.noreply.github.com> Date: Tue, 5 Aug 2025 09:52:55 +0800 Subject: [PATCH 10/10] add codeowner --- .github/CODEOWNERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 27522a9811a..12960d41a55 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -334,4 +334,4 @@ /src/amlfs/ @Aman-Jain-14 @amajai @mawhite @brpanask @tibanyas -/src/storage-discovery/ @shanefujs +/src/storage-discovery/ @shanefujs @calvinhzy