Skip to content

Commit b128957

Browse files
robertbrekermelwitt
authored andcommitted
Fix nova-manage image_property show unexpected keyword
Reproduction steps: 1. Execute: nova-manage image_property show <vm_uuid> \ hw_vif_multiqueue_enabled 2. Observe: An error has occurred: Traceback (most recent call last): File "/var/lib/kolla/venv/lib/python3.9/ site-packages/nova/cmd/manage.py", line 3394, in main ret = fn(*fn_args, **fn_kwargs) TypeError: show() got an unexpected keyword argument 'property' Change-Id: I1349b880934ad9f44a943cf7de324d7338619d2e Closes-Bug: #2016346 (cherry picked from commit 1c02c0d) (cherry picked from commit fc4b592) (cherry picked from commit 1bbd44e)
1 parent f2adeeb commit b128957

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

nova/cmd/manage.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3195,7 +3195,7 @@ class ImagePropertyCommands:
31953195
'instance_uuid', metavar='<instance_uuid>',
31963196
help='UUID of the instance')
31973197
@args(
3198-
'property', metavar='<image_property>',
3198+
'image_property', metavar='<image_property>',
31993199
help='Image property to show')
32003200
def show(self, instance_uuid=None, image_property=None):
32013201
"""Show value of a given instance image property.
@@ -3213,10 +3213,10 @@ def show(self, instance_uuid=None, image_property=None):
32133213
with context.target_cell(ctxt, im.cell_mapping) as cctxt:
32143214
instance = objects.Instance.get_by_uuid(
32153215
cctxt, instance_uuid, expected_attrs=['system_metadata'])
3216-
image_property = instance.system_metadata.get(
3216+
property_value = instance.system_metadata.get(
32173217
f'image_{image_property}')
3218-
if image_property:
3219-
print(image_property)
3218+
if property_value:
3219+
print(property_value)
32203220
return 0
32213221
else:
32223222
print(f'Image property {image_property} not found '

0 commit comments

Comments
 (0)