← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1325370] Re: Resources extention mechanism is not used for extensions resources

 

This bug is a mistake.
There is no bug in mechanism.


** Changed in: neutron
       Status: In Progress => Invalid

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

Title:
  Resources extention mechanism is not used for extensions resources

Status in OpenStack Neutron (virtual network service):
  Invalid

Bug description:
  In neutron resources attributes engine, there is a mechanism to expand
  resource's attributes.

  api/extensions.py module ExtensionManager class has extend_resources() function which iterates all extension modules and gets its expansions for existing resources.
  This expanded attributes are merged into the main attributes repository (api/v2/attributes.RESOURCE_ATTRIBUTE_MAP)
  This process takes place when APIRouter (wsgi.Router) is beeing initialized (api/v2/router.py line 77)

  Then creating the ExtensionMiddleware, all extensions are iterated for getting its resources (api/extensions.py line 275).
  ExtensionDescriptor.get_resources() function is implemented by each extension and should return extension's resources dict

  New module called api/v2/resource_helper.py was created lately in order to standardize extensions resource creation.
  This module gets extension resource (passed as a parameter) as they are declared in extension module and constructs Controllers and ResourceExtension objects for them.

  The problem is that attributes definition from extension's module are
  used, instead of main attributes repository
  (api/v2/attributes.RESOURCE_ATTRIBUTE_MAP) which was used for
  attributes expansion.

  resource_helper should try and get extension's collection definition
  from main attributes repository and use it if exists. If it does not
  exist, use the resources definition received from extension.

  This bug(enhancement) was issues while trying to implement new ssl extension for LBaaS service.
  The ssl extension should add new attributes to existing VIP resource of lbaas extension.
  get_extended_resources() function of lbaas extension returns the extension's attributes map
  get_extended_resources()  function of the new ssl extension defines new attributes for lbaas extension's VIP resource and returns it together with it's own resources. This causes the VIP resource in main attributes repository to be extended with new attributes.
  resource_helper module was using the original vip attributes from lbaas extension for building its resource Controller and ResourceExtension objects. It should use updated (extended) vip resource definition from main attributes repository.

  In bottom line, this is a proposal for fixing the issue, to prefer
  updated resource repository, if exists, to the original extension's
  repository

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


References