use of org.ovirt.engine.core.common.vdscommands.HSMGetStorageDomainInfoVDSCommandParameters in project ovirt-engine by oVirt.
the class BlockStorageDomainHelper method fillMetadataDevicesInfo.
public void fillMetadataDevicesInfo(StorageDomainStatic storageDomainStatic, Guid vdsId) {
try {
@SuppressWarnings("unchecked") StorageDomainStatic domainFromIrs = ((Pair<StorageDomainStatic, Guid>) resourceManager.runVdsCommand(VDSCommandType.HSMGetStorageDomainInfo, new HSMGetStorageDomainInfoVDSCommandParameters(vdsId, storageDomainStatic.getId())).getReturnValue()).getFirst();
storageDomainStatic.setFirstMetadataDevice(domainFromIrs.getFirstMetadataDevice());
storageDomainStatic.setVgMetadataDevice(domainFromIrs.getVgMetadataDevice());
} catch (Exception e) {
storageDomainStatic.setFirstMetadataDevice(null);
storageDomainStatic.setVgMetadataDevice(null);
log.info("Failed to get the domain info");
}
}
use of org.ovirt.engine.core.common.vdscommands.HSMGetStorageDomainInfoVDSCommandParameters in project ovirt-engine by oVirt.
the class AddStoragePoolWithStoragesCommand method isStorageDomainAttachedToStoragePool.
private boolean isStorageDomainAttachedToStoragePool(StorageDomain storageDomain) {
try {
VDSReturnValue vdsReturnValue = runVdsCommand(VDSCommandType.HSMGetStorageDomainInfo, new HSMGetStorageDomainInfoVDSCommandParameters(getVdsId(), storageDomain.getId()));
if (!vdsReturnValue.getSucceeded()) {
logErrorMessage(storageDomain);
}
Pair<StorageDomainStatic, Guid> domainFromIrs = (Pair<StorageDomainStatic, Guid>) vdsReturnValue.getReturnValue();
if (domainFromIrs.getSecond() != null) {
return true;
}
} catch (RuntimeException e) {
logErrorMessage(storageDomain);
}
return false;
}
Aggregations