Search in sources :

Example 1 with GetStorageDomainStatsVDSCommandParameters

use of org.ovirt.engine.core.common.vdscommands.GetStorageDomainStatsVDSCommandParameters in project ovirt-engine by oVirt.

the class StorageDomainCommandBase method updateStorageDomainDynamicFromIrs.

protected void updateStorageDomainDynamicFromIrs() {
    final StorageDomain sd = (StorageDomain) runVdsCommand(VDSCommandType.GetStorageDomainStats, new GetStorageDomainStatsVDSCommandParameters(getVds().getId(), getStorageDomain().getId())).getReturnValue();
    TransactionSupport.executeInNewTransaction(() -> {
        getCompensationContext().snapshotEntity(getStorageDomain().getStorageDynamicData());
        storageDomainDynamicDao.update(sd.getStorageDynamicData());
        getCompensationContext().stateChanged();
        return null;
    });
}
Also used : StorageDomain(org.ovirt.engine.core.common.businessentities.StorageDomain) GetStorageDomainStatsVDSCommandParameters(org.ovirt.engine.core.common.vdscommands.GetStorageDomainStatsVDSCommandParameters)

Aggregations

StorageDomain (org.ovirt.engine.core.common.businessentities.StorageDomain)1 GetStorageDomainStatsVDSCommandParameters (org.ovirt.engine.core.common.vdscommands.GetStorageDomainStatsVDSCommandParameters)1