use of org.ovirt.engine.core.common.businessentities.storage.LUNs in project ovirt-engine by oVirt.
the class AddExistingBlockStorageDomainCommand method getLUNsFromVgInfo.
protected List<LUNs> getLUNsFromVgInfo() {
List<LUNs> luns = new ArrayList<>();
VDSReturnValue returnValue;
try {
returnValue = runVdsCommand(VDSCommandType.GetVGInfo, new GetVGInfoVDSCommandParameters(getParameters().getVdsId(), getStorageDomain().getStorage()));
} catch (RuntimeException e) {
log.error("Could not get info for VG ID '{}': {}", getStorageDomain().getStorage(), e.getMessage());
log.debug("Exception", e);
return luns;
}
luns.addAll((ArrayList<LUNs>) returnValue.getReturnValue());
return luns;
}
use of org.ovirt.engine.core.common.businessentities.storage.LUNs 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);
}
use of org.ovirt.engine.core.common.businessentities.storage.LUNs in project ovirt-engine by oVirt.
the class DiskValidatorTest method createLunDisk.
private static LunDisk createLunDisk() {
LunDisk disk = new LunDisk();
LUNs lun = new LUNs();
lun.setLUNId("lun_id");
lun.setLunType(StorageType.ISCSI);
disk.setLun(lun);
return disk;
}
use of org.ovirt.engine.core.common.businessentities.storage.LUNs in project ovirt-engine by oVirt.
the class BackendHostStorageResourceTest method getEntity.
@Override
protected LUNs getEntity(int index) {
LUNs entity = new LUNs();
entity.setLUNId(GUIDS[index].toString());
entity.setLunType(org.ovirt.engine.core.common.businessentities.storage.StorageType.ISCSI);
return entity;
}
use of org.ovirt.engine.core.common.businessentities.storage.LUNs in project ovirt-engine by oVirt.
the class SanStorageModelBase method getPartOfSdLunsMessages.
public ArrayList<String> getPartOfSdLunsMessages() {
ArrayList<String> partOfSdLunsMessages = new ArrayList<>();
UIMessages messages = ConstantsManager.getInstance().getMessages();
for (LunModel lunModel : getAddedLuns()) {
LUNs lun = lunModel.getEntity();
if (lun.getStorageDomainId() != null) {
String reason = messages.lunAlreadyPartOfStorageDomainWarning(lun.getStorageDomainName());
// $NON-NLS-1$ //$NON-NLS-2$
partOfSdLunsMessages.add(lunModel.getLunId() + " (" + reason + ")");
}
}
return partOfSdLunsMessages;
}
Aggregations