From fcc513a525dba2066842276da223a9397841b1a1 Mon Sep 17 00:00:00 2001 From: ImMin5 Date: Wed, 20 Dec 2023 22:57:40 +0900 Subject: [PATCH] fix: add missing parameter token --- src/spaceone/plugin/manager/repository_manager.py | 2 +- src/spaceone/plugin/service/plugin_service.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/spaceone/plugin/manager/repository_manager.py b/src/spaceone/plugin/manager/repository_manager.py index 4e8801b..dcf5abe 100644 --- a/src/spaceone/plugin/manager/repository_manager.py +++ b/src/spaceone/plugin/manager/repository_manager.py @@ -16,7 +16,7 @@ def __init__(self, *args, **kwargs): SpaceConnector, service="repository" ) - def get_plugin(self, plugin_id: str, domain_id, token: str) -> dict: + def get_plugin(self, plugin_id: str, domain_id: str, token: str) -> dict: return self.repo_connector.dispatch( "Plugin.get", {"plugin_id": plugin_id}, token=token, x_domain_id=domain_id ) diff --git a/src/spaceone/plugin/service/plugin_service.py b/src/spaceone/plugin/service/plugin_service.py index f96e113..6879e30 100644 --- a/src/spaceone/plugin/service/plugin_service.py +++ b/src/spaceone/plugin/service/plugin_service.py @@ -107,7 +107,7 @@ def _get_plugin_endpoint(self, params: dict, token: str): # There is no installed plugin # Check plugin_id, version is valid or not - self._check_plugin(plugin_id, version, token) + self._check_plugin(plugin_id, domain_id, version, token) # Create or Fail matched_supervisors = self.supervisor_mgr.get_matched_supervisors( @@ -265,12 +265,12 @@ def _select_one(choice_list, algorithm="random"): return random.choice(choice_list) _LOGGER.error(f"[_select_one] unimplemented algorithm: {algorithm}") - def _check_plugin(self, plugin_id: str, version: str, token: str): + def _check_plugin(self, plugin_id: str, domain_id: str, version: str, token: str): """Check plugin_id:version exist or not""" repo_mgr = self.locator.get_manager("RepositoryManager") # Check plugin_id try: - repo_mgr.get_plugin(plugin_id, token) + repo_mgr.get_plugin(plugin_id, domain_id, token) except Exception as e: _LOGGER.error(f"[_check_plugin] {plugin_id} does not exist") raise ERROR_PLUGIN_NOT_FOUND(plugin_id=plugin_id)