openstack image list fails

Bug #1269821 reported by Chmouel Boudjnah
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance Client
Fix Released
Undecided
Terry Howe
python-openstackclient
Fix Released
Undecided
Terry Howe

Bug Description

I am not sure if it's a bug in glanceclient or in openstackclient glance image-list work just fine but from openstackclient it fails :

chmouel@ubuntu:GIT/stack/python-openstackclient$ openstack --debug image list
INFO: requests.packages.urllib3.connectionpool Starting new HTTP connection (1): 172.16.129.149
ERROR: cliff.app 'Client_v1' object has no attribute 'json_request'
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/cliff/app.py", line 280, in run_subcommand
    result = cmd.run(parsed_args)
  File "/usr/local/lib/python2.7/dist-packages/cliff/display.py", line 85, in run
    self.produce_output(parsed_args, column_names, data)
  File "/usr/local/lib/python2.7/dist-packages/cliff/lister.py", line 64, in produce_output
    parsed_args,
  File "/usr/local/lib/python2.7/dist-packages/cliff/formatters/table.py", line 35, in emit_list
    first_row = next(data_iter)
  File "/home/chmouel/GIT/stack/python-openstackclient/openstackclient/image/v1/image.py", line 245, in <genexpr>
    return (columns, (utils.get_item_properties(s, columns) for s in data))
  File "/home/chmouel/GIT/stack/python-glanceclient/glanceclient/v1/images.py", line 175, in paginate
    images = self._list(url, "images")
  File "/home/chmouel/GIT/stack/python-glanceclient/glanceclient/common/base.py", line 54, in _list
    resp, body = self.api.json_request('GET', url)
AttributeError: 'Client_v1' object has no attribute 'json_request'
ERROR: openstackclient.shell Traceback (most recent call last):
  File "/home/chmouel/GIT/stack/python-openstackclient/openstackclient/shell.py", line 125, in run
    return super(OpenStackShell, self).run(argv)
  File "/usr/local/lib/python2.7/dist-packages/cliff/app.py", line 215, in run
    result = self.run_subcommand(remainder)
  File "/usr/local/lib/python2.7/dist-packages/cliff/app.py", line 280, in run_subcommand
    result = cmd.run(parsed_args)
  File "/usr/local/lib/python2.7/dist-packages/cliff/display.py", line 85, in run
    self.produce_output(parsed_args, column_names, data)
  File "/usr/local/lib/python2.7/dist-packages/cliff/lister.py", line 64, in produce_output
    parsed_args,
  File "/usr/local/lib/python2.7/dist-packages/cliff/formatters/table.py", line 35, in emit_list
    first_row = next(data_iter)
  File "/home/chmouel/GIT/stack/python-openstackclient/openstackclient/image/v1/image.py", line 245, in <genexpr>
    return (columns, (utils.get_item_properties(s, columns) for s in data))
  File "/home/chmouel/GIT/stack/python-glanceclient/glanceclient/v1/images.py", line 175, in paginate
    images = self._list(url, "images")
  File "/home/chmouel/GIT/stack/python-glanceclient/glanceclient/common/base.py", line 54, in _list
    resp, body = self.api.json_request('GET', url)
AttributeError: 'Client_v1' object has no attribute 'json_request'

Revision history for this message
Terry Howe (thowe-g) wrote :

This is the cause of the problem: https://github.com/openstack/python-glanceclient/commit/24340329cf0abb03533920b6e71014c3a59da482

Not sure ATM what the solution is, but Client used to have that json_request method because is was-a HTTPClient

Terry Howe (thowe-g)
Changed in python-openstackclient:
assignee: nobody → Terry Howe (thowe-g)
status: New → In Progress
Revision history for this message
Terry Howe (thowe-g) wrote :

In case this doesn't automatically link https://review.openstack.org/68188

Revision history for this message
Terry Howe (thowe-g) wrote :
Terry Howe (thowe-g)
Changed in python-glanceclient:
assignee: nobody → Terry Howe (thowe-g)
status: New → In Progress
Revision history for this message
Terry Howe (thowe-g) wrote :

Another glance change did the same thing that I was trying to do https://review.openstack.org/#/c/53158/ and that one went through.

Terry Howe (thowe-g)
Changed in python-glanceclient:
status: In Progress → Fix Committed
Terry Howe (thowe-g)
Changed in python-openstackclient:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-openstackclient (master)

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

commit ecc4fb330dea487b7ac86050eb971d97cea895d6
Author: Terry Howe <email address hidden>
Date: Tue Jan 21 10:45:52 2014 -0700

    Glance client no longer isa http client

    If the client has-a http_client, then is must not be an is-a. This has been tested with the current version of glanceclient and the master branch.

    Closes-Bug: #1269821
    Change-Id: I14d67eb094bfb4c2dbc07106343488298b6a9409

Dean Troyer (dtroyer)
Changed in python-openstackclient:
milestone: none → m3
Dean Troyer (dtroyer)
Changed in python-openstackclient:
status: Fix Committed → Fix Released
Louis Taylor (kragniz)
Changed in python-glanceclient:
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.