Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #37975 - Add bootc fields to host info and list #967

Merged
merged 1 commit into from
Nov 12, 2024

Conversation

ianballou
Copy link
Member

Adds optional bootc fields to host list and permanent bootc fields to host info.

To test, hack in some bootc fields in the Foreman console for your hosts. Then, try

hammer host list --fields="bootcfield1","bootcfield2","..."

Use the help text to find the names of the fields.

Then try

hammer host show --id <bootc host>

@qcjames53
Copy link
Contributor

Hi Ian! I was able to verify that the boots fields populate and update properly for hammer host show. The help text looks solid for both hammer host show and hammer host list. Unfortunately, I can't get the running image/booted image bootc field to show despite my best efforts:

quinn@redhat:~/hammer-cli-katello$ hammer host list --fields "name","location","bootc_booted_image"
...
----------------------------------|-----------------
NAME                              | LOCATION        
----------------------------------|-----------------
centos9-stream.redhat.example.com | Default Location
----------------------------------|-----------------
[31] pry(main)> host.content_facet.bootc_booted_image
=> "bar"
quinn@redhat:~/hammer-cli-katello$ hammer host show --id 1
...
bootc Image Information:  
    Running image:          bar
    Running image digest:   
    Staged image:           
    Staged image digest:    
    Available image:        
    Available image digest: 
    Rollback image:         
    Rollback image digest:

@ianballou
Copy link
Member Author

The fields are under "Predefined field sets:" in the help text:

Predefined field sets:
  -------------------------------|-----|---------|-----
  FIELDS                         | ALL | DEFAULT | THIN
  -------------------------------|-----|---------|-----
  Id                             | x   | x       | x
  Name                           | x   | x       | x
  Operating system               | x   | x       |
  Host group                     | x   | x       |
  Ip                             | x   | x       |
  Mac                            | x   | x       |
  Global status                  | x   | x       |
  Organization                   | x   |         |
  Location                       | x   |         |
  Additional information         | x   |         |
  Content view environments      | x   | x       |
  Multi content view environment | x   | x       |
  Security                       | x   |         |
  Bugfix                         | x   |         |
  Enhancement                    | x   |         |
  Running image                  | x   |         |
  Running image digest           | x   |         |
  Staged image                   | x   |         |
  Staged image digest            | x   |         |
  Available image                | x   |         |
  Available image digest         | x   |         |
  Rollback image                 | x   |         |
  Rollback image digest          | x   |         |
  Trace status                   | x   | x       |
  -------------------------------|-----|---------|-----

Copy link
Contributor

@qcjames53 qcjames53 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the info on the incorrect arguments. I was pulling names from the incorrect part of the help text. All new features in hammer work properly. The source looks great to me; I couldn't find anything that needs changing. The unit tests seem to have good coverage. ACKing

@ianballou ianballou merged commit f96ac21 into Katello:main Nov 12, 2024
12 checks passed
@ianballou ianballou deleted the 37975-hammer-bootc branch November 12, 2024 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants