package org.ovirt.engine.core.bll;

import org.ovirt.engine.core.common.queries.VdcQueryParametersBase;

public class GetAllVmsQuery<P extends VdcQueryParametersBase> extends QueriesCommandBase<P> {
    public GetAllVmsQuery(P parameters) {
        super(parameters);
    }

    @Override
    protected void executeQueryCommand() {
        getQueryReturnValue().setReturnValue(getDbFacade()
                .getVmDAO().getAll(getUserID(), getParameters().isFiltered()));
    }
}

@@ -29,16 +29,97 @@
 e.bll;%0A%0A
+import java.util.List;%0A%0Aimport org.ovirt.engine.core.common.businessentities.VM;%0A
 import o
@@ -178,16 +178,16 @@
 rsBase;%0A
-
 %0Apublic 
@@ -418,45 +418,27 @@
     
-getQueryReturnValue().setReturnValue(
+List%3CVM%3E vmsList = 
 getD
@@ -524,16 +524,165 @@
 tered())
+;%0A        for (VM vm : vmsList) %7B%0A            VmHandler.UpdateVmGuestAgentVersion(vm);%0A        %7D%0A        getQueryReturnValue().setReturnValue(vmsList
 );%0A    %7D

update guest agent info on GetAllVmsQuery (#848048)