use of org.ovirt.engine.core.common.vdscommands.ExtendStorageDomainVDSCommandParameters in project ovirt-engine by oVirt.
the class ExtendSANStorageDomainCommand method executeCommand.
@Override
protected void executeCommand() {
executeInNewTransaction(() -> {
setStorageDomainStatus(StorageDomainStatus.Locked, getCompensationContext());
getCompensationContext().stateChanged();
return null;
});
runVdsCommand(VDSCommandType.ExtendStorageDomain, new ExtendStorageDomainVDSCommandParameters(getStoragePoolId(), getStorageDomain().getId(), getParameters().getLunIds(), getParameters().isForce()));
updateLunsList();
executeInNewTransaction(() -> {
for (LUNs lun : getParameters().getLunsList()) {
lunHelper.proceedLUNInDb(lun, getStorageDomain().getStorageType(), getStorageDomain().getStorage());
}
setStorageDomainStatus(StorageDomainStatus.Active, null);
getCompensationContext().cleanupCompensationDataAfterSuccessfulCommand();
return null;
});
setSucceeded(true);
}
Aggregations