`openstack image add project` fails with AttributeError for image v2

Bug #1509054 reported by Lin Hua Cheng
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-openstackclient
Fix Released
Medium
Lin Hua Cheng

Bug Description

command: openstack image add project <image> <project>

actual output:

_info
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/cliff/app.py", line 374, in run_subcommand
    result = cmd.run(parsed_args)
  File "/usr/local/lib/python2.7/dist-packages/cliff/display.py", line 92, in run
    column_names, data = self.take_action(parsed_args)
  File "/usr/local/lib/python2.7/dist-packages/openstackclient/image/v2/image.py", line 109, in take_action
    return zip(*sorted(six.iteritems(image_member._info)))
  File "/usr/local/lib/python2.7/dist-packages/warlock/model.py", line 72, in __getattr__
    raise AttributeError(key)
AttributeError: _info
clean_up AddProjectToImage: _info
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/openstackclient/shell.py", line 112, in run
    ret_val = super(OpenStackShell, self).run(argv)
  File "/usr/local/lib/python2.7/dist-packages/cliff/app.py", line 255, in run
    result = self.run_subcommand(remainder)
  File "/usr/local/lib/python2.7/dist-packages/cliff/app.py", line 374, in run_subcommand
    result = cmd.run(parsed_args)
  File "/usr/local/lib/python2.7/dist-packages/cliff/display.py", line 92, in run
    column_names, data = self.take_action(parsed_args)
  File "/usr/local/lib/python2.7/dist-packages/openstackclient/image/v2/image.py", line 109, in take_action
    return zip(*sorted(six.iteritems(image_member._info)))
  File "/usr/local/lib/python2.7/dist-packages/warlock/model.py", line 72, in __getattr__
    raise AttributeError(key)
AttributeError: _info

END return value: 1

heha (zhanghanqun)
Changed in python-openstackclient:
assignee: nobody → heha (zhanghanqun)
Revision history for this message
Steve Martinelli (stevemar) wrote :

lin already started this bug: https://review.openstack.org/#/c/238733/

Changed in python-openstackclient:
importance: Undecided → Medium
status: New → In Progress
assignee: heha (zhanghanqun) → Lin Hua Cheng (lin-hua-cheng)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-openstackclient (master)

Reviewed: https://review.openstack.org/238733
Committed: https://git.openstack.org/cgit/openstack/python-openstackclient/commit/?id=12668b3dababed103c3ad74fee4b7e81d4be1de3
Submitter: Jenkins
Branch: master

commit 12668b3dababed103c3ad74fee4b7e81d4be1de3
Author: lin-hua-cheng <email address hidden>
Date: Thu Oct 22 17:32:45 2015 -0700

    Fix issue when displaying image_member

    image_member doesn't have a _info attribute, glanceclient returns
    warlock object instead of a Resource object.

    Change-Id: If6e7c4bd404454bd6cbe8c111879c1afa1380211
    Closes-Bug: #1509054

Changed in python-openstackclient:
status: In Progress → Fix Committed
summary: - AttributeError: _info when sharing image to other project
+ `openstack image add project` fails with AttributeError
summary: - `openstack image add project` fails with AttributeError
+ `openstack image add project` fails with AttributeError for image v2
Changed in python-openstackclient:
milestone: none → 1.9.0
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.