From 4ee6f435429a538453821f169a135e8c8423cffc Mon Sep 17 00:00:00 2001 From: Pallab Pain Date: Thu, 1 Feb 2024 01:59:57 +0530 Subject: [PATCH] fix: updates default service urls in api calls (#262) Fixes the issue where the .apps.rapyuta.io routes were used as default in some API calls that started failing after migrating to AKS. This PR fixes the issue by updating the default routes. --- riocli/apply/resolver.py | 2 +- riocli/deployment/logs.py | 2 +- riocli/disk/util.py | 2 +- riocli/organization/utils.py | 2 +- riocli/parameter/utils.py | 2 +- riocli/utils/execute.py | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/riocli/apply/resolver.py b/riocli/apply/resolver.py index 817a7096..b8642f27 100644 --- a/riocli/apply/resolver.py +++ b/riocli/apply/resolver.py @@ -185,7 +185,7 @@ def _list_networks(self): def _list_disks(self): config = Configuration() catalog_host = config.data.get( - 'catalog_host', 'https://gacatalog.apps.rapyuta.io') + 'catalog_host', 'https://gacatalog.apps.okd4v2.prod.rapyuta.io') url = '{}/disk'.format(catalog_host) headers = config.get_auth_header() response = RestClient(url).method( diff --git a/riocli/deployment/logs.py b/riocli/deployment/logs.py index 46704122..83113bf6 100644 --- a/riocli/deployment/logs.py +++ b/riocli/deployment/logs.py @@ -67,5 +67,5 @@ def stream_deployment_logs(deployment_id, component_id, exec_id, pod_name=None): def get_log_stream_url(config, deployment_id, component_id, exec_id, pod_name=None, tail=50000): - catalog_host = config.data.get('catalog_host', 'https://gacatalog.apps.rapyuta.io') + catalog_host = config.data.get('catalog_host', 'https://gacatalog.apps.okd4v2.prod.rapyuta.io') return _LOG_URL_FORMAT.format(catalog_host, tail, deployment_id, component_id, exec_id, pod_name) diff --git a/riocli/disk/util.py b/riocli/disk/util.py index faca2e78..3da90161 100644 --- a/riocli/disk/util.py +++ b/riocli/disk/util.py @@ -38,7 +38,7 @@ def _api_call( ) -> typing.Any: config = Configuration() catalog_host = config.data.get( - 'catalog_host', 'https://gacatalog.apps.rapyuta.io') + 'catalog_host', 'https://gacatalog.apps.okd4v2.prod.rapyuta.io') url = '{}/disk'.format(catalog_host) if guid: diff --git a/riocli/organization/utils.py b/riocli/organization/utils.py index f787f8aa..83b81f62 100644 --- a/riocli/organization/utils.py +++ b/riocli/organization/utils.py @@ -28,7 +28,7 @@ def _api_call( config = Configuration() coreapi_host = config.data.get( 'core_api_host', - 'https://gaapiserver.apps.rapyuta.io' + 'https://gaapiserver.apps.okd4v2.prod.rapyuta.io' ) url = '{}/api/organization'.format(coreapi_host) diff --git a/riocli/parameter/utils.py b/riocli/parameter/utils.py index 462a833e..dca2a22a 100644 --- a/riocli/parameter/utils.py +++ b/riocli/parameter/utils.py @@ -68,7 +68,7 @@ def _api_call( ) -> typing.Any: config = Configuration() catalog_host = config.data.get( - 'core_api_host', 'https://gaapiserver.apps.rapyuta.io') + 'core_api_host', 'https://gaapiserver.apps.okd4v2.prod.rapyuta.io') url = '{}/api/paramserver/tree'.format(catalog_host) if name: url = '{}/{}'.format(url, name) diff --git a/riocli/utils/execute.py b/riocli/utils/execute.py index 55d5698e..28a95efe 100644 --- a/riocli/utils/execute.py +++ b/riocli/utils/execute.py @@ -52,7 +52,7 @@ def _run_cloud_data(comp_id: str, exec_id: str, pod_name: str, command: typing.L def _run_cloud_url(config: Configuration, deployment_guid: str) -> str: - host = config.data.get('catalog_host', 'https://gacatalog.apps.rapyuta.io') + host = config.data.get('catalog_host', 'https://gacatalog.apps.okd4v2.prod.rapyuta.io') return _CLOUD_RUN_REMOTE_COMMAND.format(host, deployment_guid)