[fuel-pythonclient] Client calls `exit()' if getter didn't find resource

Bug #1454343 reported by Timur Nurlygayanov
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Released
High
Roman Prykhodchenko

Bug Description

If any get_by_id() call gets 404 response, then exit() call is executed - this is very unconvenient behavior for usage fuelclient from python. Actually we can not use get_by_id() at all since response `Not Found' closes python process immediately. Expected (and common) behavior is having some exception raised.

Link:
https://www.google.com/url?q=https%3A%2F%2Fgithub.com%2Fstackforge%2Fpython-fuelclient%2Fblob%2Faf6c9c3799b9ec107bcdc6dbf035cafc034526ce%2Ffuelclient%2Fcli%2Ferror.py%23L26

Changed in fuel:
importance: Undecided → Medium
Dmitry Pyzhov (dpyzhov)
Changed in fuel:
milestone: none → 7.0
tags: added: module-client
Changed in fuel:
status: New → Confirmed
assignee: nobody → Fuel Python Team (fuel-python)
Dmitry Pyzhov (dpyzhov)
Changed in fuel:
importance: Medium → High
Revision history for this message
Łukasz Oleś (loles) wrote :

It's not a bug but a design decision. We need a blueprint for fuelclient changes. I will create it on Monday.

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

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

Changed in fuel:
assignee: Fuel Python Team (fuel-python) → Roman Prykhodchenko (romcheg)
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

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

Reviewed: https://review.openstack.org/202444
Committed: https://git.openstack.org/cgit/stackforge/python-fuelclient/commit/?id=f85a6eecbb4e0a4c2638dc6a38e2f1e11a5ddec2
Submitter: Jenkins
Branch: master

commit f85a6eecbb4e0a4c2638dc6a38e2f1e11a5ddec2
Author: Roman Prykhodchenko <email address hidden>
Date: Thu Jul 16 10:57:56 2015 +0200

    Run library unit tests against realistic data

    This patch removes exit() calls from the HTTP Client
    in order to uncover data processing errors. It configures
    mocks to supply realistic data for specific requests and
    to fail, on any unexpected ones.

    Closes-bug: #1454343
    Closes-bug: #1475642
    Change-Id: I462702faa5c09fa743de1cbcd56b87757e1095a3

Changed in fuel:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on python-fuelclient (master)

Change abandoned by Roman Prykhodchenko (<email address hidden>) on branch: master
Review: https://review.openstack.org/186691
Reason: This patch is supressed

Changed in fuel:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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