mirror of
https://github.com/puppetlabs/vmpooler.git
synced 2026-01-26 10:08:40 -05:00
Replace the inaccurate term 'vcloud' with 'vmpooler'
This commit is contained in:
parent
0ec4ba8123
commit
def8510b6d
7 changed files with 271 additions and 271 deletions
10
vmpooler-api
10
vmpooler-api
|
|
@ -38,7 +38,7 @@ get '/' do
|
|||
}
|
||||
end
|
||||
|
||||
get '/dashboard/stats/vcloud/numbers' do
|
||||
get '/dashboard/stats/vmpooler/numbers' do
|
||||
result = Hash.new
|
||||
result['pending'] = 0
|
||||
result['cloning'] = 0
|
||||
|
|
@ -63,7 +63,7 @@ get '/dashboard/stats/vcloud/numbers' do
|
|||
JSON.pretty_generate(result)
|
||||
end
|
||||
|
||||
get '/dashboard/stats/vcloud/pool' do
|
||||
get '/dashboard/stats/vmpooler/pool' do
|
||||
result = Hash.new
|
||||
|
||||
$config[:pools].each do |pool|
|
||||
|
|
@ -77,7 +77,7 @@ get '/dashboard/stats/vcloud/pool' do
|
|||
history ||= Hash.new
|
||||
|
||||
begin
|
||||
buffer = open( 'http://'+$config[:config]['graphite']+'/render?target=vcloud.ready.*&from=-1hour&format=json' ).read
|
||||
buffer = open( 'http://'+$config[:config]['graphite']+'/render?target=vmpooler.ready.*&from=-1hour&format=json' ).read
|
||||
history = JSON.parse( buffer )
|
||||
|
||||
history.each do |pool|
|
||||
|
|
@ -115,7 +115,7 @@ get '/dashboard/stats/vcloud/pool' do
|
|||
JSON.pretty_generate(result)
|
||||
end
|
||||
|
||||
get '/dashboard/stats/vcloud/running' do
|
||||
get '/dashboard/stats/vmpooler/running' do
|
||||
result = Hash.new
|
||||
|
||||
$config[:pools].each do |pool|
|
||||
|
|
@ -130,7 +130,7 @@ get '/dashboard/stats/vcloud/running' do
|
|||
if ( params[:history] )
|
||||
if ( $config[:config]['graphite'] )
|
||||
begin
|
||||
buffer = open( 'http://'+$config[:config]['graphite']+'/render?target=vcloud.running.*&from=-1hour&format=json' ).read
|
||||
buffer = open( 'http://'+$config[:config]['graphite']+'/render?target=vmpooler.running.*&from=-1hour&format=json' ).read
|
||||
JSON.parse( buffer ).each do |pool|
|
||||
if pool['target'] =~ /.*\.(.*)$/
|
||||
pool['name'] = $1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue