openstack flavor unset NoneType error whn used without --proprty
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-openstackclient |
Fix Released
|
Medium
|
jiaxi |
Bug Description
#openstack flavor create --id auto --ram 4096 --disk 40 --vcpus 4 baremetal
+------
| Field | Value |
+------
| OS-FLV-
| OS-FLV-
| disk | 40 |
| id | 86208670-
| name | baremetal |
| os-flavor-
| ram | 4096 |
| rxtx_factor | 1.0 |
| swap | |
| vcpus | 4 |
+------
# openstack flavor set --property "cpu_arch"="x86_64" --property "capabilities:
+------
| Field | Value |
+------
| OS-FLV-
| OS-FLV-
| disk | 40 |
| id | 86208670-
| name | baremetal |
| os-flavor-
| properties | capabilities:
| ram | 4096 |
| rxtx_factor | 1.0 |
| swap | |
| vcpus | 4 |
+------
# openstack flavor unset baremetal
ERROR: openstack 'NoneType' object is not iterable
The client should fail with `missing argument --property`.
According to the help it is not a required argument.
# openstack help flavor unset
usage: openstack flavor unset [-h] [-f {html,json,
The help also needs to be updated.
The exception.:
DEBUG: openstackclient
ERROR: openstackclient
File "/usr/lib/
return super(OpenStack
File "/usr/lib/
result = self.run_
File "/usr/lib/
result = cmd.run(
File "/usr/lib/
column_names, data = self.take_
File "/usr/lib/
resource_
File "/usr/lib/
for k in keys:
TypeError: 'NoneType' object is not iterable
Changed in python-openstackclient: | |
assignee: | nobody → jiaxi (tjxiter) |
Changed in python-openstackclient: | |
status: | Confirmed → In Progress |
Changed in python-openstackclient: | |
status: | In Progress → Fix Committed |
Changed in python-openstackclient: | |
milestone: | none → 1.6.0 |
status: | Fix Committed → Fix Released |
diff --git a/openstackclie nt/compute/ v2/flavor. py b/openstackclie nt/compute/ v2/flavor. py nt/compute/ v2/flavor. py nt/compute/ v2/flavor. py show.ShowOne) :
parser. add_argument(
" --property" ,
metavar= "<key>" ,
action= 'append' ,
help= 'Property to remove from flavor '
'(repeat option to unset multiple properties)',
index eb18a43..50a9fdf 100644
--- a/openstackclie
+++ b/openstackclie
@@ -292,6 +292,7 @@ class UnsetFlavor(
+ required=True,