mirror of
https://github.com/puppetlabs/vmpooler.git
synced 2026-01-26 10:08:40 -05:00
Report ok = 'false' if API DELETE fails
This commit is contained in:
parent
62c12f9344
commit
616f3eb6f1
1 changed files with 5 additions and 3 deletions
|
|
@ -174,10 +174,12 @@ delete '/vm/:hostname' do
|
||||||
if $redis.sismember('vmware_host_pool__running__'+pool['name'], params[:hostname])
|
if $redis.sismember('vmware_host_pool__running__'+pool['name'], params[:hostname])
|
||||||
$redis.srem('vmware_host_pool__running__'+pool['name'], params[:hostname])
|
$redis.srem('vmware_host_pool__running__'+pool['name'], params[:hostname])
|
||||||
$redis.sadd('vmware_host_pool__completed__'+pool['name'], params[:hostname])
|
$redis.sadd('vmware_host_pool__completed__'+pool['name'], params[:hostname])
|
||||||
|
result['ok'] = true
|
||||||
|
else
|
||||||
|
result['ok'] = false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
result['ok'] = true
|
|
||||||
JSON.pretty_generate(result)
|
JSON.pretty_generate(result)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue