Hide Forgot
Description of problem: Asking for _attrs on an object returns the wrong URL. attr_ is prepended to the attr name. The XML correctly does not include attr_ Version-Release number of selected component (if applicable): iwhd-1.2-3.el6.x86_64 How reproducible: Always Steps to Reproduce: 1. curl -H 'Accept: */json' http://localhost:9090/images/cdb4d9cb-f9f9-469c-b88c-649af9eaea8b/_attrs 2. 3. Actual results: { "object_body": "http://localhost:9090/images/cdb4d9cb-f9f9-469c-b88c-649af9eaea8b", "object_attr_list": "http://localhost:9090/images/cdb4d9cb-f9f9-469c-b88c-649af9eaea8b/_attrs", "attr_latest_build": "http://localhost:9090/images/cdb4d9cb-f9f9-469c-b88c-649af9eaea8b/attr_latest_build", "attr_latest_unpushed": "http://localhost:9090/images/cdb4d9cb-f9f9-469c-b88c-649af9eaea8b/attr_latest_unpushed", "attr_object_type": "http://localhost:9090/images/cdb4d9cb-f9f9-469c-b88c-649af9eaea8b/attr_object_type", "attr_template": "http://localhost:9090/images/cdb4d9cb-f9f9-469c-b88c-649af9eaea8b/attr_template", "attr_uuid": "http://localhost:9090/images/cdb4d9cb-f9f9-469c-b88c-649af9eaea8b/attr_uuid" } Expected results: { "object_body": "http://localhost:9090/images/cdb4d9cb-f9f9-469c-b88c-649af9eaea8b", "object_attr_list": "http://localhost:9090/images/cdb4d9cb-f9f9-469c-b88c-649af9eaea8b/_attrs", "attr_latest_build": "http://localhost:9090/images/cdb4d9cb-f9f9-469c-b88c-649af9eaea8b/latest_build", "attr_latest_unpushed": "http://localhost:9090/images/cdb4d9cb-f9f9-469c-b88c-649af9eaea8b/latest_unpushed", "attr_object_type": "http://localhost:9090/images/cdb4d9cb-f9f9-469c-b88c-649af9eaea8b/object_type", "attr_template": "http://localhost:9090/images/cdb4d9cb-f9f9-469c-b88c-649af9eaea8b/template", "attr_uuid": "http://localhost:9090/images/cdb4d9cb-f9f9-469c-b88c-649af9eaea8b/uuid" } Additional info:
XML from same call: [root@qeblade33 warehouse]# curl -H 'Accept: */xml' http://localhost:9090/images/cdb4d9cb-f9f9-469c-b88c-649af9eaea8b/_attrs <object> <object_body path="http://localhost:9090/images/cdb4d9cb-f9f9-469c-b88c-649af9eaea8b"/> <object_attr_list path="http://localhost:9090/images/cdb4d9cb-f9f9-469c-b88c-649af9eaea8b/_attrs"/> <object_attr name="latest_build" path="http://localhost:9090/images/cdb4d9cb-f9f9-469c-b88c-649af9eaea8b/latest_build"/> <object_attr name="latest_unpushed" path="http://localhost:9090/images/cdb4d9cb-f9f9-469c-b88c-649af9eaea8b/latest_unpushed"/> <object_attr name="object_type" path="http://localhost:9090/images/cdb4d9cb-f9f9-469c-b88c-649af9eaea8b/object_type"/> <object_attr name="template" path="http://localhost:9090/images/cdb4d9cb-f9f9-469c-b88c-649af9eaea8b/template"/> <object_attr name="uuid" path="http://localhost:9090/images/cdb4d9cb-f9f9-469c-b88c-649af9eaea8b/uuid"/> </object>
Factory uses the XML version. If conductor does as well, this is not a high priority for 1.0. If any other part of Aeolus uses json, this needs to be a blocker and fixed for 1.0.
Created attachment 566656 [details] Remove attr_ from JSON template
Thanks for the report. Here's a patch: http://thread.gmane.org/gmane.comp.lib.iwhd.devel/1094
json looks cleaned up [root@apollo aeolus-conductor]# curl -H 'Accept: */json' http://localhost:9090/images/005ed09e-8402-11e1-afcd-0015172f2b30/_attrs { "object_body": "http://localhost:9090/images/005ed09e-8402-11e1-afcd-0015172f2b30", "object_attr_list": "http://localhost:9090/images/005ed09e-8402-11e1-afcd-0015172f2b30/_attrs", "environment": "http://localhost:9090/images/005ed09e-8402-11e1-afcd-0015172f2b30/environment", "latest_build": "http://localhost:9090/images/005ed09e-8402-11e1-afcd-0015172f2b30/latest_build", "latest_unpushed": "http://localhost:9090/images/005ed09e-8402-11e1-afcd-0015172f2b30/latest_unpushed", "object_type": "http://localhost:9090/images/005ed09e-8402-11e1-afcd-0015172f2b30/object_type", "template": "http://localhost:9090/images/005ed09e-8402-11e1-afcd-0015172f2b30/template", "uuid": "http://localhost:9090/images/005ed09e-8402-11e1-afcd-0015172f2b30/uuid" } [root@apollo aeolus-conductor]# curl -H 'Accept: */xml' http://localhost:9090/images/15b837ae-85a2-11e1-9aec-0015172f2b30/_attrs <object> <object_body path="http://localhost:9090/images/15b837ae-85a2-11e1-9aec-0015172f2b30"/> <object_attr_list path="http://localhost:9090/images/15b837ae-85a2-11e1-9aec-0015172f2b30/_attrs"/> <object_attr name="environment" path="http://localhost:9090/images/15b837ae-85a2-11e1-9aec-0015172f2b30/environment"/> <object_attr name="latest_unpushed" path="http://localhost:9090/images/15b837ae-85a2-11e1-9aec-0015172f2b30/latest_unpushed"/> <object_attr name="object_type" path="http://localhost:9090/images/15b837ae-85a2-11e1-9aec-0015172f2b30/object_type"/> <object_attr name="template" path="http://localhost:9090/images/15b837ae-85a2-11e1-9aec-0015172f2b30/template"/> <object_attr name="uuid" path="http://localhost:9090/images/15b837ae-85a2-11e1-9aec-0015172f2b30/uuid"/> </object> [root@apollo aeolus-conductor]# [root@apollo aeolus-conductor]# rpm -qa | grep iwhd iwhd-1.5-2.el6.x86_64 [root@apollo aeolus-conductor]# rpm -qa | grep aeolus rubygem-aeolus-cli-0.3.1-1.el6.noarch rubygem-aeolus-image-0.3.0-12.el6.noarch aeolus-conductor-0.8.7-1.el6.noarch aeolus-conductor-daemons-0.8.7-1.el6.noarch aeolus-conductor-doc-0.8.7-1.el6.noarch aeolus-configure-2.5.2-1.el6.noarch aeolus-all-0.8.7-1.el6.noarch
As implied by comment#4 above, this fix is in iwhd-1.4.
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-0589.html