From cd6842a3bf0d5c71f09928bdf169534eafe1732a Mon Sep 17 00:00:00 2001 From: Jongmin Kim Date: Wed, 8 Jan 2025 23:01:15 +0900 Subject: [PATCH] chore: add logs --- src/spaceone/plugin/service/plugin_service.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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