Merge pull request #30 from sschneid/config_domain

Allow a 'domain' configuration param, returned in JSON response to POST
This commit is contained in:
Branan Purvine-Riley 2014-08-29 11:40:51 -07:00
commit 36fffa381f
2 changed files with 12 additions and 0 deletions

View file

@ -221,6 +221,10 @@ module Vmpooler
result['ok'] = false
end
if ( result['ok'] and $config[:config]['domain'] )
result['domain'] = $config[:config]['domain']
end
JSON.pretty_generate(result)
end
@ -285,6 +289,10 @@ module Vmpooler
result['ok'] = false
end
if ( result['ok'] and $config[:config]['domain'] )
result['domain'] = $config[:config]['domain']
end
JSON.pretty_generate(result)
end

View file

@ -98,6 +98,9 @@
# - vm_lifetime
# How long (in hours) to keep VMs in 'running' queues before destroying.
# (optional; default: '24')
#
# - domain
# If set, returns a top-level 'domain' JSON key in POST requests
# Example:
@ -107,6 +110,7 @@
task_limit: 10
vm_checktime: 15
vm_lifetime: 12
domain: 'company.com'
# :pools:
#