Bug 848445 - provider api bad error messages
provider api bad error messages
Status: CLOSED ERRATA
Product: CloudForms Cloud Engine
Classification: Red Hat
Component: aeolus-conductor (Show other bugs)
1.0.0
Unspecified Unspecified
medium Severity low
: rc
: ---
Assigned To: Petr Blaho
Dave Johnson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-15 12:02 EDT by Dave Johnson
Modified: 2012-12-04 10:16 EST (History)
4 users (show)

See Also:
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.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-12-04 10:16:10 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 Dave Johnson 2012-08-15 12:02:56 EDT
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 11:16:06 EDT
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 14:26:52 EDT
Pushed to master and 1.1:

commit b83275c361f8b17ef7e32dae051bcc8aac8751ef
Author: Petr Blaho <pblaho@redhat.com>
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@redhat.com>
    (cherry picked from commit 1ace53b12d0026f8520186622da43fe19acf70df)
Comment 4 Steve Linabery 2012-09-07 17:56:13 EDT
in build aeolus-conductor-0.13.3-1.el6cf
Comment 6 Dave Johnson 2012-09-17 15:25:24 EDT
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 10:16:10 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.