Sha256: e85ba6a1acccd10461309ecf71f6b1e82424a9b289e75e3251a7bc4c95ffbf09

Contents?: true

Size: 1014 Bytes

Versions: 47

Compression:

Stored size: 1014 Bytes

Contents

module Fog
  module Network
    class AzureRM
      # Real class for Network Request
      class Real
        def delete_network_security_rule(resource_group, network_security_group_name, security_rule_name)
          msg = "Deleting Network Security Rule #{security_rule_name} in Security Group #{network_security_group_name}"
          Fog::Logger.debug msg

          begin
            @network_client.security_rules.delete(resource_group, network_security_group_name, security_rule_name)
          rescue MsRestAzure::AzureOperationError => e
            raise_azure_exception(e, msg)
          end

          Fog::Logger.debug "Network Security Rule #{security_rule_name} deleted successfully."
          true
        end
      end

      # Mock class for Network Request
      class Mock
        def delete_network_security_rule(*)
          Fog::Logger.debug 'Network Security Rule test-security-rule from Resource group test-rg 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/network/delete_network_security_rule.rb
fog-azure-rm-0.5.3 lib/fog/azurerm/requests/network/delete_network_security_rule.rb
fog-azure-rm-0.5.2 lib/fog/azurerm/requests/network/delete_network_security_rule.rb
far-gem-0.5.6 lib/fog/azurerm/requests/network/delete_network_security_rule.rb
fog-azure-rm-0.5.1 lib/fog/azurerm/requests/network/delete_network_security_rule.rb
far-gem-0.5.5 lib/fog/azurerm/requests/network/delete_network_security_rule.rb
fog-azure-rm-0.5.0 lib/fog/azurerm/requests/network/delete_network_security_rule.rb
far-gem-0.5.4 lib/fog/azurerm/requests/network/delete_network_security_rule.rb
far-gem-0.5.3 lib/fog/azurerm/requests/network/delete_network_security_rule.rb
fog-azure-rm-0.4.9 lib/fog/azurerm/requests/network/delete_network_security_rule.rb
far-gem-0.5.2 lib/fog/azurerm/requests/network/delete_network_security_rule.rb
fog-azure-rm-0.4.8 lib/fog/azurerm/requests/network/delete_network_security_rule.rb
fog-azure-rm-0.4.7 lib/fog/azurerm/requests/network/delete_network_security_rule.rb
fog-azure-rm-0.4.6 lib/fog/azurerm/requests/network/delete_network_security_rule.rb
fog-azure-rm-0.4.5 lib/fog/azurerm/requests/network/delete_network_security_rule.rb
fog-azure-rm-temp-0.0.5 lib/fog/azurerm/requests/network/delete_network_security_rule.rb
fog-azure-rm-0.4.4 lib/fog/azurerm/requests/network/delete_network_security_rule.rb
fog-azure-rm-0.4.3 lib/fog/azurerm/requests/network/delete_network_security_rule.rb
far-gem-0.5.1 lib/fog/azurerm/requests/network/delete_network_security_rule.rb
fog-azure-rm-0.4.2 lib/fog/azurerm/requests/network/delete_network_security_rule.rb