use of org.ovirt.engine.core.common.action.ExportOvaParameters in project ovirt-engine by oVirt.
the class BackendVmResource method exportToPathOnHost.
@Override
public Response exportToPathOnHost(Action action) {
ExportOvaParameters params = new ExportOvaParameters();
params.setEntityType(VmEntityType.VM);
params.setEntityId(guid);
params.setProxyHostId(getHostId(action));
params.setDirectory(action.getDirectory());
params.setName(action.getFilename());
return doAction(ActionType.ExportOva, params, action);
}
use of org.ovirt.engine.core.common.action.ExportOvaParameters in project ovirt-engine by oVirt.
the class VmListModel method onExportOva.
public void onExportOva() {
ExportOvaModel model = (ExportOvaModel) getWindow();
if (!model.validate()) {
return;
}
model.startProgress();
ArrayList<ActionParametersBase> list = new ArrayList<>();
for (Object item : getSelectedItems()) {
VM vm = (VM) item;
ExportOvaParameters parameters = new ExportOvaParameters();
parameters.setEntityId(vm.getId());
parameters.setEntityType(VmEntityType.VM);
parameters.setProxyHostId(model.getProxy().getSelectedItem().getId());
parameters.setDirectory(model.getPath().getEntity());
parameters.setName(model.getName().getEntity());
list.add(parameters);
}
Frontend.getInstance().runMultipleAction(ActionType.ExportOva, list, result -> {
ExportOvaModel localModel = (ExportOvaModel) result.getState();
localModel.stopProgress();
cancel();
}, model);
}
Aggregations