Daniel Erez has posted comments on this change.

Change subject: core: GetAllVmSnapshotsFromConfigurationByVmIdQuery
......................................................................


Patch Set 2:

(3 comments)

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/GetAllVmSnapshotsFromConfigurationByVmIdQuery.java
Line 5: import org.ovirt.engine.core.common.queries.IdQueryParameters;
Line 6: import org.ovirt.engine.core.common.queries.VdcQueryReturnValue;
Line 7: import org.ovirt.engine.core.common.queries.VdcQueryType;
Line 8: 
Line 9: import java.util.List;
Done
Line 10: 
Line 11: /**
Line 12:  * Return a list of all the snapshots for the given VM id.<br>
Line 13:  * The snapshots are sorted by their creation date.<br>who


Line 9: import java.util.List;
Line 10: 
Line 11: /**
Line 12:  * Return a list of all the snapshots for the given VM id.<br>
Line 13:  * The snapshots are sorted by their creation date.<br>who
:).
Done.
Line 14:  */
Line 15: public class GetAllVmSnapshotsFromConfigurationByVmIdQuery<P extends 
IdQueryParameters> extends QueriesCommandBase<P> {
Line 16:     public GetAllVmSnapshotsFromConfigurationByVmIdQuery(P parameters) 
{
Line 17:         super(parameters);


Line 23:                 .getAll(getParameters().getId(), getUserID(), 
getParameters().isFiltered());
Line 24:         for (Snapshot snapshot : snapshotsList) {
Line 25:             VdcQueryReturnValue queryReturnValue =
Line 26:                     
Backend.getInstance().runInternalQuery(VdcQueryType.GetVmConfigurationBySnapshot,
Line 27:                             new IdQueryParameters(snapshot.getId()));
Yeah, I agree the complexity here could be problematic. But, keep in mind that 
this query is called only once when initializing "Custom Preview" dialog in the 
UI, so it's probably not that big issue. I'll check if I can easily share code 
with GetVmConfigurationBySnapshotQuery.
Line 28:             if (queryReturnValue.getSucceeded()) {
Line 29:                 VM vm = queryReturnValue.getReturnValue();
Line 30:                 snapshot.setDiskImages(vm.getImages());
Line 31:             }


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I23aa4de4d233fade33d2a5ea174a9a1802b49370
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Daniel Erez <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Tal Nisan <[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