Module: CloudstackClient::StoragePool
- Defined in:
- lib/cloudstack_client/commands/storage_pool.rb
Instance Method Summary collapse
-
#list_storage_pools(args = {}) ⇒ Object
Lists all storage pools.
Instance Method Details
#list_storage_pools(args = {}) ⇒ Object
Lists all storage pools.
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/cloudstack_client/commands/storage_pool.rb', line 8 def list_storage_pools(args = {}) params = { 'command' => 'listStoragePools', } if args[:zone] zone = get_zone(args[:zone]) unless zone puts "Error: Zone #{args[:zone]} not found" exit 1 end params['zoneid'] = zone['id'] end params['keyword'] = args[:keyword] if args[:keyword] params['name'] = args[:name] if args[:name] json = send_request(params) json['storagepool'] || [] end |