Search in sources :

Example 26 with Quota

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

the class QuotaManagerTest method mockVCPUQuotaSpecificNotExceeded.

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

Example 27 with Quota

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

the class QuotaManagerTest method mockStorageQuotaGlobalNotExceeded.

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

Example 28 with Quota

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

the class QuotaManagerTest method mockMemQuotaSpecificOverGrace.

/**
 * Call by Guid: {@literal MEM_QUOTA_SPECIFIC_OVER_GRACE}
 */
private Quota mockMemQuotaSpecificOverGrace() {
    Quota quota = mockBasicQuota();
    quota.setId(MEM_QUOTA_SPECIFIC_OVER_GRACE);
    quota.setQuotaClusters(getQuotaClusters(UNLIMITED_VCPU, 0, 2048, 5000));
    return quota;
}
Also used : Quota(org.ovirt.engine.core.common.businessentities.Quota)

Example 29 with Quota

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

the class QuotaManagerTest method mockVCPUQuotaGlobalInGrace.

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

Example 30 with Quota

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

the class QuotaManagerTest method mockStorageQuotaSpecificOverGrace.

/**
 * Call by Guid: {@literal STORAGE_QUOTA_SPECIFIC_OVER_GRACE}
 */
private Quota mockStorageQuotaSpecificOverGrace() {
    Quota quota = mockBasicQuota();
    quota.setId(STORAGE_QUOTA_SPECIFIC_OVER_GRACE);
    quota.setQuotaStorages(getQuotaStorages(100, 126));
    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