Bug 2064575

Summary: RHST - getattachment command fails when trying to download multiple attachments
Product: Red Hat Enterprise Linux 8 Reporter: Pranita Ghole <pghole>
Component: redhat-support-toolAssignee: Pranita Ghole <pghole>
Status: MODIFIED --- QA Contact: Miroslav HradĂ­lek <mhradile>
Severity: unspecified Docs Contact: Jana Heves <jsvarova>
Priority: urgent    
Version: 8.6CC: bubrown, cww, jsvarova, mhradile, mkluson
Target Milestone: rcKeywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: redhat-support-tool-0.13.1-1.el8 Doc Type: Known Issue
Doc Text:
.The `getattachment` command fails to download multiple attachments at once The `redhat-support-tool` command offers the `getattachment` subcommand for downloading attachments. However, `getattachment` is currently only able to download a single attachment and fails to download multiple attachments. As a workaround, you can download multiple attachments one by one by passing the case number and UUID for each attachment in the `getattachment` subcommand.
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Pranita Ghole 2022-03-16 08:02:31 UTC
Description of problem:
The getattachment command successfully downloads single attachment but fails when tries to download multiple attachments.

Version-Release number of selected component (if applicable):
redhat-support-tool-0.13.0.el8

How reproducible:
Always

Steps to Reproduce:
1. Hit the getattachment command with "-a" option


Actual results:
Fails with following log

2022-02-16 08:04:30,340 - redhat_support_tool.helpers.launchhelper - ERROR - Failed to get the download link of the attachment
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/redhat_support_tool/helpers/launchhelper.py", line 106, in run
    return cls.non_interactive_action()
  File "/usr/lib/python3.6/site-packages/redhat_support_tool/plugins/get_attachment.py", line 249, in non_interactive_action
    self._downloadall()
  File "/usr/lib/python3.6/site-packages/redhat_support_tool/plugins/get_attachment.py", line 301, in _downloadall
    self.downloaduuid(attach.get_uuid(), fileName, attachmentLength)
  File "/usr/lib/python3.6/site-packages/redhat_support_tool/plugins/get_attachment.py", line 354, in downloaduuid
    link=link)
  File "/usr/lib/python3.6/site-packages/redhat_support_lib/infrastructure/brokers.py", line 594, in get
    raise Exception("Failed to get the download link of the attachment")
Exception: Failed to get the download link of the attachment


Expected results:
Multiple attachments should get downloaded.

Additional info: