Skip to content

Commit 5583de7

Browse files
committed
For review suggestions / feedback
If acceptable will fixup/squash so commit message and sign-off is proper. Signed-off-by: Trevor Benson <[email protected]>
1 parent c1fe344 commit 5583de7

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

sos/policies/distros/redhat.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -255,13 +255,9 @@ def get_upload_url(self):
255255
if self.commons['cmdlineopts'].upload_protocol == 'sftp':
256256
return RH_SFTP_HOST
257257
if self.commons['cmdlineopts'].upload_protocol == 's3':
258-
endpoint = self.get_upload_s3_endpoint()
259258
bucket = self.get_upload_s3_bucket()
260-
if self.commons['cmdlineopts'].case_id:
261-
rh_case_api = "/support/v1/cases/%s/attachments"
262-
return f"{endpoint}/{bucket}" + rh_case_api % self.case_id
263259
prefix = self.get_upload_s3_object_prefix()
264-
return f"{endpoint}/{bucket}/{prefix}"
260+
return f"s3://{bucket}/{prefix}"
265261
if not self.commons['cmdlineopts'].case_id:
266262
self.ui_log.info("No case id provided, uploading to SFTP")
267263
return RH_SFTP_HOST
@@ -307,6 +303,9 @@ def get_upload_url_string(self):
307303
return "Red Hat Customer Portal"
308304
if self.get_upload_url().startswith(RH_SFTP_HOST):
309305
return "Red Hat Secure FTP"
306+
if self.get_upload_url().startswith('s3://'):
307+
endpoint = self.get_upload_s3_endpoint()
308+
return f"{self.get_upload_url()} on endpoint {endpoint}"
310309
return self._get_obfuscated_upload_url(self.upload_url)
311310

312311
def _get_sftp_upload_name(self):

0 commit comments

Comments
 (0)