Public bug reported:

Currently [1] resource extensions are asked to retrieve all attributes when 
calling resource_extend.

This poses some problems:
- Extensions need to gather all attributes for the resource they extend
- ML2 mechanism drivers cannot make a difference between list and show of an 
object

We propose to:
A) Add a 'fields' argument to the extensions functions. This 'fields' argument 
is already present when creating the object dictionary, typically passed from 
?fields=x parameters through the api.

Passing it to resource extensions would prevent them from calculating 
attributes that will be discarded anyway.
B) Let the clients when calling the API for list functions, use the 'fields' 
parameters to restrict the fields that are returned.

We think this is a positive improvement as it:
1) Prevents unneeded data transfer between api and client.
2) Provides the ability for extensions that are interfacing with external 
components (like an SDN controller) to only process the requested attributes.

The purpose of this RFE is to gather your comments before we start any
devwork.

Components that would need changing:
- Neutron: resource_extend and all calling functions
- Ml2: extension drivers
(Both needing full backwards compatibility)
- openstackclient & openstack sdk: list api calls need to include ?fields 
parameters
- neutronclient: list api calls need to include ?fields parameters
- neutron-tempest-plugin: new test cases


[1]https://github.com/openstack/neutron/blob/master/neutron/db/_resource_extend.py

** Affects: neutron
     Importance: Undecided
     Assignee: Tom Stappaerts (tstappae)
         Status: New

** Changed in: neutron
     Assignee: (unassigned) => Tom Stappaerts (tstappae)

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

Title:
  [RFE] Extended resources should not always calculate all attributes

Status in neutron:
  New

Bug description:
  
  Currently [1] resource extensions are asked to retrieve all attributes when 
calling resource_extend.

  This poses some problems:
  - Extensions need to gather all attributes for the resource they extend
  - ML2 mechanism drivers cannot make a difference between list and show of an 
object

  We propose to:
  A) Add a 'fields' argument to the extensions functions. This 'fields' 
argument is already present when creating the object dictionary, typically 
passed from ?fields=x parameters through the api.

  Passing it to resource extensions would prevent them from calculating 
attributes that will be discarded anyway.
  B) Let the clients when calling the API for list functions, use the 'fields' 
parameters to restrict the fields that are returned.

  We think this is a positive improvement as it:
  1) Prevents unneeded data transfer between api and client.
  2) Provides the ability for extensions that are interfacing with external 
components (like an SDN controller) to only process the requested attributes.

  The purpose of this RFE is to gather your comments before we start any
  devwork.

  Components that would need changing:
  - Neutron: resource_extend and all calling functions
  - Ml2: extension drivers
  (Both needing full backwards compatibility)
  - openstackclient & openstack sdk: list api calls need to include ?fields 
parameters
  - neutronclient: list api calls need to include ?fields parameters
  - neutron-tempest-plugin: new test cases

  
  
[1]https://github.com/openstack/neutron/blob/master/neutron/db/_resource_extend.py

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

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to     : yahoo-eng-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to