Skip to content

Commit

Permalink
fix: add missing parameter token
Browse files Browse the repository at this point in the history
  • Loading branch information
ImMin5 committed Dec 20, 2023
1 parent 31d0369 commit fcc513a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/spaceone/plugin/manager/repository_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand Down
6 changes: 3 additions & 3 deletions src/spaceone/plugin/service/plugin_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit fcc513a

Please sign in to comment.