Ensure domain is included in the reply for post and get ondemandvm when configured

This commit is contained in:
kirby@puppetlabs.com 2020-05-12 11:32:53 -07:00
parent dddbeba4a6
commit 8ffcafdc99
2 changed files with 43 additions and 0 deletions

View file

@ -380,6 +380,7 @@ module Vmpooler
backend.hget('vmpooler__token__' + request.env['HTTP_X_AUTH_TOKEN'], 'user'))
end
result['domain'] = config['domain'] if config['domain']
result[:ok] = true
result
end
@ -951,6 +952,7 @@ module Vmpooler
instances = backend.smembers("vmpooler__#{request_id}__#{pool_alias}__#{pool}")
result[pool_alias] = { 'hostname': instances }
end
result['domain'] = config['domain'] if config['domain']
status 200
elsif request_hash['status'] == 'failed'
result['ready'] = false