← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1528510] Re: Pecan: startup assumes controllers specify plugins

 

Reviewed:  https://review.openstack.org/260439
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=5273c6cc86c403f6f787c5d5d357a28462c9b868
Submitter: Jenkins
Branch:    master

commit 5273c6cc86c403f6f787c5d5d357a28462c9b868
Author: Salvatore Orlando <salv.orlando@xxxxxxxxx>
Date:   Mon Dec 21 16:00:27 2015 -0800

    Pecan: Always associate plugins with resource
    
    with this patch, the logic for associating a resource with a plugin
    is now executed for every resoruce. This will avoid requiring the
    method get_pecan_controllers in extensions descriptors to deal with
    this. This item of work is required for a speedy "Pecanization" of
    existing extensions, in particular the 'router' extension.
    
    The routine for finding a plugin for a resource has been modified to
    allow special treatment of the 'quotas' extension. This extension
    indeed is declared as supported by plugins (usually the core one),
    but the plugin does not implement relevant methods as quota management
    is performed by a distinct driver.
    
    Further, NeutronPecanController's plugin attribute has been
    converted into a property which loads the value from NeutronManager
    if not yet defined. Indeed in some cases the plugin might be
    instantiated after the controller instance is created.
    
    Closes-Bug: #1528510
    
    Change-Id: Ibbfec8fd53855641bd21dec8ef824d5741dfebea


** Changed in: neutron
       Status: In Progress => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1528510

Title:
  Pecan: startup assumes controllers specify plugins

Status in neutron:
  Fix Released

Bug description:
  At startup, the Pecan API server associates a plugin (core or service) to every Neutron resource.
  With this association, every Pecan controller gets a plugin where calls should be dispatched.

  However, this association is not performed for 'pecanized extensions'
  [1]. A 'pecanized' extension is a Neutron API extension which is able
  to return Pecan controllers. The plugin association is instead
  currently performed only for those extensions for which a controller
  is generated on-the-fly using the generic CollectionController and
  ItemController.

  This approach has the drawback that the API extension descriptor should have the logic to identify a plugin for the API itself.
  While this is not a bad idea, it requires extensions descriptors to identify a plugin, thus duplicating, in a way, what's already done by the extension manager.

  For this reason it is advisable to do plugin association for all
  extensions during pecan startup unless until the Pecan framework won't
  rely anymore on the home grown extension manager.


  [1]
  http://git.openstack.org/cgit/openstack/neutron/tree/neutron/pecan_wsgi/startup.py#n86

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1528510/+subscriptions


References