Sha256: 733668d6414b731992cc5cb7f94b7ee1c024fc22aee12a82c7eaf2578b9c07ff

Contents?: true

Size: 959 Bytes

Versions: 46

Compression:

Stored size: 959 Bytes

Contents

module Fog
  module Network
    class AzureRM
      # Real class for Network Request
      class Real
        def list_load_balancers_in_subscription
          msg = 'Getting list of Load-Balancers in subscription'
          Fog::Logger.debug msg
          begin
            load_balancers = @network_client.load_balancers.list_all
          rescue MsRestAzure::AzureOperationError => e
            raise_azure_exception(e, msg)
          end
          Fog::Logger.debug 'Successfully retrieved load balancers in subscription'
          load_balancers
        end
      end

      # Mock class for Network Request
      class Mock
        def list_load_balancers_in_subscription
          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

46 entries across 46 versions & 4 rubygems

Version Path
fog-azure-rm-0.4.1 lib/fog/azurerm/requests/network/list_load_balancers_in_subscription.rb
fog-azure-rm-0.4.0 lib/fog/azurerm/requests/network/list_load_balancers_in_subscription.rb
fog-azure-rm-0.3.9 lib/fog/azurerm/requests/network/list_load_balancers_in_subscription.rb
fog-azure-rm-0.3.8 lib/fog/azurerm/requests/network/list_load_balancers_in_subscription.rb
fog-azure-rm-0.3.7 lib/fog/azurerm/requests/network/list_load_balancers_in_subscription.rb
fog-azure-rm-0.3.6 lib/fog/azurerm/requests/network/list_load_balancers_in_subscription.rb
fog-azure-rm-0.3.5 lib/fog/azurerm/requests/network/list_load_balancers_in_subscription.rb
fog-azure-rm-0.3.4 lib/fog/azurerm/requests/network/list_load_balancers_in_subscription.rb
fog-azure-rm-temp-0.0.4 lib/fog/azurerm/requests/network/list_load_balancers_in_subscription.rb
fog-azure-rm-temp-0.0.3 lib/fog/azurerm/requests/network/list_load_balancers_in_subscription.rb
fog-azure-rm-0.3.3 lib/fog/azurerm/requests/network/list_load_balancers_in_subscription.rb
fog-azure-rm-temp-0.0.2 lib/fog/azurerm/requests/network/list_load_balancers_in_subscription.rb
fog-azure-rm-temp-0.0.1 lib/fog/azurerm/requests/network/list_load_balancers_in_subscription.rb
fog-azure-rm-0.3.2 lib/fog/azurerm/requests/network/list_load_balancers_in_subscription.rb
fog-azure-rm-downgraded-0.3.1 lib/fog/azurerm/requests/network/list_load_balancers_in_subscription.rb
fog-azure-rm-0.3.1 lib/fog/azurerm/requests/network/list_load_balancers_in_subscription.rb
fog-azure-rm-downgraded-0.3.0 lib/fog/azurerm/requests/network/list_load_balancers_in_subscription.rb
fog-azure-rm-0.3.0 lib/fog/azurerm/requests/network/list_load_balancers_in_subscription.rb
fog-azure-rm-0.2.7 lib/fog/azurerm/requests/network/list_load_balancers_in_subscription.rb
fog-azure-rm-0.2.6 lib/fog/azurerm/requests/network/list_load_balancers_in_subscription.rb