Sha256: 0e6bbbbff2cdb118dad09907b0b7d1e633610f34ebf3d60a4507f38a9ce400ff

Contents?: true

Size: 812 Bytes

Versions: 12

Compression:

Stored size: 812 Bytes

Contents

module Fog
  module Compute
    class Google
      class Mock
        def get_target_pool_health(target_pool)
          Fog::Mock.not_implemented
        end
      end

      class Real
        def get_target_pool_health(target_pool)
          api_method = @compute.target_pools.get_health
          parameters = {
            'project' => @project,
            'targetPool' => target_pool.name,
            'region' => target_pool.region.split('/')[-1]
          }

          health_results = target_pool.instances.map do |instance|
            body = { 'instance' => instance }
            resp = build_response(build_result(api_method, parameters, body_object=body))
            [instance, resp.data[:body]['healthStatus']]
          end
          Hash[health_results]
        end
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 3 rubygems

Version Path
vagrant-cloudstack-1.1.0 vendor/bundle/gems/fog-1.22.1/lib/fog/google/requests/compute/get_target_pool_health.rb
ns-fog-1.22.11 lib/fog/google/requests/compute/get_target_pool_health.rb
ns-fog-1.22.10 lib/fog/google/requests/compute/get_target_pool_health.rb
ns-fog-1.22.9 lib/fog/google/requests/compute/get_target_pool_health.rb
ns-fog-1.22.8 lib/fog/google/requests/compute/get_target_pool_health.rb
ns-fog-1.22.7 lib/fog/google/requests/compute/get_target_pool_health.rb
ns-fog-1.22.6 lib/fog/google/requests/compute/get_target_pool_health.rb
fog-1.23.0 lib/fog/google/requests/compute/get_target_pool_health.rb
ns-fog-1.22.4 lib/fog/google/requests/compute/get_target_pool_health.rb
ns-fog-1.22.3 lib/fog/google/requests/compute/get_target_pool_health.rb
ns-fog-1.22.2 lib/fog/google/requests/compute/get_target_pool_health.rb
fog-1.22.1 lib/fog/google/requests/compute/get_target_pool_health.rb