IPA error classes should all inherit from RESTError class

Bug #1410372 reported by Ruby Loo
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ironic
Fix Released
Low
Michael Turek

Bug Description

errors.RESTError sez 'Base class for errors generated in ironic-python-client.'

These errors currently inherit from Exception:
  - ExtensionError
  - UnknownNodeError
  - HardwareManagerNotFound

Should they inherit from RESTError, and if not, maybe that can be made more explicit somehow.

Revision history for this message
Jay Faulkner (jason-oldos) wrote :

AIUI, RESTErrors are ones that are intended to be serialized and shipped back to Ironic. That can only happen after lookup. So I sorta mentally categorized them as "pre-lookup (meaning we don't know what Ironic node we are)" and "post-lookup" (meaning we know what Ironic node we are and are actively heartbeating).

But according to Jim, and this makes sense to me too, all the errors could be made RESTErrors and work just fine. So we should do that.

tags: added: agent low-hanging-fruit
Changed in ironic:
importance: Undecided → Low
status: New → Confirmed
status: Confirmed → Triaged
Michael Turek (mjturek)
Changed in ironic:
assignee: nobody → Michael Turek (mjturek)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ironic-python-agent (master)

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

Changed in ironic:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ironic-python-agent (master)

Reviewed: https://review.openstack.org/148014
Committed: https://git.openstack.org/cgit/openstack/ironic-python-agent/commit/?id=0c4aa3dcf2373aa55ccc87f86dc68e2cfd162bf9
Submitter: Jenkins
Branch: master

commit 0c4aa3dcf2373aa55ccc87f86dc68e2cfd162bf9
Author: Michael Turek <email address hidden>
Date: Fri Jan 16 21:56:03 2015 +0000

    Make all IPA error classes inherit from RESTError

    Currently several IPA error classes inherit from Exception. This
    patch makes the base class of those classes RESTError. These
    error classes are also restructured to initialize in the same
    manner as other classes which inherit from RESTError. Additionally
    test cases are added for these error classes.

    Change-Id: Ie6235e4cc25f072b789b2e72e4592d4cf02bfedc
    Closes-bug: #1410372

Changed in ironic:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in ironic:
milestone: none → kilo-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in ironic:
milestone: kilo-2 → 2015.1.0
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.