Search in sources :

Example 1 with CloneVmParameters

use of org.ovirt.engine.core.common.action.CloneVmParameters in project ovirt-engine by oVirt.

the class CloneVmModel method postCloneVmNameUnique.

private void postCloneVmNameUnique(final Model targetModel, boolean makeCreatorExplicitOwner) {
    CloneVmParameters params = new CloneVmParameters(getVm(), getCloneName().getEntity());
    params.setMakeCreatorExplicitOwner(makeCreatorExplicitOwner);
    Frontend.getInstance().runAction(ActionType.CloneVm, params, result -> {
        stopProgress();
        targetModel.setWindow(null);
    }, this);
}
Also used : CloneVmParameters(org.ovirt.engine.core.common.action.CloneVmParameters)

Example 2 with CloneVmParameters

use of org.ovirt.engine.core.common.action.CloneVmParameters in project ovirt-engine by oVirt.

the class BackendVmResource method doClone.

@Override
public Response doClone(Action action) {
    validateParameters(action, "vm.name");
    org.ovirt.engine.core.common.businessentities.VM vm = getEntity(org.ovirt.engine.core.common.businessentities.VM.class, QueryType.GetVmByVmId, new IdQueryParameters(guid), "VM: id=" + guid);
    CloneVmParameters cloneVmParameters = new CloneVmParameters(vm, action.getVm().getName());
    cloneVmParameters.setMakeCreatorExplicitOwner(isFiltered());
    Response response = doAction(ActionType.CloneVm, cloneVmParameters, action);
    return response;
}
Also used : Response(javax.ws.rs.core.Response) VM(org.ovirt.engine.core.common.businessentities.VM) IdQueryParameters(org.ovirt.engine.core.common.queries.IdQueryParameters) CloneVmParameters(org.ovirt.engine.core.common.action.CloneVmParameters)

Aggregations

CloneVmParameters (org.ovirt.engine.core.common.action.CloneVmParameters)2 Response (javax.ws.rs.core.Response)1 VM (org.ovirt.engine.core.common.businessentities.VM)1 IdQueryParameters (org.ovirt.engine.core.common.queries.IdQueryParameters)1