use of org.ovirt.engine.core.common.action.ActionParametersBase in project ovirt-engine by oVirt.
the class VolumeListModel method startRebalance.
private void startRebalance() {
if (getSelectedItems() == null) {
return;
}
ArrayList<ActionParametersBase> list = new ArrayList<>();
for (Object item : getSelectedItems()) {
GlusterVolumeEntity volume = (GlusterVolumeEntity) item;
list.add(new GlusterVolumeRebalanceParameters(volume.getId(), false, false));
}
Frontend.getInstance().runMultipleAction(ActionType.StartRebalanceGlusterVolume, list, null, true, true);
}
use of org.ovirt.engine.core.common.action.ActionParametersBase in project ovirt-engine by oVirt.
the class ImportVmTemplateCommand method endActionOnAllImageGroups.
@Override
protected void endActionOnAllImageGroups() {
for (ActionParametersBase p : getParameters().getImagesParameters()) {
p.setTaskGroupSuccess(getParameters().getTaskGroupSuccess());
backend.endAction(ActionType.CopyImageGroup, p, getContext().clone().withoutCompensationContext().withoutExecutionContext().withoutLock());
}
}
use of org.ovirt.engine.core.common.action.ActionParametersBase in project ovirt-engine by oVirt.
the class RefreshNetworksParametersFactory method create.
/**
* @param networks networks to be refreshed.
* @return list of PersistentHostSetupNetworksParameters instances to update all given networks on all hosts where
* they are used.
*/
public ArrayList<ActionParametersBase> create(List<Network> networks) {
Map<Guid, List<Network>> vdsIdToNetworksOfAlteredQos = mapNetworksByAttachedHosts(networks);
ArrayList<ActionParametersBase> parameters = new ArrayList<>();
for (Map.Entry<Guid, List<Network>> entry : vdsIdToNetworksOfAlteredQos.entrySet()) {
Guid hostId = entry.getKey();
List<Network> networksOfAlteredQos = entry.getValue();
PersistentHostSetupNetworksParameters setupNetworkParams = persistentHostSetupNetworksParametersFactory.create(hostId, networksOfAlteredQos);
parameters.add(setupNetworkParams);
}
return parameters;
}
use of org.ovirt.engine.core.common.action.ActionParametersBase in project ovirt-engine by oVirt.
the class CreateOvfVolumeForStorageDomainCommand method endChildCommand.
private void endChildCommand(boolean succeeded) {
if (!getParameters().getImagesParameters().isEmpty()) {
ActionParametersBase childParams = getParameters().getImagesParameters().get(0);
childParams.setTaskGroupSuccess(succeeded);
backend.endAction(childParams.getCommandType(), childParams, getContext().clone().withoutCompensationContext().withoutExecutionContext().withoutLock());
}
}
use of org.ovirt.engine.core.common.action.ActionParametersBase in project ovirt-engine by oVirt.
the class JsonObjectSerializerTest method serializeVdsActionParameters.
@Test
public void serializeVdsActionParameters() {
ActionParametersBase params = new ActionParametersBase();
params.setLockProperties(LockProperties.create(Scope.None).withWait(true));
JsonObjectSerializer serializer = new JsonObjectSerializer();
assertTrue(serializer.serialize(params).length() > 0);
}
Aggregations