Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 848445

Summary: provider api bad error messages
Product: [Retired] CloudForms Cloud Engine Reporter: Dave Johnson <dajohnso>
Component: aeolus-conductorAssignee: Petr Blaho <pblaho>
Status: CLOSED ERRATA QA Contact: Dave Johnson <dajohnso>
Severity: low Docs Contact:
Priority: medium    
Version: 1.0.0CC: dmacpher, morazi, slinaber, tzumainn
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
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 15:16:10 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:

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