internal: cannot apply standard attributes to sub-resources

Bug #1763347 reported by Thomas Morin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Medium
Thomas Morin

Bug Description

The code for extending the resource map with the standard attributes for a resource declared in api_collections (e.g. [1]), does only work for plain resources, but not for sub-resources (it produces a {'resource': attribute_dict} dictionary, while a {'resource': {'parameters': attribute_dict}} would be required by the code at [2].

This makes it impossible to add standard attributes to sub-resources.

[1] https://github.com/openstack/neutron/blob/a0e0e8b6686b847a4963a6aa6a3224b5768544e6/neutron/extensions/standardattrdescription.py#L51-L55

[2] https://github.com/openstack/neutron/blob/c0c40f8dbc22b7ec3886845a83f19e6ed46af264/neutron/api/extensions.py#L349-L355

Tags: rfe-approved
description: updated
Changed in neutron:
assignee: nobody → Thomas Morin (tmmorin-orange)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

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

Changed in neutron:
status: New → In Progress
Miguel Lavalle (minsel)
Changed in neutron:
importance: Undecided → Medium
tags: added: rfe
Revision history for this message
Miguel Lavalle (minsel) wrote :

We will discuss it during the next Neutron drivers meeting

tags: added: rfe-triaged
removed: rfe
Revision history for this message
Miguel Lavalle (minsel) wrote :

This RFE was discussed and approved during the Neutron Drivers meeting

tags: added: rfe-approved
removed: rfe-triaged
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/560907
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=5179896e771c8c4789c605bad3e2ef188808e831
Submitter: Zuul
Branch: master

commit 5179896e771c8c4789c605bad3e2ef188808e831
Author: Thomas Morin <email address hidden>
Date: Thu Apr 12 15:07:20 2018 +0200

    Allow sub-resources to have standard attributes

    Prior to this change a DB model with standard
    attributes could declare that it was mapping to
    an API resource, but not declare a mapping to a
    sub-resources (see bug 1763347).

    This change allows DB models with standard attributes
    to advertise that they map API *sub*-resources, and
    modifies the code that extends DB resources to support
    these specific declarations.

    Closes-Bug: 1763347
    Needed-By: I77ce46c0f33e2a366076d51ce6586fb3008dc6b1

    Change-Id: I7630aab5e4f38d0fba862adc2426d4a7ca04a679

Changed in neutron:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 13.0.0.0b3

This issue was fixed in the openstack/neutron 13.0.0.0b3 development milestone.

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.