Sha256: 4ab564366f9f7d5fc648ef55a5490748a11beb10860d185fae81bf095fdc78ec

Contents?: true

Size: 918 Bytes

Versions: 46

Compression:

Stored size: 918 Bytes

Contents

module Fog
  module Sql
    class AzureRM
      # Real class for Sql Firewall Rule Request
      class Real
        def delete_firewall_rule(resource_group, server_name, rule_name)
          msg = "Deleting SQL Firewall Rule: #{rule_name}."
          Fog::Logger.debug msg

          begin
            @sql_mgmt_client.servers.delete_firewall_rule(resource_group, server_name, rule_name)
          rescue MsRestAzure::AzureOperationError => e
            raise_azure_exception(e, msg)
          end
          Fog::Logger.debug "SQL Firewall Rule: #{rule_name} deleted successfully."
          true
        end
      end

      # Mock class for Sql Firewall Rule Request
      class Mock
        def delete_firewall_rule(*)
          Fog::Logger.debug 'SQL Firewall Rule {name} from SQL Server {server_name}, 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_firewall_rule.rb
fog-azure-rm-0.5.3 lib/fog/azurerm/requests/sql/delete_firewall_rule.rb
fog-azure-rm-0.5.2 lib/fog/azurerm/requests/sql/delete_firewall_rule.rb
far-gem-0.5.6 lib/fog/azurerm/requests/sql/delete_firewall_rule.rb
fog-azure-rm-0.5.1 lib/fog/azurerm/requests/sql/delete_firewall_rule.rb
far-gem-0.5.5 lib/fog/azurerm/requests/sql/delete_firewall_rule.rb
fog-azure-rm-0.5.0 lib/fog/azurerm/requests/sql/delete_firewall_rule.rb
far-gem-0.5.4 lib/fog/azurerm/requests/sql/delete_firewall_rule.rb
far-gem-0.5.3 lib/fog/azurerm/requests/sql/delete_firewall_rule.rb
fog-azure-rm-0.4.9 lib/fog/azurerm/requests/sql/delete_firewall_rule.rb
far-gem-0.5.2 lib/fog/azurerm/requests/sql/delete_firewall_rule.rb
fog-azure-rm-0.4.8 lib/fog/azurerm/requests/sql/delete_firewall_rule.rb
fog-azure-rm-0.4.7 lib/fog/azurerm/requests/sql/delete_firewall_rule.rb
fog-azure-rm-0.4.6 lib/fog/azurerm/requests/sql/delete_firewall_rule.rb
fog-azure-rm-0.4.5 lib/fog/azurerm/requests/sql/delete_firewall_rule.rb
fog-azure-rm-temp-0.0.5 lib/fog/azurerm/requests/sql/delete_firewall_rule.rb
fog-azure-rm-0.4.4 lib/fog/azurerm/requests/sql/delete_firewall_rule.rb
fog-azure-rm-0.4.3 lib/fog/azurerm/requests/sql/delete_firewall_rule.rb
far-gem-0.5.1 lib/fog/azurerm/requests/sql/delete_firewall_rule.rb
fog-azure-rm-0.4.2 lib/fog/azurerm/requests/sql/delete_firewall_rule.rb