Project

General

Profile

Bug #28134

UserData false is not displayed in image list.

Added by Jitendra Yejare almost 2 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Low
Assignee:
Category:
User experience
Target version:
-
Team Backlog:
Found in Releases:
In Kanboard:

Description

When an image is created with user data false, listing that image using the hammer image list doesnt show anything under USER DATA column.

How Reproducible:
-------------------
Always

Steps:
-------------------
1. Create an image in GCE CR with user data set to false.
2. List all the images in GCE CR.

  1. $ hammer compute-resource image list --compute-resource-id 1

Actual Behavior:
-------------------
The hammer image list shows blank for user-data image set to false.

---|---------------|------------------|---------------|---------------------|----------
ID | NAME | OPERATING SYSTEM | USERNAME | UUID | USER DATA
---|---------------|------------------|---------------|---------------------|----------
2 | gce_gceclloud | rhelcustom 7.6 | jitendracloud | 1238493266994992134 | true
1 | gceImage | rhelcustom 7.6 | jitendra | 4654324179607992309 |
---|---------------|------------------|---------------|---------------------|----------

Expected Behavior:
--------------------
Hammer listing image should show false for an image where user-data is false.

Associated revisions

Revision 7f067753 (diff)
Added by yifat makias almost 2 years ago

Fixes #28134 - fixed UserData false display in image list

Revision 3b1abda4
Added by Ondřej Pražák almost 2 years ago

Merge pull request #319 from yifatmakias/28134

Fixes #28134 - fixed UserData false display in image list

History

#1 Updated by Oleh Fedorenko almost 2 years ago

  • Triaged changed from No to Yes
  • Difficulty set to easy
  • Category changed from Compute resources to User experience

This happens only for table output adapter.

The fix is quite simple:
https://github.com/theforeman/hammer-cli/blob/790653a1d9df093c1d3b89f3c3daf3cadac36760/lib/hammer_cli/output/adapter/table.rb#L91

data_for_field can return false as a value, which is ignored because of ||, thus value becomes an empty string instead of `false`.

#2 Updated by yifat makias almost 2 years ago

  • Assignee set to yifat makias
  • Status changed from New to Assigned

#3 Updated by The Foreman Bot almost 2 years ago

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

#4 Updated by The Foreman Bot almost 2 years ago

  • Fixed in Releases hammer-cli-0.20.0 added

#5 Updated by yifat makias almost 2 years ago

  • Status changed from Ready For Testing to Closed

#6 Updated by The Foreman Bot over 1 year ago

  • Pull request https://github.com/theforeman/hammer-cli/pull/321 added

#7 Updated by Oleh Fedorenko over 1 year ago

  • Fixed in Releases hammer-cli-0.19.2 added

Also available in: Atom PDF