Bug 848445 - provider api bad error messages
Summary: provider api bad error messages
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: CloudForms Cloud Engine
Classification: Retired
Component: aeolus-conductor
Version: 1.0.0
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: rc
Assignee: Petr Blaho
QA Contact: Dave Johnson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-08-15 16:02 UTC by Dave Johnson
Modified: 2012-12-04 15:16 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Missing locale files caused the Cloud Engine API to display error messages with missing translations. This fix adds the directory of the missing locale files to Cloud Engine's spec file. The Cloud Engine API now displays error messages correctly.
Clone Of:
Environment:
Last Closed: 2012-12-04 15:16:10 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2012:1516 0 normal SHIPPED_LIVE CloudForms Cloud Engine 1.1 update 2012-12-04 19:51:45 UTC

Description Dave Johnson 2012-08-15 16:02:56 UTC
Description of problem:
===================================
found two cases in the provider api where there is a bad error message not to mention translation missing... 

=== test errorWithBadUrl ===
curl -X POST -d '<provider><name>errorTest-i60j1</name><url>http://localhost:3002/apiiii</url><provider_type id="1"/><deltacloud_provider></deltacloud_provider></provider>' -H "Content-Type: application/xml" -H "Accept: application/xml" --insecure -u admin:password https://hp-sl390s-01.rhts.eng.bos.redhat.com:443/conductor/api/providers 

<errors>
<error>
<message>Url translation missing: en.activerecord.errors.models.provider.attributes.url.invalid_framework</message>
</error>
</errors>


=== test errorWithNoType ===
curl -X POST -d '<provider><name>errorTest-fc85d</name><url>http://localhost:3002/api</url><deltacloud_provider></deltacloud_provider></provider>' -H "Content-Type: application/xml" -H "Accept: application/xml" --insecure -u admin:password https://hp-sl390s-01.rhts.eng.bos.redhat.com:443/conductor/api/providers 

<errors>
<error>
<message>Url translation missing: en.activerecord.errors.models.provider.attributes.url.invalid_framework</message>
</error>
</errors>



Version-Release number of selected component (if applicable):
aeolus-conductor-0.13.0-0.20120813220011gitd23ae4c.fc16.noarch

Comment 1 Petr Blaho 2012-08-17 15:16:06 UTC
This is problem with aeolus-conductor.spec.in file.
There is missing config/locales/activerecord directory in yml= definition of what files to include in rpm.

Comment 3 Tzu-Mainn Chen 2012-08-21 18:26:52 UTC
Pushed to master and 1.1:

commit b83275c361f8b17ef7e32dae051bcc8aac8751ef
Author: Petr Blaho <pblaho>
Date:   Tue Aug 21 14:18:41 2012 -0400

    https://bugzilla.redhat.com/show_bug.cgi?id=848445
    
    There was missing directory for translations in spec file.
    Now added.
    
    Signed-off-by: Tzu-Mainn Chen <tzumainn>
    (cherry picked from commit 1ace53b12d0026f8520186622da43fe19acf70df)

Comment 4 Steve Linabery 2012-09-07 21:56:13 UTC
in build aeolus-conductor-0.13.3-1.el6cf

Comment 6 Dave Johnson 2012-09-17 19:25:24 UTC
better in CFCE v1.1 2012-09-14.5 puddle...

missing type specifies type is not valid which is not really correct, will open a separate bug to track it


[root@hp-bl685cg6-01 ~]# curl -X POST -d '<provider><name>errorTest-i60j1</name><url>http://localhost:3002/apiiii</url><provider_type id="1"/><deltacloud_provider></deltacloud_provider></provider>' -H "Content-Type: application/xml" -H "Accept: application/xml" --insecure -u admin:password https://127.0.0.1:443/conductor/api/providers 
<errors>
<error>
<message>Cloud Resource Provider URL Must be a valid provider uri</message>
</error>
</errors>
[root@hp-bl685cg6-01 ~]# curl -X POST -d '<provider><name>errorTest-fc85d</name><url>http://localhost:3002/api</url><deltacloud_provider></deltacloud_provider></provider>' -H "Content-Type: application/xml" -H "Accept: application/xml" --insecure -u admin:password https://127.0.0.1:443/conductor/api/providers
<errors>
<error>
<message>Cloud Resource Provider Type can't be blank</message>
</error>
<error>
<message>Provider type does not exist</message>
</error>
</errors>

Comment 8 errata-xmlrpc 2012-12-04 15:16:10 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.

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.