Clean up unused exceptions

Bug #1271283 reported by aeva black
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ironic
Fix Released
Low
aeva black

Bug Description

We should clean up unused exceptions from ironic.common.exceptions, or figure out why they were added and raise them in the appropriate places.

$ cd ironic/ironic
$ for e in $(grep -P '^class ' common/exception.py | sed 's/(/ /' | awk '{print $2}'); do l=$(grep -rP "raise .*\.$e" . | wc -l); if [ $l == 0 ]; then l=$(grep "($e):" common/exception.py | wc -l); fi; if [ $l == 0 ]; then echo $e; fi ; done

AdminRequired
PolicyNotAuthorized
InvalidCPUInfo
InvalidIpAddressError
InvalidDiskFormat
DiskNotFound
HostNotFound
ConsoleNotFound
FileNotFound
NoValidHost
NodeInUse
NodeNotConfigured
ImageNotAuthorized
HTTPException
InvalidEndpoint
CommunicationError

aeva black (tenbrae)
Changed in ironic:
status: New → Triaged
importance: Undecided → Low
tags: added: low-hanging-fruit
description: updated
Michael Davies (mrda)
Changed in ironic:
assignee: nobody → Michael Davies (mrda)
status: Triaged → In Progress
Michael Davies (mrda)
description: updated
Revision history for this message
Michael Davies (mrda) wrote :

I've reviewed the current code and this exception list, and I don't think there's any immediate use for these exceptions.

I'm recommending deleting them.

Revision history for this message
Michael Davies (mrda) wrote :

Actually...

ImageNotAuthorized
InvalidEndpoint
CommunicationError

...are required as are propagated from glance.

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

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

Changed in ironic:
assignee: Michael Davies (mrda) → Joshua Hesketh (joshua.hesketh)
Changed in ironic:
assignee: Joshua Hesketh (joshua.hesketh) → Devananda van der Veen (devananda)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ironic (master)

Reviewed: https://review.openstack.org/68852
Committed: https://git.openstack.org/cgit/openstack/ironic/commit/?id=77ea8ae5a977558dee45a7a0bfc2ea0669de9816
Submitter: Jenkins
Branch: master

commit 77ea8ae5a977558dee45a7a0bfc2ea0669de9816
Author: Michael Davies <email address hidden>
Date: Thu Jan 23 21:42:03 2014 -0800

    Removed unused exceptions

    There's a bunch of exceptions that were copied over from nova-baremetal
    into ironic that are currently unused and don't have any immediate
    applicability.

    Change-Id: Ia5a3c25ca809edcfeaefd423609b43f2658f1870
    Closes-Bug: 1271283

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