From b7793055fff725d35de38a934733f6b42b8e9d5e Mon Sep 17 00:00:00 2001 From: ImMin5 Date: Wed, 13 Mar 2024 20:57:19 +0900 Subject: [PATCH] feat: modify identity.ServiceAccount name format --- src/cloudforet/search/conf/search_conf.py | 4 ++-- src/cloudforet/search/service/resource.py | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/cloudforet/search/conf/search_conf.py b/src/cloudforet/search/conf/search_conf.py index edbd831..c7c8506 100644 --- a/src/cloudforet/search/conf/search_conf.py +++ b/src/cloudforet/search/conf/search_conf.py @@ -11,7 +11,7 @@ }, "response": { "resource_id": "service_account_id", - "name": "{account} ({name})", + "name": "{name} ({account})", "aliases": [ {"data.account_id": "account"}, {"data.subscription_id": "account"}, @@ -46,7 +46,7 @@ }, "inventory.CloudService": { "request": { - "search": ["name", "ip_addresses", "account", "instance_type"], + "search": ["name", "ip_addresses", "account"], "filter": [{"state": "ACTIVE"}], }, "response": { diff --git a/src/cloudforet/search/service/resource.py b/src/cloudforet/search/service/resource.py index 875184b..b131221 100644 --- a/src/cloudforet/search/service/resource.py +++ b/src/cloudforet/search/service/resource.py @@ -84,6 +84,8 @@ def search(self, params: ResourceSearchRequest) -> Union[ResourcesResponse, dict workspaces = self._get_accessible_workspaces( domain_id, role_type, workspaces, user_id ) + else: + params.workspace_id = None else: if all_workspaces or workspaces: workspaces = self._get_accessible_workspaces(