Class: StoragePoolsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/storage_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/storage_pools_controller.rb', line 4

def index
end

#listObject



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

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

#showObject



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

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

#show_storage_poolsObject



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

def show_storage_pools
  storage_pools = DcmgrResource::StoragePool.list
  respond_with(storage_pools[0],:to => [:json])
end