ceilometerclient doesn't catch NotFound exceptions in the shell code

Bug #1451833 reported by Juan Antonio Osorio Robles
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-ceilometerclient
Fix Released
Low
Juan Antonio Osorio Robles

Bug Description

This applies for all the code in the v2/shell

commands that rely on issuing a command that will require the usage of _list (such as get) do not recognize the NotFound exception that is being thrown when a certain entity is not found. This is because they except to catch the HTTPNotFound exception from the exc module, and instead what's being thrown is the NotFound exception that comes from the openstack.common.apiclient module.

Changed in python-ceilometerclient:
assignee: nobody → Juan Antonio Osorio Robles (juan-osorio-robles)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-ceilometerclient (master)

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

Changed in python-ceilometerclient:
status: New → In Progress
gordon chung (chungg)
Changed in python-ceilometerclient:
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-ceilometerclient (master)

Reviewed: https://review.openstack.org/180148
Committed: https://git.openstack.org/cgit/openstack/python-ceilometerclient/commit/?id=ec491131546f8a9d50c912d3f8f81587937e50e6
Submitter: Jenkins
Branch: master

commit ec491131546f8a9d50c912d3f8f81587937e50e6
Author: Juan Antonio Osorio Robles <email address hidden>
Date: Tue May 5 15:38:29 2015 +0300

    Catch missing 404 exceptions in client

    Whenever an entity wasn't found, the ceilometerclient would issue a
    NotFound exception. Which is fine, except that it's not the exception
    that was being expected in the client at all. This exception was defined
    in the apiclient in the openstack/common directory. So, instead this
    exception is now being caught in the manager, and now the appropriate
    exception is being raised.

    There were some functions where, if the entity was not to be found, a
    404 exception would be raised, which was never caught by the client
    since it was expecting the function to return None, instead of raising.
    This CR fixes that.

    Closes-Bug: #1451833
    Change-Id: I47b34af2df9c85f86ba1f7f4d7b2951f8d27f96c

Changed in python-ceilometerclient:
status: In Progress → Fix Committed
Changed in python-ceilometerclient:
milestone: none → 1.3.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.