Project

General

Profile

Actions

Bug #28134

closed

UserData false is not displayed in image list.

Added by Jitendra Yejare over 4 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Low
Assignee:
Category:
User experience
Target version:
-
Difficulty:
easy
Triaged:
Yes
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.

Actions #1

Updated by Oleh Fedorenko over 4 years ago

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

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`.

Actions #2

Updated by yifat makias over 4 years ago

  • Status changed from New to Assigned
  • Assignee set to yifat makias
Actions #3

Updated by The Foreman Bot over 4 years ago

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

Updated by The Foreman Bot over 4 years ago

  • Fixed in Releases hammer-cli-0.20.0 added
Actions #5

Updated by yifat makias over 4 years ago

  • Status changed from Ready For Testing to Closed
Actions #6

Updated by The Foreman Bot over 4 years ago

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

Updated by Oleh Fedorenko over 4 years ago

  • Fixed in Releases hammer-cli-0.19.2 added
Actions

Also available in: Atom PDF