Search in sources :

Example 1 with CreateOvfVolumeForStorageDomainCommandParameters

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

the class ProcessOvfUpdateForStorageDomainCommand method createOvfStoreDisks.

public boolean createOvfStoreDisks(int missingDiskCount) {
    boolean allOvfStoreDisksCreated = true;
    for (int i = 0; i < missingDiskCount; i++) {
        CreateOvfVolumeForStorageDomainCommandParameters parameters = createCreateOvfVolumeForStorageDomainParams();
        ActionReturnValue returnValue = runInternalAction(ActionType.CreateOvfVolumeForStorageDomain, parameters, getContext().clone().withoutLock());
        if (!returnValue.getSucceeded()) {
            allOvfStoreDisksCreated = false;
        }
    }
    return allOvfStoreDisksCreated;
}
Also used : CreateOvfVolumeForStorageDomainCommandParameters(org.ovirt.engine.core.common.action.CreateOvfVolumeForStorageDomainCommandParameters) ActionReturnValue(org.ovirt.engine.core.common.action.ActionReturnValue)

Example 2 with CreateOvfVolumeForStorageDomainCommandParameters

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

the class ProcessOvfUpdateForStorageDomainCommand method createCreateOvfVolumeForStorageDomainParams.

public CreateOvfVolumeForStorageDomainCommandParameters createCreateOvfVolumeForStorageDomainParams() {
    CreateOvfVolumeForStorageDomainCommandParameters parameters = new CreateOvfVolumeForStorageDomainCommandParameters(getParameters().getStoragePoolId(), getParameters().getStorageDomainId());
    parameters.setSkipDomainChecks(getParameters().isSkipDomainChecks());
    parameters.setParentCommand(getActionType());
    parameters.setParentParameters(getParameters());
    parameters.setEndProcedure(EndProcedure.COMMAND_MANAGED);
    return parameters;
}
Also used : CreateOvfVolumeForStorageDomainCommandParameters(org.ovirt.engine.core.common.action.CreateOvfVolumeForStorageDomainCommandParameters)

Aggregations

CreateOvfVolumeForStorageDomainCommandParameters (org.ovirt.engine.core.common.action.CreateOvfVolumeForStorageDomainCommandParameters)2 ActionReturnValue (org.ovirt.engine.core.common.action.ActionReturnValue)1