mirror of
https://github.com/puppetlabs/vmpooler.git
synced 2026-01-26 10:08:40 -05:00
Add get endpoint for config
This commit is contained in:
parent
c8426b0076
commit
ab0c5b53a0
2 changed files with 22 additions and 0 deletions
|
|
@ -855,6 +855,21 @@ module Vmpooler
|
|||
|
||||
JSON.pretty_generate(result)
|
||||
end
|
||||
|
||||
get "#{api_prefix}/config/?" do
|
||||
content_type :json
|
||||
result = { 'ok' => false }
|
||||
status 404
|
||||
|
||||
if pools
|
||||
result = {
|
||||
'ok' => true,
|
||||
'pool configuration' => pools
|
||||
}
|
||||
status 200
|
||||
end
|
||||
JSON.pretty_generate(result)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue