Sha256: 428d43f3d5ebc0f9151c474d92dfb0cc7716abc3cb735fe3b27b36aac7ca8faf

Contents?: true

Size: 1.33 KB

Versions: 14

Compression:

Stored size: 1.33 KB

Contents

module Fog
  module Compute
    class Google
      class Mock
        def get_http_health_check(name)
          http_health_check = data[:http_health_checks][name]
          if http_health_check.nil?
            return build_excon_response("error" => {
                                          "errors" => [
                                            {
                                              "domain" => "global",
                                              "reason" => "notFound",
                                              "message" => "The resource 'projects/#{@project}/global/httpHealthChecks/#{name}' was not found"
                                            }
                                          ],
                                          "code" => 404,
                                          "message" => "The resource 'projects/#{@project}/global/httpHealthChecks/#{name}' was not found"
                                        })
          end
          build_excon_response(http_health_check)
        end
      end

      class Real
        def get_http_health_check(name)
          api_method = @compute.http_health_checks.get
          parameters = {
            "project" => @project,
            "httpHealthCheck" => name
          }

          request(api_method, parameters)
        end
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
fog-google-0.6.0 lib/fog/compute/google/requests/get_http_health_check.rb
fog-google-0.5.5 lib/fog/compute/google/requests/get_http_health_check.rb
fog-google-0.5.4 lib/fog/compute/google/requests/get_http_health_check.rb
fog-google-0.5.3 lib/fog/compute/google/requests/get_http_health_check.rb
fog-google-0.5.2 lib/fog/compute/google/requests/get_http_health_check.rb
fog-google-0.5.1 lib/fog/compute/google/requests/get_http_health_check.rb
fog-google-0.5.0 lib/fog/compute/google/requests/get_http_health_check.rb
fog-google-0.4.2 lib/fog/compute/google/requests/get_http_health_check.rb
fog-google-0.4.1 lib/fog/compute/google/requests/get_http_health_check.rb
fog-google-0.4.0 lib/fog/compute/google/requests/get_http_health_check.rb
fog-google-0.3.2 lib/fog/compute/google/requests/get_http_health_check.rb
fog-google-0.3.1 lib/fog/compute/google/requests/get_http_health_check.rb
fog-google-0.3.0 lib/fog/compute/google/requests/get_http_health_check.rb
fog-google-0.2.0 lib/fog/compute/google/requests/get_http_health_check.rb