Sha256: 251d9e76881e0c1b3fbf0a03854571d292518f2298d858b94b2f607526755db9

Contents?: true

Size: 1.42 KB

Versions: 47

Compression:

Stored size: 1.42 KB

Contents

module Fog
  module Network
    class AzureRM
      # Real class for Network Request
      class Real
        def list_virtual_network_gateways(resource_group)
          msg = "Getting list of Virtual Network Gateway from Resource Group #{resource_group}."
          Fog::Logger.debug msg
          begin
            network_gateways = @network_client.virtual_network_gateways.list_as_lazy(resource_group)
          rescue MsRestAzure::AzureOperationError => e
            raise_azure_exception(e, msg)
          end
          network_gateways.value
        end
      end

      # Mock class for Network Request
      class Mock
        def list_virtual_network_gateways(*)
          gateway = {
            'value' => [
              {
                'name' => 'myvirtualgateway1',
                'location' => 'West US',
                'tags' => { 'key1' => 'value1' },
                'properties' => {
                  'gatewayType' => 'DynamicRouting',
                  'gatewaySize' => 'Default',
                  'bgpEnabled' => true,
                  'vpnClientAddressPool' => ['{vpnClientAddressPoolPrefix}'],
                  'defaultSites' => ['mysite1']
                }
              }
            ]
          }
          gateway_mapper = Azure::ARM::Network::Models::VirtualNetworkGatewayListResult.mapper
          @network_client.deserialize(gateway_mapper, gateway, 'result.body').value
        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/list_virtual_network_gateways.rb
fog-azure-rm-0.5.3 lib/fog/azurerm/requests/network/list_virtual_network_gateways.rb
fog-azure-rm-0.5.2 lib/fog/azurerm/requests/network/list_virtual_network_gateways.rb
far-gem-0.5.6 lib/fog/azurerm/requests/network/list_virtual_network_gateways.rb
fog-azure-rm-0.5.1 lib/fog/azurerm/requests/network/list_virtual_network_gateways.rb
far-gem-0.5.5 lib/fog/azurerm/requests/network/list_virtual_network_gateways.rb
fog-azure-rm-0.5.0 lib/fog/azurerm/requests/network/list_virtual_network_gateways.rb
far-gem-0.5.4 lib/fog/azurerm/requests/network/list_virtual_network_gateways.rb
far-gem-0.5.3 lib/fog/azurerm/requests/network/list_virtual_network_gateways.rb
fog-azure-rm-0.4.9 lib/fog/azurerm/requests/network/list_virtual_network_gateways.rb
far-gem-0.5.2 lib/fog/azurerm/requests/network/list_virtual_network_gateways.rb
fog-azure-rm-0.4.8 lib/fog/azurerm/requests/network/list_virtual_network_gateways.rb
fog-azure-rm-0.4.7 lib/fog/azurerm/requests/network/list_virtual_network_gateways.rb
fog-azure-rm-0.4.6 lib/fog/azurerm/requests/network/list_virtual_network_gateways.rb
fog-azure-rm-0.4.5 lib/fog/azurerm/requests/network/list_virtual_network_gateways.rb
fog-azure-rm-temp-0.0.5 lib/fog/azurerm/requests/network/list_virtual_network_gateways.rb
fog-azure-rm-0.4.4 lib/fog/azurerm/requests/network/list_virtual_network_gateways.rb
fog-azure-rm-0.4.3 lib/fog/azurerm/requests/network/list_virtual_network_gateways.rb
far-gem-0.5.1 lib/fog/azurerm/requests/network/list_virtual_network_gateways.rb
fog-azure-rm-0.4.2 lib/fog/azurerm/requests/network/list_virtual_network_gateways.rb