Sha256: 78a139f615dc341ee47b69b106ce7edb63aceb919d5679a4743efb45edee7547

Contents?: true

Size: 827 Bytes

Versions: 27

Compression:

Stored size: 827 Bytes

Contents

module Fog
  module Compute
    class AzureRM
      # Real class for Compute Request
      class Real
        def delete_managed_disk(resource_group_name, disk_name)
          msg = "Deleting Managed Disk: #{disk_name}"
          Fog::Logger.debug msg
          begin
            @compute_mgmt_client.disks.delete(resource_group_name, disk_name)
          rescue MsRestAzure::AzureOperationError => e
            raise_azure_exception(e, msg)
          end
          Fog::Logger.debug "Managed Disk #{disk_name} deleted successfully."
          true
        end
      end

      # Mock class for Compute Request
      class Mock
        def delete_managed_disk(*)
          Fog::Logger.debug 'Managed Disk test-disk from Resource group fog-test-rg deleted successfully.'
          true
        end
      end
    end
  end
end

Version data entries

27 entries across 27 versions & 4 rubygems

Version Path
fog-azure-rm-0.4.8 lib/fog/azurerm/requests/compute/delete_managed_disk.rb
fog-azure-rm-0.4.7 lib/fog/azurerm/requests/compute/delete_managed_disk.rb
fog-azure-rm-0.4.6 lib/fog/azurerm/requests/compute/delete_managed_disk.rb
fog-azure-rm-0.4.5 lib/fog/azurerm/requests/compute/delete_managed_disk.rb
fog-azure-rm-temp-0.0.5 lib/fog/azurerm/requests/compute/delete_managed_disk.rb
fog-azure-rm-0.4.4 lib/fog/azurerm/requests/compute/delete_managed_disk.rb
fog-azure-rm-0.4.3 lib/fog/azurerm/requests/compute/delete_managed_disk.rb
far-gem-0.5.1 lib/fog/azurerm/requests/compute/delete_managed_disk.rb
fog-azure-rm-0.4.2 lib/fog/azurerm/requests/compute/delete_managed_disk.rb
fog-azure-rm-0.4.1 lib/fog/azurerm/requests/compute/delete_managed_disk.rb
fog-azure-rm-0.4.0 lib/fog/azurerm/requests/compute/delete_managed_disk.rb
fog-azure-rm-0.3.9 lib/fog/azurerm/requests/compute/delete_managed_disk.rb
fog-azure-rm-0.3.8 lib/fog/azurerm/requests/compute/delete_managed_disk.rb
fog-azure-rm-0.3.7 lib/fog/azurerm/requests/compute/delete_managed_disk.rb
fog-azure-rm-0.3.6 lib/fog/azurerm/requests/compute/delete_managed_disk.rb
fog-azure-rm-0.3.5 lib/fog/azurerm/requests/compute/delete_managed_disk.rb
fog-azure-rm-0.3.4 lib/fog/azurerm/requests/compute/delete_managed_disk.rb
fog-azure-rm-temp-0.0.4 lib/fog/azurerm/requests/compute/delete_managed_disk.rb
fog-azure-rm-temp-0.0.3 lib/fog/azurerm/requests/compute/delete_managed_disk.rb
fog-azure-rm-0.3.3 lib/fog/azurerm/requests/compute/delete_managed_disk.rb