Project

General

Profile

Feature #20187

Display host status in Hammer CLI

Added by Will Foster over 1 year ago. Updated 2 months ago.

Status:
Closed
Priority:
High
Assignee:
Category:
Hosts
Target version:
-
Difficulty:
trivial
Triaged:
No
Bugzilla link:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

This is an RFE to include host build status in hammer so it can be queried. We rely heavily on data available from querying hammer cli for the QUADS1 project.
Currently these items can be queried via the API but it would be wonderful to have this in hammer as well.

build_status
build_status_label

Associated revisions

Revision 5183d82b (diff)
Added by Akshay Mendhe 2 months ago

Fixes #20187 - Display Host Status in Hammer

History

#1 Updated by Tomáš Strachota over 1 year ago

  • Category set to Hosts

#2 Updated by Will Foster over 1 year ago

Just adding here, very interested in testing this and getting in place, we rely1 a lot on hammer return values for QUADS2 as Foreman is an integral part of our project.

[1] - https://github.com/redhat-performance/quads/issues/48
[2] - https://github.com/redhat-performance/quads

#3 Updated by Tomáš Strachota over 1 year ago

  • Subject changed from Display Foreman Build Status in Hammer CLI to Display host status in Hammer CLI
  • Priority changed from Normal to High
  • Difficulty set to trivial

We should display all available statuses in hammer host info and the global status in hammer host list.

At the moment it's fine to hardcode the fields in hammer but in future we should find a way of extending the status list from plugins (could be done on API level too, maybe even better to have it there).

API returns following:

"global_status" => 0,
"global_status_label" => "Warning",
"configuration_status" => 0,
"configuration_status_label" => "No reports",
"global_status" => 0,
"global_status_label" => "Error",
"build_status" => 2,
"build_status_label" => "Token expired",

#4 Updated by Marek Hulán over 1 year ago

openscap and rex adds their custom statuses, if the api for registering new status from plugin is not too hard, I think it would be good to add it right away

#5 Updated by Will Foster over 1 year ago

Thanks for updating this RFE, we've worked around this not being in
Hammer via some Python API calls directly that Marek suggested which works for now:

https://github.com/redhat-performance/quads/blob/master/bin/quads-post-system-test.py#L58

(our use case)

We are doing simple queries via existing, automated RBAC roles/filters
we create for each of our Engineering groups so they query their own
set of assigned systems for build status and then we gate our systems
validation off of a successful build=0 status (in our case that would
mean that it kickstarted and reported back to Foreman successfully).

-will

#6 Updated by Rahul Bajaj about 1 year ago

  • Assignee set to Rahul Bajaj

#7 Updated by Rahul Bajaj about 1 year ago

  • Target version set to 220

#8 Updated by Rahul Bajaj about 1 year ago

  • Target version changed from 220 to 230

#9 Updated by Rahul Bajaj 3 months ago

  • Triaged set to No
  • Assignee deleted (Rahul Bajaj)

#10 Updated by Akshay Mendhe 2 months ago

  • Assignee set to Akshay Mendhe

#11 Updated by The Foreman Bot 2 months ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/hammer-cli-foreman/pull/385 added

#12 Updated by Anonymous 2 months ago

  • Status changed from Ready For Testing to Closed

Also available in: Atom PDF