Red Hat Bugzilla – Bug 1153034
Hammer host creation - no way to set organization or location
Last modified: 2017-02-23 15:52:27 EST
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
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.
Connecting redmine issue http://projects.theforeman.org/issues/6236 from this bug
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
PS: I had to go to UI to check if the host was added to the specified organization and location.
This bug is slated to be released with Satellite 6.1.
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