Bug 1254903 - Is there any CLI can subscribe/unsubscribe/unregister a host on Satellite like the headpin?
Is there any CLI can subscribe/unsubscribe/unregister a host on Satellite lik...
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Hammer (Show other bugs)
x86_64 Linux
medium Severity medium (vote)
: Unspecified
: --
Assigned To: Katello Bug Bin
Katello QA List
Depends On:
  Show dependency treegraph
Reported: 2015-08-19 04:38 EDT by Eko
Modified: 2015-12-03 10:46 EST (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2015-08-24 23:09:52 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Eko 2015-08-19 04:38:34 EDT
On SAM server, we can run following CLI for host subscribe/unsubscribe/unregister:
 headpin -u admin -p admin system [subscribe / unsubscribe / unregister] --name=host_uuid --org=ACME_Corporation

But on satellite server, how to do this? 
we try to use hammer, but no available options for subscribe/unsubscribe/unregister, thus, we can't write some auto scripts for virt-who esx/hyperv/rhevm testing.

Is there anybody have solution or workaround for this issue?

Thanks a lot.
Comment 1 Tom McKay 2015-08-19 09:06:56 EDT
There is work to extend hammer to attach/unattach subscriptions to content hosts[1]. There is currently 'hammer content-host create' and delete for creating the systems.

In the short term the best solution would be to hit the API directly. You may wish to collaborate with Satellite-6 QE and their robotello[2] project.

[1] https://github.com/Katello/katello/pull/5323
[2] https://github.com/SatelliteQE/robottelo
Comment 2 Eko 2015-08-24 23:09:52 EDT
Hi Tom, thanks for your comment, we solved this problems by satellite API.

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