Skip to content

Commit

Permalink
Changed validate_quota method to check individual quota items before …
Browse files Browse the repository at this point in the history
…denying quota.

For Vm Reconfigure, If we add a disk it shouldn't deny because memory, cpus or number of vms is exceeded.

Fixes ManageIQ/manageiq-automation_engine#150
  • Loading branch information
billfitzgerald0120 committed Jul 25, 2018
1 parent 54eb45d commit 2884c17
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ def source_info

def quota_check(item, used, requested, quota_max, quota_warn)
$evm.log(:info, "Item: #{item} Used: (#{used}) Requested: (#{requested}) Max: (#{quota_max}) Warn: (#{quota_warn})")
return unless requested.positive?
return unless quota_max + quota_warn > 0
if quota_exceeded?(item, used, requested, quota_max)
quota_exceeded(item, reason(item, used, requested, quota_max), false)
Expand Down

0 comments on commit 2884c17

Please sign in to comment.