Search in sources :

Example 21 with Quota

use of org.ovirt.engine.core.common.businessentities.Quota in project ovirt-engine by oVirt.

the class QuotaManagerTest method mockVCPUQuotaGlobalOverGrace.

/**
 * Call by Guid: {@literal VCPU_QUOTA_GLOBAL_OVER_GRACE}
 */
private Quota mockVCPUQuotaGlobalOverGrace() {
    Quota quota = mockBasicQuota();
    quota.setId(VCPU_QUOTA_GLOBAL_OVER_GRACE);
    quota.setGlobalQuotaCluster(getQuotaCluster(100, 132, UNLIMITED_MEM, 0));
    return quota;
}
Also used : Quota(org.ovirt.engine.core.common.businessentities.Quota)

Example 22 with Quota

use of org.ovirt.engine.core.common.businessentities.Quota in project ovirt-engine by oVirt.

the class QuotaManagerTest method mockStorageQuotaSpecificNotExceeded.

// ///////////////////// Storage specific ////////////////////////////
/**
 * Call by Guid: {@literal STORAGE_QUOTA_SPECIFIC_NOT_EXCEEDED}
 */
private Quota mockStorageQuotaSpecificNotExceeded() {
    Quota quota = mockBasicQuota();
    quota.setId(STORAGE_QUOTA_SPECIFIC_NOT_EXCEEDED);
    quota.setQuotaStorages(getQuotaStorages(100, 73));
    return quota;
}
Also used : Quota(org.ovirt.engine.core.common.businessentities.Quota)

Example 23 with Quota

use of org.ovirt.engine.core.common.businessentities.Quota in project ovirt-engine by oVirt.

the class QuotaManagerTest method mockStorageQuotaGlobalOverGrace.

/**
 * Call by Guid: {@literal STORAGE_QUOTA_GLOBAL_OVER_GRACE}
 */
private Quota mockStorageQuotaGlobalOverGrace() {
    Quota quota = mockBasicQuota();
    quota.setId(STORAGE_QUOTA_GLOBAL_OVER_GRACE);
    quota.setGlobalQuotaStorage(getQuotaStorage(100, 140));
    return quota;
}
Also used : Quota(org.ovirt.engine.core.common.businessentities.Quota)

Example 24 with Quota

use of org.ovirt.engine.core.common.businessentities.Quota in project ovirt-engine by oVirt.

the class QuotaManagerTest method mockDefaultQuota.

/**
 * Call by Guid: {@literal DEFAULT_QUOTA_FOR_STORAGE_POOL}
 */
private Quota mockDefaultQuota() {
    Quota quota = mockBasicQuota();
    quota.setId(DEFAULT_QUOTA_FOR_STORAGE_POOL);
    quota.setGlobalQuotaCluster(getQuotaCluster(UNLIMITED_VCPU, 0, UNLIMITED_MEM, 0));
    quota.setGlobalQuotaStorage(getQuotaStorage(UNLIMITED_STORAGE, 0));
    return quota;
}
Also used : Quota(org.ovirt.engine.core.common.businessentities.Quota)

Example 25 with Quota

use of org.ovirt.engine.core.common.businessentities.Quota in project ovirt-engine by oVirt.

the class QuotaManagerTest method mockVCPUQuotaSpecificOverThreshold.

/**
 * Call by Guid: {@literal VCPU_QUOTA_SPECIFIC_OVER_THRESHOLD}
 */
private Quota mockVCPUQuotaSpecificOverThreshold() {
    Quota quota = mockBasicQuota();
    quota.setId(VCPU_QUOTA_SPECIFIC_OVER_THRESHOLD);
    quota.setQuotaClusters(getQuotaClusters(100, 96, UNLIMITED_MEM, 0));
    return quota;
}
Also used : Quota(org.ovirt.engine.core.common.businessentities.Quota)

Aggregations

Quota (org.ovirt.engine.core.common.businessentities.Quota)101 ArrayList (java.util.ArrayList)23 Guid (org.ovirt.engine.core.compat.Guid)22 Test (org.junit.Test)17 QuotaCluster (org.ovirt.engine.core.common.businessentities.QuotaCluster)17 QuotaStorage (org.ovirt.engine.core.common.businessentities.QuotaStorage)16 IdQueryParameters (org.ovirt.engine.core.common.queries.IdQueryParameters)12 HashMap (java.util.HashMap)9 List (java.util.List)9 QueryType (org.ovirt.engine.core.common.queries.QueryType)9 Cluster (org.ovirt.engine.core.common.businessentities.Cluster)8 StorageDomain (org.ovirt.engine.core.common.businessentities.StorageDomain)8 QueryReturnValue (org.ovirt.engine.core.common.queries.QueryReturnValue)8 ActionParametersBase (org.ovirt.engine.core.common.action.ActionParametersBase)6 QuotaCRUDParameters (org.ovirt.engine.core.common.action.QuotaCRUDParameters)6 StoragePool (org.ovirt.engine.core.common.businessentities.StoragePool)6 Map (java.util.Map)5 RepoImage (org.ovirt.engine.core.common.businessentities.storage.RepoImage)5 UICommand (org.ovirt.engine.ui.uicommonweb.UICommand)5 ConfirmationModel (org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel)5