Sha256: 13349aa05d99781b20ece0d22e1bdd5bad4739184170c41f9ffe200d43db0b59

Contents?: true

Size: 840 Bytes

Versions: 47

Compression:

Stored size: 840 Bytes

Contents

module Fog
  module Network
    class AzureRM
      # Real class for Network Request
      class Real
        def delete_virtual_network(resource_group, name)
          msg = "Deleting Virtual Network: #{name}"
          Fog::Logger.debug msg
          begin
            @network_client.virtual_networks.delete(resource_group, name)
          rescue MsRestAzure::AzureOperationError => e
            raise_azure_exception(e, msg)
          end
          Fog::Logger.debug "Virtual Network #{name} deleted successfully."
          true
        end
      end

      # Mock class for Network Request
      class Mock
        def delete_virtual_network(resource_group, name)
          Fog::Logger.debug "Virtual Network #{name} from 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.2.5 lib/fog/azurerm/requests/network/delete_virtual_network.rb
fog-azure-rm-0.2.4 lib/fog/azurerm/requests/network/delete_virtual_network.rb
fog-azure-rm-0.2.3 lib/fog/azurerm/requests/network/delete_virtual_network.rb
fog-azure-rm-0.2.2 lib/fog/azurerm/requests/network/delete_virtual_network.rb
fog-azure-rm-0.2.1 lib/fog/azurerm/requests/network/delete_virtual_network.rb
fog-azure-rm-0.2.0 lib/fog/azurerm/requests/network/delete_virtual_network.rb
fog-azure-rm-0.1.2 lib/fog/azurerm/requests/network/delete_virtual_network.rb