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 1194165 - No cli command to define discovery rules
Summary: No cli command to define discovery rules
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Hammer
Version: 6.1.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: Unspecified
Assignee: orabin
QA Contact: Tazim Kolhar
URL: http://projects.theforeman.org/issues...
Whiteboard:
Depends On:
Blocks: 1193977
TreeView+ depends on / blocked
 
Reported: 2015-02-19 09:05 UTC by Sachin Ghai
Modified: 2017-02-23 20:28 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-08-12 13:55:44 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 9572 0 None None None 2016-04-22 15:01:54 UTC

Description Sachin Ghai 2015-02-19 09:05:13 UTC
Description of problem:
Currently we don't have any subcommand under hammer cli discovery to create rules. This is available in UI.

Version-Release number of selected component (if applicable):
sat6.1 beta snap3
Satellite-6.1.0-RHEL-6-20150217.0

How reproducible:
always

Steps to Reproduce:
1. hammer discovery --help
2.
3.

Actual results:
no way create discovery rules from cli

Expected results:
we should have same mapping in cli too.

Additional info:
Usage:
    hammer discovery [OPTIONS] SUBCOMMAND [ARG] ...

Parameters:
 SUBCOMMAND                    subcommand
 [ARG] ...                     subcommand arguments

Subcommands:
 auto-provision                Auto provision a host
 delete                        Delete a discovered host
 facts                         Show a discovered host
 info                          Show a discovered host
 list                          List all discovered hosts
 provision                     Provision a discovered host
 reboot                        Reboot a host
 refresh-facts                 Refresh the facts of a host

Comment 2 Bryan Kearney 2015-03-19 10:04:59 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/9572 has been closed
-------------
Ori Rabin
Applied in changeset commit:hammer-discovery|1f99f38e79c95b469548f022f120fde5e5e16b95.

Comment 5 Tazim Kolhar 2015-04-24 08:02:15 UTC
VERIFIED :
# rpm -qa | grep foreman
foreman-libvirt-1.7.2.17-1.el6_6sat.noarch
ruby193-rubygem-foreman_bootdisk-4.0.2.10-1.el6_6sat.noarch
ruby193-rubygem-foreman_hooks-0.3.7-2.el6_6sat.noarch
rubygem-hammer_cli_foreman_tasks-0.0.3.3-1.el6_6sat.noarch
rubygem-hammer_cli_foreman_bootdisk-0.1.2.5-1.el6_6sat.noarch
foreman-postgresql-1.7.2.17-1.el6_6sat.noarch
foreman-debug-1.7.2.17-1.el6_6sat.noarch
foreman-1.7.2.17-1.el6_6sat.noarch
foreman-ovirt-1.7.2.17-1.el6_6sat.noarch
ruby193-rubygem-foreman-tasks-0.6.12.3-1.el6_6sat.noarch
foreman-proxy-1.7.2.4-1.el6_6sat.noarch
qe-sat6-rhel66.usersys.redhat.com-foreman-client-1.0-1.noarch
qe-sat6-rhel66.usersys.redhat.com-foreman-proxy-client-1.0-1.noarch
foreman-selinux-1.7.2.13-1.el6_6sat.noarch
rubygem-hammer_cli_foreman-0.1.4.9-1.el6_6sat.noarch
foreman-compute-1.7.2.17-1.el6_6sat.noarch
foreman-vmware-1.7.2.17-1.el6_6sat.noarch
ruby193-rubygem-foreman-redhat_access-0.1.0-1.el6_6sat.noarch
ruby193-rubygem-foreman_gutterball-0.0.1.9-1.el6_6sat.noarch
qe-sat6-rhel66.usersys.redhat.com-foreman-proxy-1.0-2.noarch
ruby193-rubygem-foreman_docker-1.2.0.9-1.el6_6sat.noarch
rubygem-hammer_cli_foreman_discovery-0.0.1.7-1.el6_6sat.noarch
foreman-gce-1.7.2.17-1.el6_6sat.noarch
ruby193-rubygem-foreman_discovery-2.0.0.9-1.el6_6sat.noarch


# hammer discovery --help
Usage:
    hammer discovery [OPTIONS] SUBCOMMAND [ARG] ...

Parameters:
 SUBCOMMAND                    subcommand
 [ARG] ...                     subcommand arguments

Subcommands:
 auto-provision                Auto provision a host
 delete                        Delete a discovered host
 facts                         Show a discovered host
 info                          Show a discovered host
 list                          List all discovered hosts
 provision                     Provision a discovered host
 reboot                        Reboot a host
 refresh-facts                 Refresh the facts of a host

Options:
 -h, --help                    print help

Comment 6 Og Maciel 2015-04-24 19:07:47 UTC
Ok, turns out that there's something fishy here. The issue is that we're missing a subcommand that allows the user to create discovery rules and I don't see that either in comment #5 or in a system itself. The pull request that should fix this (https://github.com/theforeman/hammer-cli-foreman-discovery/pull/12) would have added the "discovery_rule" command and I don't see it.

Comment 7 orabin 2015-04-24 20:44:50 UTC
It looks like the hammer_cli_foreman_discovery is version 0.0.1 with cherry-picks. The subcommand was added in the commit Og mentioned but it was merged into version 0.0.2.

Comment 9 Tazim Kolhar 2015-05-04 08:40:55 UTC
VERIFIED :

# rpm -qa | grep foreman
puppet-foreman_scap_client-0.3.3-8.el7sat.noarch
ruby193-rubygem-foreman_docker-1.2.0.10-1.el7sat.noarch
ruby193-rubygem-foreman-tasks-0.6.12.4-1.el7sat.noarch
rubygem-hammer_cli_foreman_discovery-0.0.1.8-1.el7sat.noarch
foreman-libvirt-1.7.2.18-1.el7sat.noarch
ruby193-rubygem-foreman_bootdisk-4.0.2.12-1.el7sat.noarch
foreman-compute-1.7.2.18-1.el7sat.noarch
foreman-ovirt-1.7.2.18-1.el7sat.noarch
ruby193-rubygem-foreman_discovery-2.0.0.12-1.el7sat.noarch
rubygem-hammer_cli_foreman_tasks-0.0.3.4-1.el7sat.noarch
foreman-debug-1.7.2.18-1.el7sat.noarch
foreman-postgresql-1.7.2.18-1.el7sat.noarch
qe-sat6-rhel71.usersys.redhat.com-foreman-client-1.0-1.noarch
qe-sat6-rhel71.usersys.redhat.com-foreman-proxy-1.0-1.noarch
ruby193-rubygem-foreman_gutterball-0.0.1.9-1.el7sat.noarch
foreman-1.7.2.18-1.el7sat.noarch
foreman-gce-1.7.2.18-1.el7sat.noarch
ruby193-rubygem-foreman_hooks-0.3.7-2.el7sat.noarch
rubygem-hammer_cli_foreman-0.1.4.10-1.el7sat.noarch
foreman-selinux-1.7.2.13-1.el7sat.noarch
foreman-vmware-1.7.2.18-1.el7sat.noarch
rubygem-hammer_cli_foreman_bootdisk-0.1.2.6-1.el7sat.noarch
foreman-proxy-1.7.2.4-1.el7sat.noarch
qe-sat6-rhel71.usersys.redhat.com-foreman-proxy-client-1.0-1.noarch
ruby193-rubygem-foreman-redhat_access-0.1.0-1.el7sat.noarch


steps:
# hammer discovery_rule --help
Usage:
    hammer discovery_rule [OPTIONS] SUBCOMMAND [ARG] ...

Parameters:
 SUBCOMMAND                    subcommand
 [ARG] ...                     subcommand arguments

Subcommands:
 create                        Create a discovery rule
 delete                        Delete a rule
 info                          Show a discovery rule
 list                          List all discovery rules
 update                        Update a rule

Options:
 -h, --help                    print help

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

Comment 11 Bryan Kearney 2015-08-12 13:55:44 UTC
This bug was fixed in version 6.1.1 of Satellite which was released on 12 August, 2015.


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