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 1328322

Summary: Provide hammer option to add/update "discovery proxy" into the subnet.
Product: Red Hat Satellite Reporter: Ranjan Kumar <rankumar>
Component: Discovery PluginAssignee: orabin
Status: CLOSED ERRATA QA Contact: Katello QA List <katello-qa-list>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.1.8CC: baptiste.agasse, bkearney, dlobatog, jcallaha, jkrocil, lzap, nshaik, orabin, tstrachota
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-02-21 16:49:54 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:
Attachments:
Description Flags
subnets_controller.rb.patch
none
main.json.rabl.patch
none
models-subnet.rb.patch
none
hammer-cli-foreman-subnet.rb.patch none

Description Ranjan Kumar 2016-04-19 05:46:16 UTC
Description of problem: Currently there is no option to add/update subnet "discover proxy" using hammer command.


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


How reproducible:
As per below help command there is not option to set "discover proxy" into subnet

hammer subnet update --help
Usage:
    hammer subnet update [OPTIONS]

Options:
 --boot-mode BOOT_MODE               Default boot mode for interfaces assigned to this subnet, valid values are
                                     "Static", "DHCP"
 --dhcp-id DHCP_ID                   DHCP Proxy to use within this subnet
 --dns-id DNS_ID                     DNS Proxy to use within this subnet
 --dns-primary DNS_PRIMARY           Primary DNS for this subnet
 --dns-secondary DNS_SECONDARY       Secondary DNS for this subnet
 --domain-ids DOMAIN_IDS             Numerical ID or domain name
                                     Comma separated list of values.
 --domains DOMAIN_NAMES              Comma separated list of values.
 --from FROM                         Starting IP Address for IP auto suggestion
 --gateway GATEWAY                   Primary DNS for this subnet
 --id ID                             Subnet numeric identifier
 --ipam IPAM                         IP Address auto suggestion mode for this subnet, valid values are "DHCP",
                                     "Internal DB", "None"
 --location-ids LOCATION_IDS         Comma separated list of values.
 --locations LOCATION_NAMES          Comma separated list of values.
 --mask MASK                         Netmask for this subnet
 --name NAME                         Subnet name
 --network NETWORK                   Subnet network
 --new-name NEW_NAME                 Subnet name
 --organization-ids ORGANIZATION_IDS organization ID
                                     Comma separated list of values.
 --organizations ORGANIZATION_NAMES  Comma separated list of values.
 --tftp-id TFTP_ID                   TFTP Proxy to use within this subnet
 --to TO                             Ending IP Address for IP auto suggestion
 --vlanid VLANID                     VLAN ID for this subnet
 -h, --help                          print help


Actual results:
There must be a option to add discover proxy into subnet.

Comment 1 Bryan Kearney 2016-07-26 18:59:09 UTC
Moving 6.2 bugs out to sat-backlog.

Comment 2 Jan Krocil 2016-08-15 12:32:25 UTC
Just hit this issue when setting up a Satellite 6 instance so issue is still present in v6.1.9, just fyi.

[root@cfmeqe-satellite-6 ~]# rpm -qa | grep katello
ruby193-rubygem-katello-2.2.0.92-1.el7sat.noarch
katello-certs-tools-2.2.1-1.el7sat.noarch
katello-server-ca-1.0-1.noarch
katello-service-2.2.0.19-1.el7sat.noarch
katello-2.2.0.19-1.el7sat.noarch
rubygem-hammer_cli_katello-0.0.7.21-1.el7sat.noarch
pulp-katello-0.5-1.el7sat.noarch
katello-common-2.2.0.19-1.el7sat.noarch
katello-installer-2.3.25-1.el7sat.noarch
katello-debug-2.2.0.19-1.el7sat.noarch
katello-installer-base-2.3.25-1.el7sat.noarch
katello-default-ca-1.0-1.noarch

Comment 3 Peter Ondrejka 2017-03-28 09:13:14 UTC
A possibility to add a remote execution proxy to a subnet via hammer would be also nice.

Comment 5 Satellite Program 2017-06-07 10:05:03 UTC
Upstream bug assigned to orabin

Comment 8 Nagoor Shaik 2017-06-16 02:05:58 UTC
Created attachment 1288225 [details]
subnets_controller.rb.patch

Comment 9 Nagoor Shaik 2017-06-16 02:06:31 UTC
Created attachment 1288226 [details]
main.json.rabl.patch

Comment 10 Nagoor Shaik 2017-06-16 02:07:15 UTC
Created attachment 1288227 [details]
models-subnet.rb.patch

Comment 11 Nagoor Shaik 2017-06-16 02:07:46 UTC
Created attachment 1288228 [details]
hammer-cli-foreman-subnet.rb.patch

Comment 18 Satellite Program 2017-06-19 14:05:55 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/19948 has been resolved.

Comment 23 Daniel Lobato Garcia 2017-08-09 10:14:14 UTC
Verified.

Version tested:


tfm-rubygem-hammer_cli_foreman_discovery 1.0.0-1.el7sat
tfm-rubygem-hammer_cli 0.10.2-1.el7sat

[root@hp-ml370g6-01 ~]# hammer subnet update --help                                                                                                                                                                                                                             
Usage:                                                                                                                                                                                                                                                                          
    hammer subnet update [OPTIONS]                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                                                                
Options:                                                                                                                                                                                                                                                                        
 --boot-mode BOOT_MODE                                       Default boot mode for interfaces assigned to this subnet, valid values are                                                                                                                                         
                                                             “Static”, “DHCP”                                                                                                                                                                                                   
 --dhcp-id DHCP_ID                                           DHCP Capsule ID to use within this subnet                                                                                                                                                                          
 --discovery-id DISCOVERY_ID                                 ID of Discovery Capsule to use within this subnet for managing connection                                                                                                                                          
                                                             to discovered hosts                                                                                                                                                                                                
 --dns-id DNS_ID                                             DNS Capsule ID to use within this subnet                                                                                                                                                                           
 --dns-primary DNS_PRIMARY                                   Primary DNS for this subnet                                                                                                                                                                                        
 --dns-secondary DNS_SECONDARY                               Secondary DNS for this subnet                                                                                                                                                                                      
 --domain-ids DOMAIN_IDS                                     Domains in which this subnet is part                                                                                                                                                                               
                                                             Comma separated list of values. Values containing comma should be double quoted                                                                                                                                    
 --domains DOMAIN_NAMES                                      Comma separated list of values. Values containing comma should be double quoted                                                                                                                                    
 --from FROM                                                 Starting IP Address for IP auto suggestion                                                                                                                                                                         
 --gateway GATEWAY                                           Primary DNS for this subnet                                                                                                                                                                                        
 --id ID                                                     Subnet numeric identifier                                                                                                                                                                                          
 --ipam IPAM                                                 IP Address auto suggestion mode for this subnet, valid values are “DHCP”,                                                                                                                                          
                                                             “Internal DB”, “None”                                                                                                                                                                                              
 --location-ids LOCATION_IDS                                 REPLACE locations with given ids                                                                                                                                                                                   
                                                             Comma separated list of values. Values containing comma should be double quoted                                                                                                                                    
 --locations LOCATION_NAMES                                  Comma separated list of values. Values containing comma should be double quoted                                                                                                                                    
 --mask MASK                                                 Netmask for this subnet                                                                                                                                                                                            
 --name NAME                                                 Subnet name                                                                                                                                                                                                        
 --network NETWORK                                           Subnet network                                                                                                                                                                                                     
 --network-type NETWORK_TYPE                                 Type or protocol, IPv4 or IPv6, defaults to IPv4                                                                                                                                                                   
                                                             Possible value(s): 'IPv4', 'IPv6'                                                                                                                                                                                  
 --new-name NEW_NAME                                         Subnet name                                                                                                                                                                                                        
 --organization-ids ORGANIZATION_IDS                         REPLACE organizations with given ids.                                                                                                                                                                              
                                                             Comma separated list of values. Values containing comma should be double quoted                                                                                                                                    
 --organizations ORGANIZATION_NAMES                          Comma separated list of values. Values containing comma should be double quoted                                                                                                                                    
 --subnet-parameters-attributes SUBNET_PARAMETERS_ATTRIBUTES Array of parameters (name, value)                                                                                                                                                                                  
                                                             Comma separated list of values. Values containing comma should be double quoted                                                                                                                                    
 --tftp-id TFTP_ID                                           TFTP Capsule ID to use within this subnet                                                                                                                                                                          
 --to TO                                                     Ending IP Address for IP auto suggestion                                                                                                                                                                           
 --vlanid VLANID                                             VLAN ID for this subnet                                                                                                                                                                                            
 -h, --help                                                  print help                                                                                                                                                                                                         
[root@hp-ml370g6-01 ~]#

Comment 24 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