Sahina Bose has posted comments on this change.

Change subject: restapi: Adding details to step as statistics
......................................................................


Patch Set 14:

(1 comment)

....................................................
File 
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendStepResource.java
Line 67: 
Line 68:     @Override
Line 69:     public StatisticsResource getStatisticsResource() {
Line 70: 
Line 71:         GlusterTaskStatisticalQuery query = new 
GlusterTaskStatisticalQuery(new TaskQueryResolver<Guid>(), newModel(id));
The statistics on Step would vary for each external task type.
If external task type is GLUSTER, then the GlusterTaskStatisticalQuery needs to 
be called.
However, if external task type is VDSM, the statistics details will be 
different.

So need a way to identify the task type before calling inject(new 
BackendStatisticsResource ..)

If I try to call getEntity for Step, before the call to inject, I get a 
"session not valid" error, as the LoginValidator of resteasy is not yet called. 
Is there a way to get the step entity in getStatisticsResource() method?
Line 72:         return inject(new BackendStatisticsResource<Step, 
GlusterVolumeTaskStatusEntity>(GlusterVolumeTaskStatusEntity.class, guid, 
query));
Line 73:     }
Line 74: 
Line 75:     public class TaskQueryResolver<T> implements IResolver<Guid, 
GlusterVolumeTaskStatusEntity> {


-- 
To view, visit http://gerrit.ovirt.org/19685
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ia1f7559d5700823cd4ee0a28a826074d22679d23
Gerrit-PatchSet: 14
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Sahina Bose <[email protected]>
Gerrit-Reviewer: Eli Mesika <[email protected]>
Gerrit-Reviewer: Michael Pasternak <[email protected]>
Gerrit-Reviewer: Sahina Bose <[email protected]>
Gerrit-Reviewer: Shubhendu Tripathi <[email protected]>
Gerrit-Reviewer: Yair Zaslavsky <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to