Sha256: 521567bbd51e91768ff64109c00b05bbfe9ba559d67e6afa0d27398a619e4b10

Contents?: true

Size: 1.04 KB

Versions: 53

Compression:

Stored size: 1.04 KB

Contents

module Fog
  module Network
    class AzureRM
      # Real class for Network Request
      class Real
        def list_load_balancers(resource_group)
          msg = "Getting list of Load-Balancers from Resource Group #{resource_group}"
          Fog::Logger.debug msg
          begin
            load_balancers = @network_client.load_balancers.list_as_lazy(resource_group)
          rescue MsRestAzure::AzureOperationError => e
            raise_azure_exception(e, msg)
          end
          Fog::Logger.debug "Successfully retrieved load balancers from Resource Group #{resource_group}"
          load_balancers.value
        end
      end

      # Mock class for Network Request
      class Mock
        def list_load_balancers(_resource_group)
          lb = Azure::ARM::Network::Models::LoadBalancer.new
          lb.name = 'fogtestloadbalancer'
          lb.location = 'West US'
          lb.properties = Azure::ARM::Network::Models::LoadBalancerPropertiesFormat.new
          [lb]
        end
      end
    end
  end
end

Version data entries

53 entries across 53 versions & 4 rubygems

Version Path
fog-azure-rm-0.6.0 lib/fog/azurerm/requests/network/list_load_balancers.rb
fog-azure-rm-0.5.3 lib/fog/azurerm/requests/network/list_load_balancers.rb
fog-azure-rm-0.5.2 lib/fog/azurerm/requests/network/list_load_balancers.rb
far-gem-0.5.6 lib/fog/azurerm/requests/network/list_load_balancers.rb
fog-azure-rm-0.5.1 lib/fog/azurerm/requests/network/list_load_balancers.rb
far-gem-0.5.5 lib/fog/azurerm/requests/network/list_load_balancers.rb
fog-azure-rm-0.5.0 lib/fog/azurerm/requests/network/list_load_balancers.rb
far-gem-0.5.4 lib/fog/azurerm/requests/network/list_load_balancers.rb
far-gem-0.5.3 lib/fog/azurerm/requests/network/list_load_balancers.rb
fog-azure-rm-0.4.9 lib/fog/azurerm/requests/network/list_load_balancers.rb
far-gem-0.5.2 lib/fog/azurerm/requests/network/list_load_balancers.rb
fog-azure-rm-0.4.8 lib/fog/azurerm/requests/network/list_load_balancers.rb
fog-azure-rm-0.4.7 lib/fog/azurerm/requests/network/list_load_balancers.rb
fog-azure-rm-0.4.6 lib/fog/azurerm/requests/network/list_load_balancers.rb
fog-azure-rm-0.4.5 lib/fog/azurerm/requests/network/list_load_balancers.rb
fog-azure-rm-temp-0.0.5 lib/fog/azurerm/requests/network/list_load_balancers.rb
fog-azure-rm-0.4.4 lib/fog/azurerm/requests/network/list_load_balancers.rb
fog-azure-rm-0.4.3 lib/fog/azurerm/requests/network/list_load_balancers.rb
far-gem-0.5.1 lib/fog/azurerm/requests/network/list_load_balancers.rb
fog-azure-rm-0.4.2 lib/fog/azurerm/requests/network/list_load_balancers.rb