Sha256: 0c7a0f9ae4ab41c401642466400ad14986cc68f73ef559fddd472909bca32f74
Contents?: true
Size: 903 Bytes
Versions: 2
Compression:
Stored size: 903 Bytes
Contents
module Fog module Storage class AzureRM # This class provides the actual implemention for service calls. class Real def list_storage_accounts begin promise = @storage_mgmt_client.storage_accounts.list response = promise.value! response.body.value rescue MsRestAzure::AzureOperationError => e msg = "Exception listing Storage Accounts. #{e.body['error']['message']}" raise msg end end end # This class provides the mock implementation for unit tests. class Mock def list_storage_accounts storage_acc = ::Azure::ARM::Storage::Models::StorageAccount.new storage_acc.name = 'fog-test-storage-account' storage_acc.location = 'West US' [storage_acc] end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
fog-azure-rm-0.0.1 | lib/fog/azurerm/requests/storage/list_storage_accounts.rb |
fog-azure-rm-0.0.0 | lib/fog/azurerm/requests/storage/list_storage_accounts.rb |