Sha256: f278d91e7834e7267decf7f77fe6d1658232c96e53401186530169bbd724e52e

Contents?: true

Size: 1 KB

Versions: 47

Compression:

Stored size: 1 KB

Contents

module Fog
  module Compute
    class AzureRM
      # Real class for Compute Request
      class Real
        def delete_vm_extension(resource_group, vm_name, extension_name)
          msg = "Deleting Extension #{extension_name} of Virtual Machine #{vm_name} in Resource Group #{resource_group}"
          Fog::Logger.debug msg
          begin
            @compute_mgmt_client.virtual_machine_extensions.delete(resource_group, vm_name, extension_name)
          rescue MsRestAzure::AzureOperationError => e
            raise_azure_exception(e, msg)
          end
          Fog::Logger.debug "Extension #{extension_name} of Virtual Machine #{vm_name} in Resource Group #{resource_group} deleted successfully"
          true
        end
      end

      # Mock class for Compute Request
      class Mock
        def delete_vm_extension(*)
          Fog::Logger.debug 'Extension extension_name of Virtual Machine vm_name in Resource Group resource_group deleted successfully'
          true
        end
      end
    end
  end
end

Version data entries

47 entries across 47 versions & 4 rubygems

Version Path
fog-azure-rm-0.6.0 lib/fog/azurerm/requests/compute/delete_vm_extension.rb
fog-azure-rm-0.5.3 lib/fog/azurerm/requests/compute/delete_vm_extension.rb
fog-azure-rm-0.5.2 lib/fog/azurerm/requests/compute/delete_vm_extension.rb
far-gem-0.5.6 lib/fog/azurerm/requests/compute/delete_vm_extension.rb
fog-azure-rm-0.5.1 lib/fog/azurerm/requests/compute/delete_vm_extension.rb
far-gem-0.5.5 lib/fog/azurerm/requests/compute/delete_vm_extension.rb
fog-azure-rm-0.5.0 lib/fog/azurerm/requests/compute/delete_vm_extension.rb
far-gem-0.5.4 lib/fog/azurerm/requests/compute/delete_vm_extension.rb
far-gem-0.5.3 lib/fog/azurerm/requests/compute/delete_vm_extension.rb
fog-azure-rm-0.4.9 lib/fog/azurerm/requests/compute/delete_vm_extension.rb
far-gem-0.5.2 lib/fog/azurerm/requests/compute/delete_vm_extension.rb
fog-azure-rm-0.4.8 lib/fog/azurerm/requests/compute/delete_vm_extension.rb
fog-azure-rm-0.4.7 lib/fog/azurerm/requests/compute/delete_vm_extension.rb
fog-azure-rm-0.4.6 lib/fog/azurerm/requests/compute/delete_vm_extension.rb
fog-azure-rm-0.4.5 lib/fog/azurerm/requests/compute/delete_vm_extension.rb
fog-azure-rm-temp-0.0.5 lib/fog/azurerm/requests/compute/delete_vm_extension.rb
fog-azure-rm-0.4.4 lib/fog/azurerm/requests/compute/delete_vm_extension.rb
fog-azure-rm-0.4.3 lib/fog/azurerm/requests/compute/delete_vm_extension.rb
far-gem-0.5.1 lib/fog/azurerm/requests/compute/delete_vm_extension.rb
fog-azure-rm-0.4.2 lib/fog/azurerm/requests/compute/delete_vm_extension.rb