lib/fog/azurerm/models/storage/storage_accounts.rb in fog-azure-rm-0.0.1 vs lib/fog/azurerm/models/storage/storage_accounts.rb in fog-azure-rm-0.0.2
- old
+ new
@@ -1,10 +1,8 @@
require 'fog/core/collection'
require 'fog/azurerm/models/storage/storage_account'
-# rubocop:disable LineLength
-# rubocop:disable MethodLength
-# rubocop:disable AbcSize
+
module Fog
module Storage
class AzureRM
# This class is giving implementation of all/list, get and
# check name availability for storage account.
@@ -19,12 +17,13 @@
else
hash_of_storage_accounts = service.list_storage_accounts
end
hash_of_storage_accounts.each do |account|
hash = {}
- account.instance_variables.each do |var|
- hash[var.to_s.delete('@')] = account.instance_variable_get(var)
- end
+ hash['name'] = account['name']
+ hash['location'] = account['location']
+ hash['resource_group'] = account['id'].split('/')[4]
+ hash['account_type'] = account['properties']['accountType']
accounts << hash
end
load(accounts)
end