mirror of
https://github.com/puppetlabs/vmpooler.git
synced 2026-01-26 18:08:42 -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
|
||||
|
||||
get '/dashboard/stats/vcloud/numbers' do
|
||||
get '/dashboard/stats/vcloud/numbers/?' do
|
||||
result = Hash.new
|
||||
result['pending'] = 0
|
||||
result['cloning'] = 0
|
||||
|
|
@ -62,7 +62,7 @@ get '/dashboard/stats/vcloud/numbers' do
|
|||
JSON.pretty_generate(result)
|
||||
end
|
||||
|
||||
get '/dashboard/stats/vcloud/pool' do
|
||||
get '/dashboard/stats/vcloud/pool/?' do
|
||||
result = Hash.new
|
||||
|
||||
$config[:pools].each do |pool|
|
||||
|
|
@ -114,7 +114,7 @@ get '/dashboard/stats/vcloud/pool' do
|
|||
JSON.pretty_generate(result)
|
||||
end
|
||||
|
||||
get '/dashboard/stats/vcloud/running' do
|
||||
get '/dashboard/stats/vcloud/running/?' do
|
||||
result = Hash.new
|
||||
|
||||
$config[:pools].each do |pool|
|
||||
|
|
@ -163,7 +163,7 @@ get '/dashboard/stats/vcloud/running' do
|
|||
JSON.pretty_generate(result)
|
||||
end
|
||||
|
||||
get '/vm' do
|
||||
get '/vm/?' do
|
||||
content_type :json
|
||||
|
||||
result = []
|
||||
|
|
@ -175,7 +175,7 @@ get '/vm' do
|
|||
JSON.pretty_generate(result)
|
||||
end
|
||||
|
||||
get '/vm/:template' do
|
||||
get '/vm/:template/?' do
|
||||
content_type :json
|
||||
|
||||
result = {}
|
||||
|
|
@ -185,7 +185,7 @@ get '/vm/:template' do
|
|||
JSON.pretty_generate(result)
|
||||
end
|
||||
|
||||
post '/vm/:template' do
|
||||
post '/vm/:template/?' do
|
||||
content_type :json
|
||||
|
||||
result = {}
|
||||
|
|
@ -210,7 +210,7 @@ post '/vm/:template' do
|
|||
JSON.pretty_generate(result)
|
||||
end
|
||||
|
||||
delete '/vm/:hostname' do
|
||||
delete '/vm/:hostname/?' do
|
||||
content_type :json
|
||||
|
||||
result = {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue