mirror of
https://github.com/puppetlabs/vmpooler.git
synced 2026-01-26 01:58:41 -05:00
Ensure 'lifetime' val returned by GET /vm/:hostname is an int
This commit is contained in:
parent
6cd56f40ee
commit
798aa3f9ff
1 changed files with 1 additions and 1 deletions
|
|
@ -452,7 +452,7 @@ module Vmpooler
|
|||
result[params[:hostname]] = {}
|
||||
|
||||
result[params[:hostname]]['template'] = rdata['template']
|
||||
result[params[:hostname]]['lifetime'] = rdata['lifetime'] || Vmpooler::API.settings.config[:config]['vm_lifetime']
|
||||
result[params[:hostname]]['lifetime'] = (rdata['lifetime'] || Vmpooler::API.settings.config[:config]['vm_lifetime']).to_i
|
||||
|
||||
if rdata['destroy']
|
||||
result[params[:hostname]]['running'] = ((Time.parse(rdata['destroy']) - Time.parse(rdata['checkout'])) / 60 / 60).round(2)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue