Nova devref documentation on hooks is incorrect

Bug #1374666 reported by Lars Kellogg-Stedman
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Low
Lars Kellogg-Stedman

Bug Description

The syntax suggested for adding hooks to nova via setup.py entrypoints is:

    entry_points = {
        'nova.hooks': [
            'resize_hook': your_package.hooks.YourHookClass,
        ]
    },

But this is incorrect. The class name and module name need to be delimited with ':':

    entry_points = {
        'nova.hooks': [
            'resize_hook': your_package.hooks:YourHookClass,
        ]
    },

Follow the example in the existing documentation will result in hooks that never get called.

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

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

Changed in nova:
assignee: nobody → Lars Kellogg-Stedman (larsks)
status: New → In Progress
Changed in nova:
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/124558
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=1345a6a11db4a8ea60d52275bc2efa3b4818546a
Submitter: Jenkins
Branch: master

commit 1345a6a11db4a8ea60d52275bc2efa3b4818546a
Author: Lars Kellogg-Stedman <email address hidden>
Date: Fri Sep 26 22:00:27 2014 -0400

    Fix hook documentation on entry_points config

    The syntax suggested for adding hooks to nova via setup.py entrypoints is:

        entry_points = {
            'nova.hooks': [
                'resize_hook': your_package.hooks.YourHookClass,
            ]
        },

    But this is incorrect. The proper syntax for an entry_points entry is:

        entry_points = {
            'nova.hooks': [
                'resize_hook=your_package.hooks:YourHookClass',
            ]
        },

    Change-Id: Id7bc6891dc542d4317e82e15300c7293eb0d17a0
    Closes-bug: #1374666

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → juno-rc1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: juno-rc1 → 2014.2
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.