Skip to content

TargetPool.get_health should return better output #399

@Temikus

Description

@Temikus

Currently:

target_pool.get_health(server.name)
=> {"https://www.googleapis.com/compute/v1/projects/REDACTED/zones/us-central1-f/instances/fog-test-1-testtargetpools-test-get-health"=>
  [{:health_state=>"UNHEALTHY",
    :instance=>"https://www.googleapis.com/compute/v1/projects/REDACTED/zones/us-central1-f/instances/fog-test-1-testtargetpools-test-get-health"}]}

or without parameters

 target_pool.get_health()
=> {"https://www.googleapis.com/compute/v1/projects/REDACTED/zones/us-central1-f/instances/fog-test-1-testtargetpools-test-get-health"=>
  [{:health_state=>"UNHEALTHY",
    :instance=>"https://www.googleapis.com/compute/v1/projects/REDACTED/zones/us-central1-f/instances/fog-test-1-testtargetpools-test-get-health"}],
 "https://www.googleapis.com/compute/v1/projects/REDACTED/zones/us-central1-f/instances/fog-test-2-testtargetpools-test-get-health"=>[]}

Ideally this should just return state:

  • HEALTHY
  • UNHEALTHY
  • UNKNOWN
    , that's it.

Or, at the very least the target_pool.get_health(server.name) should not return the self link twice.

P.S. Notice the '=>[]' for the second instance. Apparently that means "No instance health info was found." That's new to me 😕

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions