Skip to content

Commit

Permalink
fix: add option for init plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
jiyungSong committed Jun 13, 2023
1 parent 896e069 commit 19b898e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/spaceone/plugin/service/plugin_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,15 @@ def get_plugin_metadata(self, params: dict):
"""
plugin_id = params['plugin_id']
domain_id = params['domain_id']
options = params.get('options', {})

if params.get('upgrade_mode') == 'MANUAL' and params.get('version') is None:
raise ERROR_REQUIRED_PARAMETER(key='version')

params.update({'version': self._get_plugin_version(params)})
plugin_endpoint_info = self._get_plugin_endpoint(params)
api_class = self._get_plugin_api_class(plugin_id, domain_id)
init_response = self.plugin_mgr.init_plugin(plugin_endpoint_info.get('endpoint'), api_class, {})
init_response = self.plugin_mgr.init_plugin(plugin_endpoint_info.get('endpoint'), api_class, options)
return init_response.get('metadata', {})

def _get_plugin_endpoint(self, params):
Expand Down

0 comments on commit 19b898e

Please sign in to comment.