mirror of
https://github.com/puppetlabs/vmpooler.git
synced 2026-01-26 18:08:42 -05:00
Merge branch 'api_improvements'
This commit is contained in:
commit
c88961a76f
1 changed files with 3 additions and 7 deletions
|
|
@ -163,17 +163,13 @@ get '/dashboard/stats/vcloud/running' do
|
|||
JSON.pretty_generate(result)
|
||||
end
|
||||
|
||||
get '/status' do
|
||||
get '/vm' do
|
||||
content_type :json
|
||||
|
||||
result = {}
|
||||
result = []
|
||||
|
||||
pools.each do |pool|
|
||||
result[pool['name']] = {}
|
||||
result[pool['name']]['size'] = pool['size']
|
||||
[ 'pending', 'ready', 'completed' ].each do |queue|
|
||||
result[pool['name']][queue] = $redis.scard("vmware_host_pool__#{queue}__#{pool['name']}")
|
||||
end
|
||||
result.push(pool['name'])
|
||||
end
|
||||
|
||||
JSON.pretty_generate(result)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue