Shubhendu Tripathi has uploaded a new change for review.
Change subject: restapi: Corrected the payload listing in /api?rsdl
......................................................................
restapi: Corrected the payload listing in /api?rsdl
Modified to correct the payload details in /api?rsdl.
In RsdlBuilder class the parameters metadata map was getting populated
with action names starting with "/api" whereas while adding the
parameters details for listing in /api?rsdl, the same was being accessed
using the link's HREF which starts with "/ovirt-engine/api".
Because of the above mentioned logic none of the action were getting
populated with proper parameter payload details while listing /api?rsdl.
One sample listing of the action was looking as below -
<link href="/ovirt-engine/api/clusters/{cluster:id}/glustervolumes" rel="add">
<request>
<http_method>POST</http_method>
<body>
<type>GlusterVolume</type>
</body>
</request>
<response>
<type>GlusterVolume</type>
</response>
</link>
Added the logic to populate the parameters map with proper keys starting
with "/ovirt-engine/api". This resolves the issue.
Change-Id: Ief2b23980e4cc9e06589e64aa31d5a5f9eff71ec
Bug-Url: https://bugzilla.redhat.com/1026882
Signed-off-by: Shubhendu Tripathi <[email protected]>
---
M
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/rsdl/RsdlBuilder.java
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/08/21308/1
diff --git
a/backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/rsdl/RsdlBuilder.java
b/backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/rsdl/RsdlBuilder.java
index 1730765..6736f09 100644
---
a/backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/rsdl/RsdlBuilder.java
+++
b/backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/rsdl/RsdlBuilder.java
@@ -103,7 +103,7 @@
Constructor constructor = new
CustomClassLoaderConstructor(Thread.currentThread().getContextClassLoader());
Object result = new Yaml(constructor).load(stream);
for (Action action : ((MetaData)result).getActions()) {
- parametersMetaData.put(action.getName(), action);
+ parametersMetaData.put("/ovirt-engine" +
action.getName(), action);
}
} else {
LOG.error("Parameters metatdata file not found.");
--
To view, visit http://gerrit.ovirt.org/21308
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ief2b23980e4cc9e06589e64aa31d5a5f9eff71ec
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Shubhendu Tripathi <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches