CLI fails when Connection is refused

Bug #1602214 reported by Alexander Chadin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-watcherclient
Fix Released
Medium
Alexander Stavitskiy

Bug Description

roman@roman:~$ python
>>> from rally import osclients
>>> clients = osclients.Clients.create_from_env()
>>> clients
<rally.osclients.Clients object at 0x7f66908e0710>
>>> clients.watcher()
<watcherclient.v1.client.Client object at 0x7f66908ed190>
>>> watcher.action.list()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/opt/stack/python-watcherclient/watcherclient/v1/action.py", line 75, in list
    return self._list(self._path(path), "actions")
  File "/opt/stack/python-watcherclient/watcherclient/common/base.py", line 121, in _list
    resp, body = self.api.json_request('GET', url)
  File "/opt/stack/python-watcherclient/watcherclient/common/http.py", line 204, in json_request
    resp, body_iter = self._http_request(url, method, **kwargs)
  File "/opt/stack/python-watcherclient/watcherclient/common/http.py", line 168, in _http_request
    raise exc.ConnectionRefused(
AttributeError: 'module' object has no attribute 'ConnectionRefused'

Looks like here is to be used CommunicationError instead.
https://github.com/openstack/python-watcherclient/blob/master/watcherclient/exceptions.py#L21

affects: watcher → python-watcherclient
Changed in python-watcherclient:
milestone: newton-3 → none
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-watcherclient (master)

Fix proposed to branch: master
Review: https://review.openstack.org/340935

Changed in python-watcherclient:
status: New → In Progress
Changed in python-watcherclient:
milestone: none → newton-3
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-watcherclient (master)

Reviewed: https://review.openstack.org/340935
Committed: https://git.openstack.org/cgit/openstack/python-watcherclient/commit/?id=5b914e8877e0a0bd6057cff039f3505b6c58f63d
Submitter: Jenkins
Branch: master

commit 5b914e8877e0a0bd6057cff039f3505b6c58f63d
Author: Alexandr Stavitskiy <email address hidden>
Date: Tue Jul 12 16:09:04 2016 +0300

    Fix for error importing of exception class

    This patch set fixes error while importing of ConnectionRefused
    exception class.

    Change-Id: I4aee677ccc25334ba9bd12633b1c487db2b1dd3e
    Closes-Bug: #1602214

Changed in python-watcherclient:
status: In Progress → Fix Released
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/python-watcherclient 0.24.0

This issue was fixed in the openstack/python-watcherclient 0.24.0 release.

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.