Ironic list commands returned with a subset of a resource attributes should be consistent type on valid fields input.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-ironicclient |
In Progress
|
Medium
|
haris |
Bug Description
Take 'node' as an example, the valid fields are as follows:
Valid fields are: chassis_uuid, created_at, clean_step, console_enabled, driver, driver_info, driver_
But when using the fields in resource.lables such as 'UUID' instead of 'uuid' in resource.fileds, there will be an error like:
ubuntu@
usage: ironic node-list [--limit <limit>] [--marker <node>]
ironic node-list: error: Invalid field(s) requested: UUID. Valid fields are: chassis_uuid, created_at, clean_step, console_enabled, driver, driver_info, driver_
When using the correct field 'uuid', the output is like:
ubuntu@
+------
| UUID |
+------
| 0a1d4968-
| a62fb720-
| 7feb31d8-
+------
So, although the output is shown as 'UUID', it can not be used in the fields arguments.
Comparing with the 'sort-key' arguments in list command:
ubuntu@
usage: ironic node-list [--limit <limit>] [--marker <node>]
ironic node-list: error: abc is an invalid field for sorting, valid values for --sort-key are: ['target_
The error info shows the valid values containing resource.fields and resource.labels.
So, for 'fields' argument, the error info of valid fields should contain both resource.fields and resource.labels, just like 'sort-key' does.
The commands are:
chassis-list
chassis-node-list
node-list
node-port-list
port-list
chassis-show
node-show
port-show
Changed in python-ironicclient: | |
assignee: | nobody → Kan (kansks) |
description: | updated |
description: | updated |
Changed in python-ironicclient: | |
importance: | Undecided → Medium |
Changed in python-ironicclient: | |
status: | In Progress → Triaged |
assignee: | Kan (kansks) → nobody |
tags: | added: low-hanging-fruit |
Changed in python-ironicclient: | |
assignee: | nobody → Harish Kumar (hkumarmk) |
Changed in python-ironicclient: | |
assignee: | Harish Kumar (hkumarmk) → nobody |
Changed in python-ironicclient: | |
assignee: | nobody → haris (haristanvir) |
Changed in python-ironicclient: | |
assignee: | haris (haristanvir) → nobody |
Changed in python-ironicclient: | |
assignee: | nobody → haris (haristanvir) |
Fix proposed to branch: master /review. openstack. org/245541
Review: https:/