Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1153034

Summary: Hammer host creation - no way to set organization or location
Product: Red Hat Satellite Reporter: Ade Bradshaw <abradshaw>
Component: HammerAssignee: jmagen <jmagen>
Status: CLOSED ERRATA QA Contact: Elyézer Rezende <erezende>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.0.4CC: chrobert, cwelton, dcleal, erezende
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: All   
OS: Linux   
URL: http://projects.theforeman.org/issues/6236
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-08-12 05:18:06 UTC 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 Ade Bradshaw 2014-10-15 13:02:18 UTC
Description of problem:
when creating a host with "hammer host create" there is no way to set either org or location at creation time or afterwards 

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


How reproducible:
100%

Steps to Reproduce:
1. hammer host create --hostgroup "foo"  --name "bar" --mac "aa:bb:cc:dd:ee:ff"  --domain "example.com"


Actual results:
it was created in Default Org/Default location and there is no way to move it

Expected results:
you could either specify at creation time or afterwards via "hammer host update"

Additional info:
Might be a dupe of 1103862

Comment 1 RHEL Program Management 2014-10-15 13:03:02 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 3 Dominic Cleal 2014-10-16 13:29:19 UTC
Connecting redmine issue http://projects.theforeman.org/issues/6236 from this bug

Comment 6 Elyézer Rezende 2015-03-09 17:41:42 UTC
Verified on: Satellite-6.1.0-RHEL-7-20150303.0

Steps to verify:

[root@sat6 ~]# hammer host create --help | grep -E "(org|loc)"
 --location LOCATION_NAME                  Location name
 --location-id LOCATION_ID
 --organization ORGANIZATION_NAME          Organization name
 --organization-id ORGANIZATION_ID         organization ID
[root@sat6 ~]# hammer host update --help | grep -E "(org|loc)"
 --location LOCATION_NAME                  Location name
 --location-id LOCATION_ID
 --organization ORGANIZATION_NAME          Organization name
 --organization-id ORGANIZATION_ID         organization ID

[root@sat6 ~]# hammer -u admin -p password host create --name "bar" --mac "aa:bb:cc:dd:ee:ff"  --domain-id 1 --location-id 1 --organization-id 1 --environment-id 1 --architecture-id 1 --operatingsystem-id 1 --medium-id 8 --partition-table-id 7 --root-password "password" --puppet-proxy-id 1
Host created

Comment 7 Elyézer Rezende 2015-03-09 17:45:43 UTC
PS: I had to go to UI to check if the host was added to the specified organization and location.

Comment 8 Bryan Kearney 2015-08-11 13:32:13 UTC
This bug is slated to be released with Satellite 6.1.

Comment 9 errata-xmlrpc 2015-08-12 05:18:06 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-2015:1592