Bug 818750 - "aeolus-image list --images --environments=<env>" can't handle spaces in <env>
"aeolus-image list --images --environments=<env>" can't handle spaces in <env>
Status: CLOSED ERRATA
Product: CloudForms Cloud Engine
Classification: Red Hat
Component: rubygem-aeolus-cli (Show other bugs)
1.0.0
Unspecified Unspecified
unspecified Severity low
: rc
: ---
Assigned To: Maros Zatko
Rehana
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-03 16:37 EDT by James Laska
Modified: 2013-09-02 03:02 EDT (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
The aeolus-image command-line tool was providing a facility to 'list' various image information. When listing images in a specific environment, the command was failing if the provided environment name contained whitespace. A sample command that results in failure would be: # aeolus-image list --images --environment="Devel Cloud" This issue will be resolved in a future release of Red Hat CloudForms. Until this issue is resolved, administrators may prevent the problem by removing all whitespace from Cloud names.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-12-04 10:07:29 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description James Laska 2012-05-03 16:37:18 EDT
Description of problem:

Attempting to list images in a particular environment fails with a exception.  It appears that any environment that contains spaces, makes aeolus-image unhappy.  I can workaround this by replacing the <spaces> with an <underscore> in my environment names.  However, aeolus-image should be able to handle <spaces> (assuming they are legal characters for a cloud name <environment>).


Version-Release number of selected component (if applicable):
 * rubygem-aeolus-cli-0.3.1-1.el6.noarch


Steps to Reproduce:
1. # aeolus-image list --environments
> Name           
> ----------     
> default        
> Test Cloud     
> Prod Cloud     
> Dev Cloud      

3. # aeolus-image list --images --environment "Dev Cloud"

Actual results:

> ERROR:  Unknown Error => bad URI(is not URI?): /conductor/api/environments/Dev Cloud/images.xml
> /usr/lib/ruby/1.8/uri/generic.rb:732:in `merge'
> /usr/lib/ruby/gems/1.8/gems/activeresource-3.0.10/lib/active_resource/connection.rb:79:in `get'
> /usr/lib/ruby/gems/1.8/gems/activeresource-3.0.10/lib/active_resource/connection.rb:217:in `with_auth'
> /usr/lib/ruby/gems/1.8/gems/activeresource-3.0.10/lib/active_resource/connection.rb:79:in `get'
> /usr/lib/ruby/gems/1.8/gems/activeresource-3.0.10/lib/active_resource/base.rb:853:in `find_every'
> /usr/lib/ruby/gems/1.8/gems/activeresource-3.0.10/lib/active_resource/base.rb:777:in `find'
> /usr/lib/ruby/gems/1.8/gems/aeolus-cli-0.3.1/lib/aeolus_cli/command/list_command.rb:32:in `images'
> /usr/lib/ruby/gems/1.8/gems/aeolus-cli-0.3.1/lib/aeolus_cli/command/config_parser.rb:303:in `send'
> /usr/lib/ruby/gems/1.8/gems/aeolus-cli-0.3.1/lib/aeolus_cli/command/config_parser.rb:303:in `list'
> /usr/lib/ruby/gems/1.8/gems/aeolus-cli-0.3.1/lib/aeolus_cli/command/config_parser.rb:44:in `send'
> /usr/lib/ruby/gems/1.8/gems/aeolus-cli-0.3.1/lib/aeolus_cli/command/config_parser.rb:44:in `process'
> /usr/lib/ruby/gems/1.8/gems/aeolus-cli-0.3.1/bin/aeolus-image:20
> /usr/bin/aeolus-image:19:in `load'
> /usr/bin/aeolus-image:19


Expected results:

> ID                                       Name                           Environment     OS         OS Version     Arch       Description     
> ------------------------------------     --------------------------     -----------     ------     ----------     ------     -----------     
> 2e78d5be-945c-11e1-8b1a-0015172f2f5c     rhel-i386-5.7 (rhev)           Dev Cloud       RHEL-5     U7             x86_64                     
> 3199269a-945c-11e1-8b1a-0015172f2f5c     rhel-i386-5.8 (rhev)           Dev Cloud       RHEL-5     U8             x86_64                     
> 5f608c2e-9477-11e1-8b1a-0015172f2f5c     rhel-i386-5Server (rhev)       Dev Cloud       RHEL-5     U8             x86_64                     
> 728a5654-9477-11e1-8b1a-0015172f2f5c     rhel-i386-6.2 (rhev)           Dev Cloud       RHEL-6     2              x86_64                     
> 4b9aab0c-9477-11e1-8b1a-0015172f2f5c     rhel-i386-6Server (rhev)       Dev Cloud       RHEL-6     2              x86_64                     
> fd8f25e6-947b-11e1-8b1a-0015172f2f5c     rhel-x86_64-6.2 (rhev)         Dev Cloud       RHEL-6     2              x86_64                     
> 1ab5f8ac-947c-11e1-8b1a-0015172f2f5c     rhel-x86_64-6Server (rhev)     Dev Cloud       RHEL-6     2              x86_64                     
> c5ea297e-947b-11e1-8b1a-0015172f2f5c     rhel-x86_64-5.8 (rhev)         Dev Cloud       RHEL-5     U8             x86_64                     
> e8531dd6-947b-11e1-8b1a-0015172f2f5c     rhel-x86_64-5Server (rhev)     Dev Cloud       RHEL-5     U8             x86_64                     
> 6bdaa99a-952a-11e1-8b1a-0015172f2f5c     rhel-x86_64-6.1 (rhev)         Dev Cloud       RHEL-6     1              x86_64                     
> e5bfbd28-9529-11e1-8b1a-0015172f2f5c     rhel-i386-6.1 (rhev)           Dev Cloud       RHEL-6     1              x86_64                     
> a99f92a0-9529-11e1-8b1a-0015172f2f5c     rhel-x86_64-5.7 (rhev)         Dev Cloud       RHEL-5     U7             x86_64                     

Additional info:
Comment 1 James Laska 2012-05-04 09:35:46 EDT
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
The aeolus-image command-line tool provides a facility to 'list' various image information.  When listing images in a specific environment, the command will fail if the provided environment name contains whitespace.  A sample command that results in failure would be:

# aeolus-image list --images --environment="Devel Cloud"

This issue will be resolved in a future release of Red Hat CloudForms.  Until this issue is resolved, administrators may prevent the problem by removing all whitespace from Cloud names.
Comment 3 Maros Zatko 2012-07-18 11:09:20 EDT
in master:
ea0a04c BZ818750: list_command_spec: add tests for URI encoded list cmd 
949c411 BZ818750: list_command: URI enconding for path containing environment
Comment 5 Aziza Karol 2012-09-18 02:20:05 EDT
# aeolus-image list --environments
Name          
---------     
default       
Dev Cloud     



#aeolus-image list --images --environment "Dev Cloud"
ID                                       Name        Environment     OS         OS Version     Arch       Description        
------------------------------------     -------     -----------     ------     ----------     ------     --------------     
abca1dbc-0157-11e2-9619-001635c6ca56     rhel6.2     Dev Cloud       RHEL-6     2              x86_64     RHEL62 x86_64      


aeolus-image list --images --environments can handle spaces.

verified:
rpm -qa | grep aeolus
aeolus-conductor-0.13.7-1.el6cf.noarch
aeolus-all-0.13.7-1.el6cf.noarch
rubygem-aeolus-cli-0.7.1-1.el6cf.noarch
aeolus-conductor-doc-0.13.7-1.el6cf.noarch
aeolus-configure-2.8.6-1.el6cf.noarch
rubygem-aeolus-image-0.3.0-12.el6.noarch
aeolus-conductor-daemons-0.13.7-1.el6cf.noarch
Comment 7 errata-xmlrpc 2012-12-04 10:07:29 EST
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.

http://rhn.redhat.com/errata/RHEA-2012-1516.html

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