ceilometer/cmd/alarm.py references undefined method "import_object"

Bug #1362006 reported by wangchy
24
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Ceilometer
Fix Released
Medium
Mehdi Abaakouk
oslo-incubator
Fix Released
Medium
Unassigned

Bug Description

The file imports the module here:
https://github.com/openstack/ceilometer/blob/14b4cdbb5138ea3ab6fb7166de3f70ae85820176/ceilometer/cmd/alarm.py#L18
like this:
====================================
from oslo.utils import importutils
======================================

And calls its method here:
https://github.com/openstack/ceilometer/blob/14b4cdbb5138ea3ab6fb7166de3f70ae85820176/ceilometer/cmd/alarm.py#L18
like this:
=====================================================
eval_service = importutils.import_object(cfg.CONF.alarm.evaluation_service)
=====================================================

While in fact, there's no public method import_object defined in class oslo.utils.importutils from oslo.utils version 0.2.0 (The latest requirement.txt of ceilometer claims requirement for oslo.utils >= 0.2.0)

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

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

Changed in ceilometer:
assignee: nobody → wangchy (wangchy)
status: New → In Progress
Changed in ceilometer:
assignee: wangchy (wangchy) → Mehdi Abaakouk (sileht)
Changed in ceilometer:
assignee: Mehdi Abaakouk (sileht) → wangchy (wangchy)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

Changed in ceilometer:
assignee: wangchy (wangchy) → Mehdi Abaakouk (sileht)
gordon chung (chungg)
Changed in ceilometer:
importance: Undecided → Medium
Revision history for this message
gordon chung (chungg) wrote :

adding oslo to the bug... it doesn't seem right that the methods became private as quite a few of them are not used anywhere now since they're not used internally nor accessible externally.

Revision history for this message
Julien Danjou (jdanjou) wrote :
Ben Nemec (bnemec)
Changed in oslo:
status: New → In Progress
importance: Undecided → Medium
gordon chung (chungg)
Changed in oslo-incubator:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ceilometer (master)

Reviewed: https://review.openstack.org/117198
Committed: https://git.openstack.org/cgit/openstack/ceilometer/commit/?id=30767d7f2b715730fb139292b226c91c5c54bd5b
Submitter: Jenkins
Branch: master

commit 30767d7f2b715730fb139292b226c91c5c54bd5b
Author: Mehdi Abaakouk <email address hidden>
Date: Wed Aug 27 12:59:40 2014 +0200

    Alarm: Use stevedore to load the service class

    A deployer must choice a driver with a name not a python class

    This change does that but also keep backward compatibility.

    DocImpact
    Closes-Bug: #1362006

    Change-Id: I41183b1a0c0f07c15efd6e0704a7a281b8ec7284

Changed in ceilometer:
status: In Progress → Fix Committed
Eoghan Glynn (eglynn)
Changed in ceilometer:
milestone: none → juno-3
Thierry Carrez (ttx)
Changed in ceilometer:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in oslo-incubator:
milestone: none → juno-3
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on ceilometer (master)

Change abandoned by gordon chung (<email address hidden>) on branch: master
Review: https://review.openstack.org/117129
Reason: abandoned for: https://review.openstack.org/#/c/117198/

Thierry Carrez (ttx)
Changed in ceilometer:
milestone: juno-3 → 2014.2
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.