Sha256: 556c229381778100da4bcef4d3c05d5534b43b5cb8a02a918c9f0a6eb2fbe59f

Contents?: true

Size: 1004 Bytes

Versions: 6

Compression:

Stored size: 1004 Bytes

Contents

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

      # Mock class for Network Request
      class Mock
        def delete_subnet(resource_group, name, virtual_network_name)
          Fog::Logger.debug "Subnet #{name} of Virtual Network #{virtual_network_name} from Resource group #{resource_group} deleted successfully."
          true
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
fog-azure-rm-0.1.1 lib/fog/azurerm/requests/network/delete_subnet.rb
fog-azure-rm-0.1.0 lib/fog/azurerm/requests/network/delete_subnet.rb
fog-azure-rm-0.0.9 lib/fog/azurerm/requests/network/delete_subnet.rb
fog-azure-rm-0.0.8 lib/fog/azurerm/requests/network/delete_subnet.rb
fog-azure-rm-0.0.6 lib/fog/azurerm/requests/network/delete_subnet.rb
fog-azure-rm-0.0.5 lib/fog/azurerm/requests/network/delete_subnet.rb