Do not show a pool as empty in status API when the configured size is 0

This commit is contained in:
kirby@puppetlabs.com 2020-05-13 09:21:56 -07:00
parent f596a989a5
commit a015fd87dc

View file

@ -508,7 +508,7 @@ module Vmpooler
end
# for backwards compatibility, include separate "empty" stats in "status" block
if ready == 0
if ready == 0 && max != 0
result[:status][:empty] ||= []
result[:status][:empty].push(pool['name'])