mirror of
https://github.com/puppetlabs/vmpooler.git
synced 2026-01-26 10:08:40 -05:00
Allow optional trailing slash
This commit is contained in:
parent
c88961a76f
commit
a4d15b703b
1 changed files with 7 additions and 7 deletions
|
|
@ -37,7 +37,7 @@ get '/' do
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
get '/dashboard/stats/vcloud/numbers' do
|
get '/dashboard/stats/vcloud/numbers/?' do
|
||||||
result = Hash.new
|
result = Hash.new
|
||||||
result['pending'] = 0
|
result['pending'] = 0
|
||||||
result['cloning'] = 0
|
result['cloning'] = 0
|
||||||
|
|
@ -62,7 +62,7 @@ get '/dashboard/stats/vcloud/numbers' do
|
||||||
JSON.pretty_generate(result)
|
JSON.pretty_generate(result)
|
||||||
end
|
end
|
||||||
|
|
||||||
get '/dashboard/stats/vcloud/pool' do
|
get '/dashboard/stats/vcloud/pool/?' do
|
||||||
result = Hash.new
|
result = Hash.new
|
||||||
|
|
||||||
$config[:pools].each do |pool|
|
$config[:pools].each do |pool|
|
||||||
|
|
@ -114,7 +114,7 @@ get '/dashboard/stats/vcloud/pool' do
|
||||||
JSON.pretty_generate(result)
|
JSON.pretty_generate(result)
|
||||||
end
|
end
|
||||||
|
|
||||||
get '/dashboard/stats/vcloud/running' do
|
get '/dashboard/stats/vcloud/running/?' do
|
||||||
result = Hash.new
|
result = Hash.new
|
||||||
|
|
||||||
$config[:pools].each do |pool|
|
$config[:pools].each do |pool|
|
||||||
|
|
@ -163,7 +163,7 @@ get '/dashboard/stats/vcloud/running' do
|
||||||
JSON.pretty_generate(result)
|
JSON.pretty_generate(result)
|
||||||
end
|
end
|
||||||
|
|
||||||
get '/vm' do
|
get '/vm/?' do
|
||||||
content_type :json
|
content_type :json
|
||||||
|
|
||||||
result = []
|
result = []
|
||||||
|
|
@ -175,7 +175,7 @@ get '/vm' do
|
||||||
JSON.pretty_generate(result)
|
JSON.pretty_generate(result)
|
||||||
end
|
end
|
||||||
|
|
||||||
get '/vm/:template' do
|
get '/vm/:template/?' do
|
||||||
content_type :json
|
content_type :json
|
||||||
|
|
||||||
result = {}
|
result = {}
|
||||||
|
|
@ -185,7 +185,7 @@ get '/vm/:template' do
|
||||||
JSON.pretty_generate(result)
|
JSON.pretty_generate(result)
|
||||||
end
|
end
|
||||||
|
|
||||||
post '/vm/:template' do
|
post '/vm/:template/?' do
|
||||||
content_type :json
|
content_type :json
|
||||||
|
|
||||||
result = {}
|
result = {}
|
||||||
|
|
@ -210,7 +210,7 @@ post '/vm/:template' do
|
||||||
JSON.pretty_generate(result)
|
JSON.pretty_generate(result)
|
||||||
end
|
end
|
||||||
|
|
||||||
delete '/vm/:hostname' do
|
delete '/vm/:hostname/?' do
|
||||||
content_type :json
|
content_type :json
|
||||||
|
|
||||||
result = {}
|
result = {}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue