Skip to content

Commit

Permalink
Merge pull request #360 from yjinjo/master
Browse files Browse the repository at this point in the history
Remove workspaces field of workspace_group_info
  • Loading branch information
yjinjo authored Sep 19, 2024
2 parents 30120c6 + 74a39e5 commit 34051ae
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions src/spaceone/identity/service/workspace_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,6 @@ def _delete_related_resources_in_workspace(workspace_vo: Workspace):
trusted_account_mgr = TrustedAccountManager()
service_account_mgr = ServiceAccountManager()
secret_mgr = SecretManager()
workspace_group_mgr = WorkspaceGroupManager()

project_group_vos = project_group_mgr.filter_project_groups(
domain_id=workspace_vo.domain_id, workspace_id=workspace_vo.workspace_id
Expand All @@ -363,10 +362,6 @@ def _delete_related_resources_in_workspace(workspace_vo: Workspace):
domain_id=workspace_vo.domain_id, workspace_id=workspace_vo.workspace_id
)

workspace_group_vos = workspace_group_mgr.filter_workspace_groups(
domain_id=workspace_vo.domain_id, workspaces=workspace_vo.workspace_id
)

_LOGGER.debug(
f"[_delete_related_resources_in_workspace] Start delete related resources in workspace: {workspace_vo.domain_id} {workspace_vo.name}( {workspace_vo.workspace_id} )"
)
Expand Down Expand Up @@ -399,18 +394,6 @@ def _delete_related_resources_in_workspace(workspace_vo: Workspace):
)
trusted_account_mgr.delete_trusted_account_by_vo(trusted_account_vo)

for workspace_group_vo in workspace_group_vos:
workspaces: list = workspace_group_vo.workspaces

workspaces.remove(workspace_vo.workspace_id)
workspace_group_mgr.update_workspace_group_by_vo(
params={"workspaces": workspaces},
workspace_group_vo=workspace_group_vo,
)
_LOGGER.debug(
f"[_delete_related_resources_in_workspace] Delete workspace group: {workspace_group_vo.name} ({workspace_group_vo.workspace_group_id})"
)

def _add_workspace_to_group(
self, workspace_id: str, workspace_group_id: str, domain_id: str
) -> bool:
Expand Down

0 comments on commit 34051ae

Please sign in to comment.