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.6.0 lib/fog/azurerm/requests/sql/delete_sql_server.rb
fog-azure-rm-0.5.3 lib/fog/azurerm/requests/sql/delete_sql_server.rb
fog-azure-rm-0.5.2 lib/fog/azurerm/requests/sql/delete_sql_server.rb
far-gem-0.5.6 lib/fog/azurerm/requests/sql/delete_sql_server.rb
fog-azure-rm-0.5.1 lib/fog/azurerm/requests/sql/delete_sql_server.rb
far-gem-0.5.5 lib/fog/azurerm/requests/sql/delete_sql_server.rb
fog-azure-rm-0.5.0 lib/fog/azurerm/requests/sql/delete_sql_server.rb
far-gem-0.5.4 lib/fog/azurerm/requests/sql/delete_sql_server.rb
far-gem-0.5.3 lib/fog/azurerm/requests/sql/delete_sql_server.rb
fog-azure-rm-0.4.9 lib/fog/azurerm/requests/sql/delete_sql_server.rb
far-gem-0.5.2 lib/fog/azurerm/requests/sql/delete_sql_server.rb
fog-azure-rm-0.4.8 lib/fog/azurerm/requests/sql/delete_sql_server.rb
fog-azure-rm-0.4.7 lib/fog/azurerm/requests/sql/delete_sql_server.rb
fog-azure-rm-0.4.6 lib/fog/azurerm/requests/sql/delete_sql_server.rb
fog-azure-rm-0.4.5 lib/fog/azurerm/requests/sql/delete_sql_server.rb
fog-azure-rm-temp-0.0.5 lib/fog/azurerm/requests/sql/delete_sql_server.rb
fog-azure-rm-0.4.4 lib/fog/azurerm/requests/sql/delete_sql_server.rb
fog-azure-rm-0.4.3 lib/fog/azurerm/requests/sql/delete_sql_server.rb
far-gem-0.5.1 lib/fog/azurerm/requests/sql/delete_sql_server.rb
fog-azure-rm-0.4.2 lib/fog/azurerm/requests/sql/delete_sql_server.rb