Revision cad2422f include/Quota.h
include/Quota.h | ||
---|---|---|
35 | 35 |
/** |
36 | 36 |
* Set the quotas. If the quota previously exists its limit is updated. |
37 | 37 |
* @param quota_str the quota template in ASCII or XML formats |
38 |
* @param default_allowed whether or not the limit -1 is allowed |
|
38 | 39 |
* @param error describe the error in case of error |
40 |
* |
|
39 | 41 |
* @return 0 on success -1 otherwise |
40 | 42 |
*/ |
41 |
int set(vector<Attribute*> * quotas, string& error); |
|
43 |
int set(vector<Attribute*> * quotas, bool default_allowed, string& error);
|
|
42 | 44 |
|
43 | 45 |
/** |
44 | 46 |
* Check if the resource allocation will exceed the quota limits. If not |
... | ... | |
178 | 180 |
* Creates an empty quota based on the given attribute. The attribute va |
179 | 181 |
* contains the limits for the quota. |
180 | 182 |
* @param va limits for the new quota if 0 limits will be 0 |
183 |
* @param default_allowed whether or not the limit -1 is allowed |
|
184 |
* |
|
181 | 185 |
* @return a new attribute representing the quota |
182 | 186 |
*/ |
183 |
VectorAttribute * new_quota(VectorAttribute* va); |
|
187 |
VectorAttribute * new_quota(VectorAttribute* va, bool default_allowed);
|
|
184 | 188 |
|
185 | 189 |
/** |
186 | 190 |
* Adds a new quota, it also updates an internal index for fast accessing |
... | ... | |
204 | 208 |
* Sets new limit values for the quota |
205 | 209 |
* @param quota to be updated |
206 | 210 |
* @param va attribute with the new limits |
211 |
* @param default_allowed whether or not the limit -1 is allowed |
|
212 |
* |
|
207 | 213 |
* @return 0 on success or -1 if wrong limits |
208 | 214 |
*/ |
209 |
int update_limits(VectorAttribute* quota, const VectorAttribute* va); |
|
215 |
int update_limits(VectorAttribute* quota, |
|
216 |
const VectorAttribute* va, |
|
217 |
bool default_allowed); |
|
210 | 218 |
|
211 | 219 |
/** |
212 | 220 |
* Extract the limits for the defined quota metrics from a given attribute |
Also available in: Unified diff