Class: HostPoolsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/host_pools_controller.rb

Instance Method Summary collapse

Methods inherited from ApplicationController

#dispatch, #get_locales, #is_dcmgr?, #set_application, #set_locale

Instance Method Details

#indexObject



4
5
# File 'app/controllers/host_pools_controller.rb', line 4

def index
end

#listObject



7
8
9
10
11
12
13
14
# File 'app/controllers/host_pools_controller.rb', line 7

def list
  data = {
    :start => params[:start].to_i - 1,
    :limit => params[:limit]
  }
  host_pools = DcmgrResource::HostPool.list(data)
  respond_with(host_pools[0], :to => [:json])
end

#showObject



16
17
18
19
20
# File 'app/controllers/host_pools_controller.rb', line 16

def show
  host_pool_id = params[:id]
  detail = DcmgrResource::HostPool.show(host_pool_id)
  respond_with(detail,:to => [:json])
end

#show_host_poolsObject



22
23
24
25
# File 'app/controllers/host_pools_controller.rb', line 22

def show_host_pools
  host_pools = DcmgrResource::HostPool.list
  respond_with(host_pools[0],:to => [:json])
end