Sha256: 3b2ea4b6dd8efadc7eb31cc8e10e838345c3960affd2bbe409ceed52ddc126b2

Contents?: true

Size: 791 Bytes

Versions: 46

Compression:

Stored size: 791 Bytes

Contents

module Fog
  module Sql
    class AzureRM
      # Real class for Sql Server Request
      class Real
        def delete_sql_server(resource_group, name)
          msg = "Deleting SQL Server: #{name}."
          Fog::Logger.debug msg

          begin
            @sql_mgmt_client.servers.delete(resource_group, name)
          rescue MsRestAzure::AzureOperationError => e
            raise_azure_exception(e, msg)
          end
          Fog::Logger.debug "SQL Server: #{name} deleted successfully."
          true
        end
      end

      # Mock class for Sql Server Request
      class Mock
        def delete_sql_server(*)
          Fog::Logger.debug 'SQL Server {name} from Resource group {resource_group} deleted successfully.'
          true
        end
      end
    end
  end
end

Version data entries

46 entries across 46 versions & 4 rubygems

Version Path
fog-azure-rm-0.4.1 lib/fog/azurerm/requests/sql/delete_sql_server.rb
fog-azure-rm-0.4.0 lib/fog/azurerm/requests/sql/delete_sql_server.rb
fog-azure-rm-0.3.9 lib/fog/azurerm/requests/sql/delete_sql_server.rb
fog-azure-rm-0.3.8 lib/fog/azurerm/requests/sql/delete_sql_server.rb
fog-azure-rm-0.3.7 lib/fog/azurerm/requests/sql/delete_sql_server.rb
fog-azure-rm-0.3.6 lib/fog/azurerm/requests/sql/delete_sql_server.rb
fog-azure-rm-0.3.5 lib/fog/azurerm/requests/sql/delete_sql_server.rb
fog-azure-rm-0.3.4 lib/fog/azurerm/requests/sql/delete_sql_server.rb
fog-azure-rm-temp-0.0.4 lib/fog/azurerm/requests/sql/delete_sql_server.rb
fog-azure-rm-temp-0.0.3 lib/fog/azurerm/requests/sql/delete_sql_server.rb
fog-azure-rm-0.3.3 lib/fog/azurerm/requests/sql/delete_sql_server.rb
fog-azure-rm-temp-0.0.2 lib/fog/azurerm/requests/sql/delete_sql_server.rb
fog-azure-rm-temp-0.0.1 lib/fog/azurerm/requests/sql/delete_sql_server.rb
fog-azure-rm-0.3.2 lib/fog/azurerm/requests/sql/delete_sql_server.rb
fog-azure-rm-downgraded-0.3.1 lib/fog/azurerm/requests/sql/delete_sql_server.rb
fog-azure-rm-0.3.1 lib/fog/azurerm/requests/sql/delete_sql_server.rb
fog-azure-rm-downgraded-0.3.0 lib/fog/azurerm/requests/sql/delete_sql_server.rb
fog-azure-rm-0.3.0 lib/fog/azurerm/requests/sql/delete_sql_server.rb
fog-azure-rm-0.2.7 lib/fog/azurerm/requests/sql/delete_sql_server.rb
fog-azure-rm-0.2.6 lib/fog/azurerm/requests/sql/delete_sql_server.rb