Bug 1905041 - Missing hammer command "hammer scap-content bulk-upload". [NEEDINFO]
Summary: Missing hammer command "hammer scap-content bulk-upload".
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: SCAP Plugin
Version: 6.9.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium vote
Target Milestone: 6.9.0
Assignee: Ondřej Pražák
QA Contact: Jameer Pathan
URL:
Whiteboard:
Depends On: 1905567
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-12-07 11:59 UTC by Jameer Pathan
Modified: 2021-07-29 06:31 UTC (History)
4 users (show)

Fixed In Version: rubygem-hammer_cli_foreman_openscap-0.1.12,tfm-rubygem-hammer_cli_foreman_openscap-0.1.12-1
Doc Type: Known Issue
Doc Text:
The `hammer scap-content bulk-upload` command to upload default SCAP content on Satellite does not work as expected; it produces the following error: “Error: No such sub-command 'bulk-upload'.”
Clone Of:
Environment:
Last Closed: 2021-04-21 13:24:23 UTC
Target Upstream Version:
jpathan: needinfo? (ssainkar)


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 25387 0 Normal Closed Move scap content upload from rake task 2021-02-15 03:15:52 UTC
Red Hat Product Errata RHSA-2021:1313 0 None None None 2021-04-21 13:24:48 UTC

Description Jameer Pathan 2020-12-07 11:59:51 UTC
Description of problem:
Missing hammer command "hammer scap-content bulk-upload".

Version-Release number of selected component (if applicable):
-Satellite 6.9.0 snap 4

How reproducible:
-Always

Steps to Reproduce:
1. "hammer scap-content bulk-upload"


Actual results:
Error: No such sub-command 'bulk-upload'.

Expected results:
- Default scap content uploaded on satellite

Additional info:
- Upstream issue https://projects.theforeman.org/issues/25387 is already fixed.

Comment 1 Bryan Kearney 2020-12-07 12:01:28 UTC
Upstream bug assigned to oprazak

Comment 2 Bryan Kearney 2020-12-07 12:01:31 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/25387 has been resolved.

Comment 5 Jameer Pathan 2021-01-12 12:37:24 UTC
Verified 

Verified with:
- Satellite 6.9.0 snap 8
- tfm-rubygem-hammer_cli_foreman_openscap-0.1.12-1.el7sat.noarch

Test steps:
hammer> scap-content bulk-upload --type directory --directory /tmp
Errors:                 
  
Uploaded Scap Contents: 
 1) Id:                31
    Title:             rhel6 content
    Original Filename: ssg-rhel6-ds.xml
 2) Id:                32
    Title:             rhel7 content
    Original Filename: ssg-rhel7-ds.xml
 3) Id:                33
    Title:             rhel8 content
    Original Filename: ssg-rhel8-ds.xml

hammer> scap-content bulk-upload --type files --files '/tmp/ssg-rhel6-ds.xml,/tmp/ssg-rhel8-ds.xml'
Errors:                 
  
Uploaded Scap Contents: 
 1) Id:                34
    Title:             rhel6 content
    Original Filename: ssg-rhel6-ds.xml
 2) Id:                35
    Title:             rhel8 content
    Original Filename: ssg-rhel8-ds.xml

Scap Contents uploaded.
hammer> scap-content bulk-upload --type default
Errors:                 
  
Uploaded Scap Contents: 
 1) Id:                36
    Title:             Red Hat firefox default content
    Original Filename: ssg-firefox-ds.xml
 2) Id:                37
    Title:             Red Hat jre default content
    Original Filename: ssg-jre-ds.xml
 3) Id:                38
    Title:             Red Hat rhel6 default content
    Original Filename: ssg-rhel6-ds.xml
 4) Id:                39
    Title:             Red Hat rhel7 default content
    Original Filename: ssg-rhel7-ds.xml
 5) Id:                40
    Title:             Red Hat rhel8 default content
    Original Filename: ssg-rhel8-ds.xml

Scap Contents uploaded.

hammer> scap-content bulk-upload --help
Usage:
    scap-content [OPTIONS]

Options:
 --directory DIRECTORY             Directory to upload when using “directory” upload type
 --files FILES                     File paths to upload when using “files” upload type
                                   Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                                   JSON is acceptable and preferred way for complex parameters
 --location[-id]                   Set the current location context for the request. Name/Id can be used
 --organization[-id]               Set the current organization context for the request. Name/Id can be used
 --type TYPE                       Type of the upload
                                   Possible value(s): 'files', 'directory', 'default'
 -h, --help                        Print help

Observations:
- “hammer scap-content bulk-upload” command uploads scap contents to satellite 
either by providing directory path or comma separated files path to scap contents.
- It also uploads default scap contents to satellite.

Comment 9 errata-xmlrpc 2021-04-21 13:24:23 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: Satellite 6.9 Release), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2021:1313


Note You need to log in before you can comment on or make changes to this bug.