mirror of
https://github.com/puppetlabs/vmpooler.git
synced 2026-01-26 10:08:40 -05:00
Make all JSON output pretty
This commit is contained in:
parent
026a4a459c
commit
30ebe4249e
1 changed files with 3 additions and 3 deletions
|
|
@ -48,7 +48,7 @@ get '/vm/:template' do
|
||||||
result[params[:template]] = {}
|
result[params[:template]] = {}
|
||||||
result[params[:template]]['hosts'] = $redis.smembers('vmware_host_pool__ready__'+params[:template])
|
result[params[:template]]['hosts'] = $redis.smembers('vmware_host_pool__ready__'+params[:template])
|
||||||
|
|
||||||
result.to_json
|
JSON.pretty_generate(result)
|
||||||
end
|
end
|
||||||
|
|
||||||
post '/vm/:template' do
|
post '/vm/:template' do
|
||||||
|
|
@ -70,7 +70,7 @@ post '/vm/:template' do
|
||||||
result[params[:template]]['hostname'] = vm
|
result[params[:template]]['hostname'] = vm
|
||||||
end
|
end
|
||||||
|
|
||||||
result.to_json
|
JSON.pretty_generate(result)
|
||||||
end
|
end
|
||||||
|
|
||||||
delete '/vm/:hostname' do
|
delete '/vm/:hostname' do
|
||||||
|
|
@ -86,6 +86,6 @@ delete '/vm/:hostname' do
|
||||||
end
|
end
|
||||||
|
|
||||||
result['ok'] = 'true'
|
result['ok'] = 'true'
|
||||||
result.to_json
|
JSON.pretty_generate(result)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue