Sha256: 188de9dd16c303e2d2764a817e5066d90d45d4bda2cf056ba7431e776afd960f
Contents?: true
Size: 995 Bytes
Versions: 1
Compression:
Stored size: 995 Bytes
Contents
module Fog module Storage class AzureRM # This class provides the actual implementation for service calls. class Real def delete_disk(blob_name) msg = "Deleting Disk: #{blob_name}." Fog::Logger.debug msg begin result = delete_blob('vhds', "#{blob_name}.vhd") rescue Azure::Core::Http::HTTPError => e raise_azure_exception(e, msg) end if result.nil? Fog::Logger.debug "Successfully deleted Disk: #{blob_name}." true else Fog::Logger.debug 'Error deleting Disk.' false end end end # This class provides the mock implementation for unit tests. class Mock def delete_disk(*) Fog::Logger.debug 'Deleting Disk: test_blob.' Fog::Logger.debug 'Successfully deleted Disk: test_blob.' true end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
fog-azure-rm-0.1.0 | lib/fog/azurerm/requests/storage/delete_disk.rb |