Search in sources :

Example 31 with Quota

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

the class QuotaManagerTest method mockVCPUQuotaGlobalOverThreshold.

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

Example 32 with Quota

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

the class QuotaManagerTest method mockVCPUQuotaSpecificInGrace.

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

Example 33 with Quota

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

the class QuotaManagerTest method mockMemQuotaGlobalOverThreshold.

/**
 * Call by Guid: {@literal MEM_QUOTA_GLOBAL_OVER_THRESHOLD}
 */
private Quota mockMemQuotaGlobalOverThreshold() {
    Quota quota = mockBasicQuota();
    quota.setId(MEM_QUOTA_GLOBAL_OVER_THRESHOLD);
    quota.setGlobalQuotaCluster(getQuotaCluster(UNLIMITED_VCPU, 0, 2048, 1900));
    return quota;
}
Also used : Quota(org.ovirt.engine.core.common.businessentities.Quota)

Example 34 with Quota

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

the class QuotaManagerTest method mockVCPUQuotaSpecificOverGrace.

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

Example 35 with Quota

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

the class QuotaManagerTest method mockStorageQuotaGlobalInGrace.

/**
 * Call by Guid: {@literal STORAGE_QUOTA_GLOBAL_IN_GRACE}
 */
private Quota mockStorageQuotaGlobalInGrace() {
    Quota quota = mockBasicQuota();
    quota.setId(STORAGE_QUOTA_GLOBAL_IN_GRACE);
    quota.setGlobalQuotaStorage(getQuotaStorage(100, 104));
    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