Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1234287 - Cannot create location with media
Summary: Cannot create location with media
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: API
Version: 6.1.0
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: Unspecified
Assignee: Ondřej Pražák
QA Contact: Kavita
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-06-22 09:51 UTC by Oleksandr Shtaier
Modified: 2021-07-22 07:06 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-02-21 16:42:47 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
UI screenshot after creation oforganization with media using hammer command (96.50 KB, image/png)
2017-08-03 11:54 UTC, Kavita
no flags Details
UI screenshot after creation of location with media using hammer command (107.20 KB, image/png)
2017-08-03 11:57 UTC, Kavita
no flags Details
hammer output for location with media on sat 6.3 snap9 (11.89 KB, text/plain)
2017-08-03 12:00 UTC, Kavita
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 15703 0 None None None 2016-12-15 14:12:45 UTC

Description Oleksandr Shtaier 2015-06-22 09:51:59 UTC
Description of problem:
There are no way to create location with media assigned to it. Moreover, most documentation entries are wrong and irrelevant.
[Documentation]
>hammer location create --help
...
 --media MEDIUM_NAMES                        Comma separated list of values.
 --media-ids MEDIA_IDS                       Media IDs
                                             Comma separated list of values.
 --medium-ids MEDIUM_IDS                     Comma separated list of values.
...
1)
hammer -u admin -p changeme location create --name 'TestMedia01' --media 'CentOS mirror'
Could not create the location:
  unknown attribute: media_ids

2)
hammer -u admin -p changeme location create --name 'TestMedia01' --media-ids 5
Could not create the location:
  unknown attribute: media_ids
3)
hammer -u admin -p changeme location create --name 'TestMedia01' --medium-ids 5
Location created
hammer -u admin -p changeme location info --name 'TestMedia01'
---------------------------------------------------------------------
Id:                 22
Name:               TestMedia01
Users:              

Smart proxies:      

Subnets:            

Compute resources:  

Installation media: 

Templates:          
    Boot disk iPXE - generic host (Bootdisk)
    Boot disk iPXE - host (Bootdisk)
    idm_register ()
    Kickstart default iPXE (iPXE)
    Kickstart default PXELinux (PXELinux)
    kickstart_networking_setup ()
    puppet.conf ()
    PXELinux default local boot (PXELinux)
    PXELinux global default (PXELinux)
    Satellite Kickstart Default (provision)
    Satellite Kickstart Default Finish (finish)
    Satellite Kickstart Default User Data (user_data)
    subscription_manager_registration ()
Domains:            

Environments:       

Hostgroups:         

Parameters:         

Created at:         2015/06/22 08:15:15
Updated at:         2015/06/22 08:15:15
------------------------------------------------------------
4)
hammer -u admin -p changeme location create --name 'TestMedia02' --installation-media-ids 5
Could not create the location:
  Error: Unrecognised option '--installation-media-ids'
  
  See: 'hammer location create --help'

Version-Release number of selected component (if applicable):
snap8

How reproducible:
Always

Steps to Reproduce:
1.

Actual results:
Cannot create location with media assigned to it

Expected results:
Location created successfully and necessary media assigned to it

Additional info:

Comment 1 RHEL Program Management 2015-06-22 09:52:37 UTC
Since this issue was entered in Red Hat Bugzilla, the release flag has been
set to ? to ensure that it is properly evaluated for this release.

Comment 6 Ondřej Pražák 2016-12-15 14:12:42 UTC
Connecting redmine issue http://projects.theforeman.org/issues/15703 from this bug

Comment 7 Ondřej Pražák 2016-12-15 14:17:44 UTC
If this is going to get into 6.2.z, we may consider cherry-picking 

https://github.com/Katello/katello/pull/6335

as well since organizations suffer from the same problem.

Comment 8 Bryan Kearney 2016-12-15 15:01:42 UTC
Upstream bug component is API

Comment 9 Bryan Kearney 2016-12-15 15:01:45 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/15703 has been resolved.

Comment 11 Kavita 2017-08-03 11:54:39 UTC
Created attachment 1308701 [details]
UI screenshot after creation oforganization with media using hammer command

Comment 12 Kavita 2017-08-03 11:57:05 UTC
Created attachment 1308702 [details]
UI screenshot after creation of location with media using hammer command

Comment 13 Kavita 2017-08-03 12:00:56 UTC
Created attachment 1308703 [details]
hammer output for location with media on sat 6.3 snap9

Comment 14 Kavita 2017-08-03 12:24:21 UTC
Previously, media-ids option was shown in hammer command. Singularize media in api doc is fixed.

--media, --medium-ids options are available to attach media with taxonomy


Verified.
Version Tested: Satellite-6.3 Snap 9.
web-ui screen-shots and hammer output attached.

Comment 15 Kavita 2017-08-03 12:52:58 UTC
RPM package versions:

satellite-6.3.0-16.0.beta.el7sat.noarch
foreman-1.15.2-1.el7sat.noarch
tfm-rubygem-hammer_cli-0.10.2-1.el7sat.noarch
tfm-rubygem-hammer_cli_foreman-0.10.2-1.el7sat.noarch

Comment 16 Bryan Kearney 2018-02-21 16:40:26 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, 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-2018:0336

Comment 17 Bryan Kearney 2018-02-21 16:42:47 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, 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-2018:0336

Comment 18 Satellite Program 2018-02-21 16:49:54 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, 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-2018:0336


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