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 1426612

Summary: hammer subnet create/update shouldn't contain option --subnet-parameters-attributes
Product: Red Hat Satellite Reporter: Tomas Strachota <tstrachota>
Component: NetworkingAssignee: Dominik Hlavac Duran <dhlavacd>
Status: CLOSED ERRATA QA Contact: Nikhil Kathole <nkathole>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.3.0CC: bbuckingham, bkearney, ehelms, jcallaha, jyejare, mhulan, nkathole, swadeley
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: hammer-cli-foreman-0.11.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-02-21 16:33:01 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:
Bug Depends On:    
Bug Blocks: 1493107    

Description Tomas Strachota 2017-02-24 12:58:45 UTC
Description of problem:

Commands hammer subnet create/update contain option --subnet-parameters-attributes that is generated automatically from apidoc. The option should be removed and replaced with set-parameter and delete-parameter commands as how it's done for other resources that have parameters (eg. domains).

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

Steps to Reproduce:
1. run: hammer subnet create -h
2. run: hammer subnet update -h

Actual results:
Help output for the both commands contain option --subnet-parameters-attributes

Expected results:
The option should be removed and there should be two new commands:
hammer subnet set-parameter
hammer subnet delete-parameter

Comment 1 Tomas Strachota 2017-02-24 13:01:24 UTC
Created redmine issue http://projects.theforeman.org/issues/18663 from this bug

Comment 3 Satellite Program 2017-03-10 15:12:04 UTC
Upstream bug assigned to dhlavacd

Comment 4 Satellite Program 2017-03-10 15:12:07 UTC
Upstream bug assigned to dhlavacd

Comment 5 Satellite Program 2017-04-06 16:12:32 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/18663 has been resolved.

Comment 6 Marek Hulan 2017-07-11 08:00:56 UTC
*** Bug 1469091 has been marked as a duplicate of this bug. ***

Comment 7 Marek Hulan 2017-07-11 08:03:32 UTC
This has not been released in any upstream release yet, probably will make it to 0.11. This should not have been moved to MODIFIED.

Comment 8 Tomas Strachota 2017-07-11 11:49:18 UTC
*** Bug 1469162 has been marked as a duplicate of this bug. ***

Comment 10 Nikhil Kathole 2017-09-24 09:39:46 UTC
VERIFIED

Version Tested:
Satellite-6.3 Snap 17

steps:

# hammer subnet create -h
Usage:
    hammer subnet create [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 quoted or escaped with backslash
 --domains DOMAIN_NAMES                    Comma separated list of values. Values containing comma should be quoted or escaped with backslash
 --from FROM                               Starting IP Address for IP auto suggestion
 --gateway GATEWAY                         Primary DNS for this subnet
 --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 quoted or escaped with backslash
 --location-titles LOCATION_TITLES         Comma separated list of values. Values containing comma should be quoted or escaped with backslash
 --locations LOCATION_NAMES                Comma separated list of values. Values containing comma should be quoted or escaped with backslash
 --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'
 --organization-ids ORGANIZATION_IDS       REPLACE organizations with given ids.
                                           Comma separated list of values. Values containing comma should be quoted or escaped with backslash
 --organization-titles ORGANIZATION_TITLES Comma separated list of values. Values containing comma should be quoted or escaped with backslash
 --organizations ORGANIZATION_NAMES        Comma separated list of values. Values containing comma should be quoted or escaped with backslash
 --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


# hammer subnet update -h
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 quoted or escaped with backslash
 --domains DOMAIN_NAMES                    Comma separated list of values. Values containing comma should be quoted or escaped with backslash
 --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 quoted or escaped with backslash
 --location-titles LOCATION_TITLES         Comma separated list of values. Values containing comma should be quoted or escaped with backslash
 --locations LOCATION_NAMES                Comma separated list of values. Values containing comma should be quoted or escaped with backslash
 --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 quoted or escaped with backslash
 --organization-titles ORGANIZATION_TITLES Comma separated list of values. Values containing comma should be quoted or escaped with backslash
 --organizations ORGANIZATION_NAMES        Comma separated list of values. Values containing comma should be quoted or escaped with backslash
 --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

# hammer subnet -h
Usage:
    hammer subnet [OPTIONS] SUBCOMMAND [ARG] ...

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

Subcommands:
 create                        Create a subnet
 delete                        Delete a subnet
 delete-parameter              Delete parameter for a subnet.
 info                          Show a subnet
 list                          List of subnets
 set-parameter                 Create or update parameter for a subnet.
 update                        Update a subnet

Options:
 -h, --help                    print help

Found --subnet-parameters-attributes removed from hammer subnet create/update -h 
and new options hammer subnet set-parameter/delete-parameter added in hammer subnet -h.

Comment 11 Bryan Kearney 2018-02-21 16:33:01 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