diff --git a/src/spaceone/plugin/service/plugin_service.py b/src/spaceone/plugin/service/plugin_service.py index f0d192c..cab1d1b 100644 --- a/src/spaceone/plugin/service/plugin_service.py +++ b/src/spaceone/plugin/service/plugin_service.py @@ -250,7 +250,6 @@ def _select_endpoint(self, plugin_ref, updated_version=None): endpoint = installed_plugin.endpoint endpoints = installed_plugin.endpoints if endpoints: - _LOGGER.debug(f"[_select_endpoint] {endpoints}") # endpoint = self._select_one(endpoints) installed_plugin = installed_plugin.increment("current_index") @@ -258,6 +257,11 @@ def _select_endpoint(self, plugin_ref, updated_version=None): if installed_plugin.current_index >= len(endpoints): installed_plugin = installed_plugin.update({"current_index": 0}) + current_index = installed_plugin.current_index + _LOGGER.debug( + f"[_select_endpoint] select endpoint. (index = {current_index}, endpoints = {endpoints})" + ) + endpoint = endpoints[installed_plugin.current_index] endpoint_info = {"endpoint": endpoint} @@ -265,6 +269,8 @@ def _select_endpoint(self, plugin_ref, updated_version=None): if updated_version: endpoint_info["updated_version"] = updated_version + _LOGGER.debug(f"[_select_endpoint] endpoint info: {endpoint_info}") + return endpoint_info @staticmethod