Bug 1079567 - Creating EC2 compute resource via CLI expects URL but documentation says to use REGION
Summary: Creating EC2 compute resource via CLI expects URL but documentation says to u...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: API
Version: 6.0.3
Hardware: Unspecified
OS: Unspecified
unspecified
low vote
Target Milestone: Unspecified
Assignee: Tom Caspy
QA Contact: Kedar Bidarkar
URL:
Whiteboard: FAILEDQA in Upstream
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-03-21 20:24 UTC by Og Maciel
Modified: 2019-09-26 14:07 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-07-27 08:40:44 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:1500 normal SHIPPED_LIVE Red Hat Satellite 6.2 Base Libraries 2016-07-27 12:24:38 UTC

Description Og Maciel 2014-03-21 20:24:06 UTC
Description of problem:

The inline documentation for creating an EC2 compute resource via CLI claims that a URL is a requirement for Libvirt, Ovirt and Openstack but it does not mention EC2. Based on this, REGION should be the argument for EC2 but running the CLI fails **unless** you pass URL


[root@qetello02 ~]# LANG=en_US hammer -v -u admin -p changeme  --output csv compute-resource create --help
Message
"Usage:
    hammer compute-resource create [OPTIONS]

Options:
    --description DESCRIPTION
    --name NAME
    --password PASSWORD           Password for Ovirt, EC2, Vmware, Openstack. Secret key for EC2
    --provider PROVIDER           Providers include EC2, Openstack, Rackspace
    --region REGION               for EC2 only
    --server SERVER               for Vmware
    --tenant TENANT               for Openstack only
    --url URL                     URL for Libvirt, Ovirt, and Openstack
    --user USER                   Username for Ovirt, EC2, Vmware, Openstack. Access Key for EC2.
    --uuid UUID                   for Ovirt, Vmware Datacenter
    -h, --help                    print help
"
[root@qetello02 ~]# LANG=en_US hammer -v -u admin -p changeme  --output csv compute-resource create --name='xpwv1w6f' --provider='EC2' --region='eu-west-1' --user='user@example.com' --password='secret'
[ERROR 2014-03-21 16:08:53 Exception] Error: option '--url' is required

See: 'hammer compute-resource create --help'
Could not create the compute resource:
  Error: option '--url' is required

  See: 'hammer compute-resource create --help'
[ERROR 2014-03-21 16:08:53 Exception]

Clamp::UsageError (option '--url' is required):
    /usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/option/parsing.rb:53:in `parse_options'
    /usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/option/parsing.rb:45:in `each'
    /usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/option/parsing.rb:45:in `parse_options'
    /usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/command.rb:52:in `parse'
    /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.0.18/lib/hammer_cli/./apipie/../abstract.rb:30:in `parse'
    /usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/command.rb:66:in `run'
    /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.0.18/lib/hammer_cli/./apipie/../abstract.rb:22:in `run'
    /usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/subcommand/execution.rb:11:in `execute'
    /usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/command.rb:67:in `run'
    /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.0.18/lib/hammer_cli/./apipie/../abstract.rb:22:in `run'
    /usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/subcommand/execution.rb:11:in `execute'
    /usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/command.rb:67:in `run'
    /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.0.18/lib/hammer_cli/./apipie/../abstract.rb:22:in `run'
    /usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/command.rb:125:in `run'
    /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.0.18/bin/hammer:87
    /usr/bin/hammer:19:in `load'
    /usr/bin/hammer:19
[root@qetello02 ~]# LANG=en_US hammer -v -u admin -p changeme  --output csv compute-resource create --name='xpwv1w6f' --provider='EC2' --url='eu-west-1' --user='user@example.com' --password='secret'


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

* apr-util-ldap-1.3.9-3.el6_0.1.x86_64
* candlepin-0.8.25-1.el6sam.noarch
* candlepin-scl-1-5.el6_4.noarch
* candlepin-scl-quartz-2.1.5-5.el6_4.noarch
* candlepin-scl-rhino-1.7R3-1.el6_4.noarch
* candlepin-scl-runtime-1-5.el6_4.noarch
* candlepin-selinux-0.8.25-1.el6sam.noarch
* candlepin-tomcat6-0.8.25-1.el6sam.noarch
* elasticsearch-0.90.10-4.el6sat.noarch
* foreman-1.5.0.10-1.el6sat.noarch
* foreman-compute-1.5.0.10-1.el6sat.noarch
* foreman-libvirt-1.5.0.10-1.el6sat.noarch
* foreman-postgresql-1.5.0.10-1.el6sat.noarch
* foreman-proxy-1.5.3-1.el6sat.noarch
* foreman-selinux-1.5.0-0.develop.el6sat.noarch
* katello-1.5.0-18.el6sat.noarch
* katello-apache-1.0-1.noarch
* katello-ca-1.0-1.noarch
* katello-certs-tools-1.5.5-1.el6sat.noarch
* katello-installer-0.0.30-1.el6sat.noarch
* openldap-2.4.23-31.el6.x86_64
* pulp-katello-plugins-0.2-1.el6sat.noarch
* pulp-nodes-common-2.3.1-0.4.beta.el6sat.noarch
* pulp-nodes-parent-2.3.1-0.4.beta.el6sat.noarch
* pulp-puppet-plugins-2.3.1-0.4.beta.el6sat.noarch
* pulp-rpm-plugins-2.3.1-0.4.beta.el6sat.noarch
* pulp-selinux-2.3.1-0.4.beta.el6sat.noarch
* pulp-server-2.3.1-0.4.beta.el6sat.noarch
* python-ldap-2.3.10-1.el6.x86_64
* ruby193-rubygem-ldap_fluff-0.2.2-2.el6sat.noarch
* ruby193-rubygem-net-ldap-0.3.1-3.el6sat.noarch
* ruby193-rubygem-runcible-1.0.8-1.el6sat.noarch

How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 RHEL Program Management 2014-03-21 20:44:23 UTC
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.

Comment 3 Dominic Cleal 2014-05-20 12:34:12 UTC
Created redmine issue http://projects.theforeman.org/issues/5812 from this bug

Comment 4 Bryan Kearney 2015-02-08 23:01:38 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/5812 has been closed
-------------
Tom Caspy
Applied in changeset commit:06c8a10ebcfe2bf2e61fa4a047d1002abe90cbbf.

Comment 5 Bryan Kearney 2015-02-18 22:21:24 UTC
Upstream bug assigned to tcaspy@redhat.com

Comment 6 Tazim Kolhar 2015-10-29 11:33:44 UTC
*** This bug is failing in upstream ****

]# rpm -qa | grep foreman
foreman-proxy-1.11.0-0.develop.201510201341git00875b3.el7.noarch
foreman-selinux-1.11.0-0.develop.201510071426git6234447.el7.noarch
tfm-rubygem-hammer_cli_foreman_bootdisk-0.1.3-3.el7.noarch
tfm-rubygem-foreman_docker-1.4.1-2.fm1_10.el7.noarch
foreman-debug-1.11.0-0.develop.201510271601git4e08a71.el7.noarch
foreman-compute-1.11.0-0.develop.201510271601git4e08a71.el7.noarch
foreman-release-scl-1-1.el7.x86_64
foreman-gce-1.11.0-0.develop.201510271601git4e08a71.el7.noarch
tfm-rubygem-foreman_gutterball-0.0.1-3.el7.noarch
hp-z600-01.rhts.eng.bos.redhat.com-foreman-client-1.0-1.noarch
hp-z600-01.rhts.eng.bos.redhat.com-foreman-proxy-client-1.0-1.noarch
tfm-rubygem-foreman_discovery-4.1.2-1.fm1_11.el7.noarch
foreman-vmware-1.11.0-0.develop.201510271601git4e08a71.el7.noarch
tfm-rubygem-foreman_hooks-0.3.9-1.el7.noarch
tfm-rubygem-foreman-tasks-0.7.6-1.fm1_10.el7.noarch
tfm-rubygem-hammer_cli_foreman_tasks-0.0.8-1.el7.noarch
hp-z600-01.rhts.eng.bos.redhat.com-foreman-proxy-1.0-1.noarch
foreman-ovirt-1.11.0-0.develop.201510271601git4e08a71.el7.noarch
foreman-1.11.0-0.develop.201510271601git4e08a71.el7.noarch
tfm-rubygem-hammer_cli_foreman_docker-0.0.3-4.el7.noarch
foreman-release-1.11.0-0.develop.201510271601git4e08a71.el7.noarch
foreman-libvirt-1.11.0-0.develop.201510271601git4e08a71.el7.noarch
foreman-postgresql-1.11.0-0.develop.201510271601git4e08a71.el7.noarch
tfm-rubygem-hammer_cli_foreman-0.4.0-1.201510201150gitab068d9.el7.noarch
tfm-rubygem-foreman_bootdisk-6.0.0-2.fm1_10.el7.noarch

steps:
# hammer -u admin -p changeme --output csv compute-resource create --help
Message
"Usage:
    hammer compute-resource create [OPTIONS]

Options:
 --description DESCRIPTION                    
 --location-ids LOCATION_IDS                 REPLACE locations with given ids
                                             Comma separated list of values.
 --locations LOCATION_NAMES                  Comma separated list of values.
 --name NAME                                  
 --organization-ids ORGANIZATION_IDS         REPLACE organizations with given ids.
                                             Comma separated list of values.
 --organizations ORGANIZATION_NAMES          Comma separated list of values.
 --password PASSWORD                         Password for oVirt, EC2, VMware, OpenStack. Secret key for EC2
 --provider PROVIDER                         Providers include Libvirt, Ovirt, Vmware, Openstack, Rackspace, GCE
 --region REGION                             for EC2 only
 --server SERVER                             for VMware
 --set-console-password SET_CONSOLE_PASSWORD for Libvirt and VMware only
                                             One of true/false, yes/no, 1/0.
 --tenant TENANT                             for OpenStack only
 --url URL                                   URL for Libvirt, oVirt, and OpenStack
 --user USER                                 Username for oVirt, EC2, VMware, OpenStack. Access Key for EC2.
 --uuid UUID                                 for oVirt, VMware Datacenter
 -h, --help                                  print help
"

# hammer -v -u admin -p changeme  --output csv compute-resource create --name='xpwv1w6f' --provider='EC2' --region='eu-west-1' 
[ERROR 2015-10-29 07:31:13 Exception] Error: Options --name, --url, --provider are required

See: 'hammer compute-resource create --help'
Could not create the compute resource:
  Error: Options --name, --url, --provider are required
  
  See: 'hammer compute-resource create --help'
[ERROR 2015-10-29 07:31:13 Exception] 

Clamp::UsageError (Options --name, --url, --provider are required):
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.4.0/lib/hammer_cli/abstract.rb:35:in `rescue in parse'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.4.0/lib/hammer_cli/abstract.rb:31:in `parse'
    /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/command.rb:67:in `run'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.4.0/lib/hammer_cli/abstract.rb:23:in `run'
    /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/subcommand/execution.rb:11:in `execute'
    /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/command.rb:68:in `run'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.4.0/lib/hammer_cli/abstract.rb:23:in `run'
    /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/subcommand/execution.rb:11:in `execute'
    /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/command.rb:68:in `run'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.4.0/lib/hammer_cli/abstract.rb:23:in `run'
    /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/command.rb:133:in `run'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.4.0/bin/hammer:125:in `<top (required)>'
    /usr/bin/hammer:23:in `load'
    /usr/bin/hammer:23:in `<main>'

Comment 7 Bryan Kearney 2015-10-29 12:06:14 UTC
Upstream bug component is API

Comment 8 Bryan Kearney 2015-10-29 12:06:17 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/5812 has been closed
-------------
Tom Caspy
Applied in changeset commit:06c8a10ebcfe2bf2e61fa4a047d1002abe90cbbf.

Comment 12 Kedar Bidarkar 2016-04-22 11:15:11 UTC
We still see the same issue. IT also expects --url, but descriptions doesn't seem to say so.

hammer -v -u admin -p changeme compute-resource create --name='xpwv1w6f' --provider=EC2 --region='us-east-1' --user=<access key EC2> --password='Secret Key Ec2'[ERROR 2016-04-22 07:12:22 Exception] Error: Options --name, --url, --provider are required

See: 'hammer compute-resource create --help'
Could not create the compute resource:
  Error: Options --name, --url, --provider are required
  
  See: 'hammer compute-resource create --help'
[ERROR 2016-04-22 07:12:22 Exception] 

Clamp::UsageError (Options --name, --url, --provider are required):
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.5.1.5/lib/hammer_cli/abstract.rb:34:in `rescue in parse'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.5.1.5/lib/hammer_cli/abstract.rb:30:in `parse'
    /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/command.rb:67:in `run'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.5.1.5/lib/hammer_cli/abstract.rb:22:in `run'
    /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/subcommand/execution.rb:11:in `execute'
    /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/command.rb:68:in `run'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.5.1.5/lib/hammer_cli/abstract.rb:22:in `run'
    /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/subcommand/execution.rb:11:in `execute'
    /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/command.rb:68:in `run'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.5.1.5/lib/hammer_cli/abstract.rb:22:in `run'
    /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/command.rb:133:in `run'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.5.1.5/bin/hammer:125:in `<top (required)>'
    /usr/bin/hammer:23:in `load'
    /usr/bin/hammer:23:in `<main>'

Comment 13 Kedar Bidarkar 2016-04-22 11:15:40 UTC
TESTED with sat62-snap9.0

Comment 14 Bryan Kearney 2016-04-22 12:10:38 UTC
Upstream bug assigned to tcaspy@redhat.com

Comment 15 sthirugn@redhat.com 2016-04-22 15:40:13 UTC
Moving to GA

Comment 16 Bryan Kearney 2016-04-26 14:12:04 UTC
Upstream bug assigned to tcaspy@redhat.com

Comment 18 Bryan Kearney 2016-05-03 18:01:09 UTC
Upstream bug assigned to tcaspy@redhat.com

Comment 19 Bryan Kearney 2016-05-03 18:01:12 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/5812 has been closed

Comment 21 errata-xmlrpc 2016-07-27 08:40:44 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/RHBA-2016:1500


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