Skip to content

Commit

Permalink
Merge pull request #25 from jihyungSong/master
Browse files Browse the repository at this point in the history
fix: add option for init plugin
  • Loading branch information
jihyungSong authored Jun 13, 2023
2 parents e99d7e2 + 19b898e commit 6a2e5e6
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 6a2e5e6

Please sign in to comment.