diff --git a/insights/client/client.py b/insights/client/client.py index 4c7a102e2c..5254c8147b 100644 --- a/insights/client/client.py +++ b/insights/client/client.py @@ -405,7 +405,7 @@ def upload(config, pconn, tar_file, content_type, collection_duration=None): logger.info("Successfully uploaded report for %s.", msg_name) if config.register: # direct to console after register + upload - logger.info('View the Red Hat Insights console at https://console.redhat.com/insights/') + display_console_url(config) return elif upload.status_code in (413, 415): pconn.handle_fail_rcs(upload) @@ -428,3 +428,10 @@ def display_upload_error_and_retry(config, tries, error_message): logger.error("All attempts to upload have failed!") print("Please see %s for additional information" % config.logging_file) raise RuntimeError('Upload failed.') + + +def display_console_url(config): + console_url = "https://console.redhat.com/insights/" + if "stage" in config.base_url: + console_url = "https://console.stage.redhat.com/insights/" + logger.info("View the Red Hat Insights console at %s" % console_url)