lib/fog/azurerm/storage.rb in fog-azure-rm-0.0.9 vs lib/fog/azurerm/storage.rb in fog-azure-rm-0.1.0

- old
+ new

@@ -15,18 +15,20 @@ recognizes :debug request_path 'fog/azurerm/requests/storage' # Azure Storage Account requests request :create_storage_account + request :update_storage_account request :list_storage_accounts request :delete_storage_account request :get_storage_account request :list_storage_account_for_rg request :check_storage_account_name_availability request :get_storage_access_keys # Azure Storage Disk requests request :delete_disk + request :create_disk # Azure Storage Container requests request :create_container request :release_container_lease request :acquire_container_lease request :delete_container @@ -48,19 +50,36 @@ request :compare_blob request :check_blob_exist request :acquire_blob_lease request :release_blob_lease request :delete_blob + # Azure Recovery Vault requests + request :create_or_update_recovery_vault + request :get_recovery_vault + request :list_recovery_vaults + request :delete_recovery_vault + request :enable_backup_protection + request :set_recovery_vault_context + request :get_backup_protection_policy + request :start_backup + request :get_backup_item + request :get_backup_container + request :disable_backup_protection + request :get_all_backup_jobs + request :get_all_backup_jobs + request :get_backup_job_for_vm model_path 'fog/azurerm/models/storage' model :storage_account collection :storage_accounts model :data_disk model :directory collection :directories model :file collection :files + model :recovery_vault + collection :recovery_vaults # This class provides the mock implementation for unit tests. class Mock def initialize(_options = {}) begin @@ -82,9 +101,14 @@ require 'azure/core/http/debug_filter' if @debug rescue LoadError => e retry if require('rubygems') raise e.message end + + @tenant_id = options[:tenant_id] + @client_id = options[:client_id] + @client_secret = options[:client_secret] + @subscription_id = options[:subscription_id] credentials = Fog::Credentials::AzureRM.get_credentials(options[:tenant_id], options[:client_id], options[:client_secret]) unless credentials.nil? @storage_mgmt_client = ::Azure::ARM::Storage::StorageManagementClient.new(credentials) @storage_mgmt_client.subscription_id = options[:subscription_id]