Skip to content

Commit 10b914c

Browse files
mingweiheMingwei He
andauthored
add more e2e parameters test cases for aml workspace update operation (Azure#28540)
Co-authored-by: Mingwei He <mingweihe@microsoft.com>
1 parent 14b9536 commit 10b914c

6 files changed

+14275
-61
lines changed

sdk/ml/azure-ai-ml/azure/ai/ml/operations/_workspace_operations.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,8 @@ def begin_update(
250250
:rtype: ~azure.core.polling.LROPoller[~azure.ai.ml.entities.Workspace]
251251
"""
252252
identity = kwargs.get("identity", workspace.identity)
253-
existing_workspace = self.get(workspace.name, **kwargs)
253+
workspace_name = kwargs.get("workspace_name", workspace.name)
254+
existing_workspace = self.get(workspace_name, **kwargs)
254255
if identity:
255256
identity = identity._to_workspace_rest_object()
256257
rest_user_assigned_identities = identity.user_assigned_identities
@@ -306,7 +307,7 @@ def begin_update(
306307
)
307308

308309
update_param = WorkspaceUpdateParameters(
309-
tags=workspace.tags,
310+
tags=kwargs.get("tags", workspace.tags),
310311
description=kwargs.get("description", workspace.description),
311312
friendly_name=kwargs.get("display_name", workspace.display_name),
312313
public_network_access=kwargs.get("public_network_access", workspace.public_network_access),
@@ -335,7 +336,7 @@ def begin_update(
335336
def callback(_, deserialized, args):
336337
return Workspace._from_rest_object(deserialized)
337338

338-
poller = self._operation.begin_update(resource_group, workspace.name, update_param, polling=True, cls=callback)
339+
poller = self._operation.begin_update(resource_group, workspace_name, update_param, polling=True, cls=callback)
339340
return poller
340341

341342
# @monitor_with_activity(logger, "Workspace.BeginDelete", ActivityType.PUBLICAPI)

0 commit comments

Comments
 (0)