SessionClient should not raise exception when status code >=400

Bug #1376171 reported by Cedric Brandily
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-neutronclient
Fix Released
High
Cedric Brandily

Bug Description

Currently SessionClient raises an exception when status code >= 400 unlike HTTPClient. neutronclient.v2_0.client expects HTTPClient behavior.

In practice, when using neutron command, specific messages returned by neutron are hidden:

$# neutron net-create oups --router:external # using a non-admin user

With SessionClient:
>> Forbidden (HTTP 403) (Request-ID: req-0bc1c823-2a37-4c17-b85b-d87239dc2c28)

with HTTPClient:
>> Policy doesn't allow create_network to be performed.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-neutronclient (master)

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

Changed in python-neutronclient:
assignee: nobody → Cedric Brandily (cbrandily)
status: New → In Progress
Akihiro Motoki (amotoki)
Changed in python-neutronclient:
milestone: none → 2.3.9
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-neutronclient (master)

Reviewed: https://review.openstack.org/125289
Committed: https://git.openstack.org/cgit/openstack/python-neutronclient/commit/?id=bb4a0dc8a542344957dada4d6d21748fa0580bdc
Submitter: Jenkins
Branch: master

commit bb4a0dc8a542344957dada4d6d21748fa0580bdc
Author: Cedric Brandily <email address hidden>
Date: Tue Sep 30 22:22:50 2014 +0200

    Correct 4xx/5xx response management in SessionClient

    Currently SessionClient raises an exception when status code >= 400
    unlike HTTPClient. neutronclient.v2_0.client expects HTTPClient
    behavior.

    This change disables exception raise when status code >= 400 in
    SessionClient (more precisely in keystoneclient.session).

    Change-Id: Ic96cb9326842f0b6a180fd8f94293da9fa0f6b2f
    Closes-Bug: #1376171

Changed in python-neutronclient:
status: In Progress → Fix Committed
Kyle Mestery (mestery)
Changed in python-neutronclient:
milestone: 2.3.9 → 2.3.10
Akihiro Motoki (amotoki)
Changed in python-neutronclient:
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.