mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-17 18:33:32 +09:00
Feature #1611: Instead of changing negative limits to 0, report the error
This commit is contained in:
1 parent
66182bb23d
commit
5a987f258d
2 files changed
+2
-2
No files matched your search
+1
-1
@@ -182,7 +182,7 @@ private:
|
||||
* @param va limits for the new quota if 0 limits will be 0
|
||||
* @param default_allowed whether or not the limit -1 is allowed
|
||||
*
|
||||
* @return a new attribute representing the quota
|
||||
* @return a new attribute representing the quota, 0 on error
|
||||
*/
|
||||
VectorAttribute * new_quota(VectorAttribute* va, bool default_allowed);
|
||||
|
||||
|
||||
+1
-1
@@ -413,7 +413,7 @@ VectorAttribute * Quota::new_quota(VectorAttribute * va, bool default_allowed)
|
||||
if ( (default_allowed && limit_i < -1) ||
|
||||
(!default_allowed && limit_i < 0) )
|
||||
{
|
||||
limit = "0";
|
||||
return 0;
|
||||
}
|
||||
|
||||
limits.insert(make_pair(metrics[i], limit));
|
||||
|
||||
Reference in new issue
Block a user