lib/fog/azurerm/requests/storage/create_storage_account.rb in fog-azure-rm-temp-0.0.4 vs lib/fog/azurerm/requests/storage/create_storage_account.rb in fog-azure-rm-temp-0.0.5

- old
+ new

@@ -7,11 +7,12 @@ msg = "Creating Storage Account: #{storage_account_hash[:name]} in Resource Group #{storage_account_hash[:resource_group]}." Fog::Logger.debug msg storage_account_params = get_storage_account_params(storage_account_hash[:sku_name], storage_account_hash[:location], storage_account_hash[:replication], - storage_account_hash[:encryption]) + storage_account_hash[:encryption], + storage_account_hash[:tags]) begin storage_account = @storage_mgmt_client.storage_accounts.create(storage_account_hash[:resource_group], storage_account_hash[:name], storage_account_params) rescue MsRestAzure::AzureOperationError => ex @@ -21,11 +22,11 @@ storage_account end private - def get_storage_account_params(sku_name, location, replication, encryption_enabled) + def get_storage_account_params(sku_name, location, replication, encryption_enabled, tags) params = Azure::ARM::Storage::Models::StorageAccountCreateParameters.new sku = Azure::ARM::Storage::Models::Sku.new sku.name = "#{sku_name}_#{replication}" params.sku = sku params.kind = Azure::ARM::Storage::Models::Kind::Storage @@ -38,9 +39,10 @@ encryption_service.last_enabled_time = Time.new if encryption_service.enabled encryption_services.blob = encryption_service encryption.services = encryption_services params.encryption = encryption end + params.tags = tags params end end # This class provides the mock implementation for unit tests. class Mock