use of org.ovirt.engine.core.common.action.VmNumaNodeOperationParameters in project ovirt-engine by oVirt.
the class UpdateVmCommand method updateVmNumaNodes.
private void updateVmNumaNodes() {
if (!getParameters().isUpdateNuma()) {
return;
}
List<VmNumaNode> newList = getParameters().getVmStaticData().getvNumaNodeList();
VmNumaNodeOperationParameters params = new VmNumaNodeOperationParameters(getParameters().getVm(), new ArrayList<>(newList));
addLogMessages(backend.runInternalAction(ActionType.SetVmNumaNodes, params));
}
use of org.ovirt.engine.core.common.action.VmNumaNodeOperationParameters in project ovirt-engine by oVirt.
the class BackendVmNumaNodeResource method getRemoveParameters.
private ActionParametersBase getRemoveParameters() {
VmNumaNode entity = new VmNumaNode();
entity.setId(guid);
VmNumaNodeOperationParameters parameters = new VmNumaNodeOperationParameters(collection.parentId, entity);
return parameters;
}
use of org.ovirt.engine.core.common.action.VmNumaNodeOperationParameters in project ovirt-engine by oVirt.
the class NumaSupportModel method getUpdateParameters.
/**
* Return a list of action parameters which contain numa pinning updates for different VMs.
* Used when accessing the numa support screen from the host list panel.
* @return List of updated numa configurations
*/
public ArrayList<ActionParametersBase> getUpdateParameters() {
final ArrayList<ActionParametersBase> parameters = new ArrayList<>();
for (Guid vmId : vmsToUpdate) {
final List<VmNumaNode> numaNodes = new ArrayList<>();
for (final VNodeModel model : numaModelsPerVm.get(vmId).values()) {
numaNodes.add(model.toVmNumaNode());
}
parameters.add(new VmNumaNodeOperationParameters(vmId, numaNodes));
}
return parameters;
}
use of org.ovirt.engine.core.common.action.VmNumaNodeOperationParameters in project ovirt-engine by oVirt.
the class AddVmCommand method addVmNumaNodes.
private void addVmNumaNodes() {
List<VmNumaNode> numaNodes = getParameters().getVm().getvNumaNodeList();
if (numaNodes.isEmpty()) {
return;
}
VmNumaNodeOperationParameters params = new VmNumaNodeOperationParameters(getParameters().getVm(), numaNodes);
ActionReturnValue returnValueBase = backend.runInternalAction(ActionType.AddVmNumaNodes, params);
if (!returnValueBase.getSucceeded()) {
auditLogDirector.log(this, AuditLogType.NUMA_ADD_VM_NUMA_NODE_FAILED);
}
}
Aggregations