Standard attributes are missing in segment response

Bug #1760902 reported by Hongbin Lu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Low
Hongbin Lu

Bug Description

The response of segment resource doesn't contain standard attributes, i.e. created_at, updated_at, revision_number. These attributes should be visible in the response as other resources.

Hongbin Lu (hongbin.lu)
Changed in neutron:
assignee: nobody → Hongbin Lu (hongbin.lu)
Changed in neutron:
status: New → In Progress
Revision history for this message
Lujin Luo (luo-lujin) wrote :

Hi @Hongbin, yes, we do not have standard attributes in segment resource now. Just out of curiosity, any reason you want to add such information to it. Any specific use cases?

Revision history for this message
Hongbin Lu (hongbin.lu) wrote :

@Lujin,

These information has already been added into the DB table (note that NetworkSegment inherits from HasStandardAttribute [1]). They are just not exposed by the REST API. I see this issue as a bug rather than a feature request.

Revision history for this message
Hongbin Lu (hongbin.lu) wrote :

With that said, I don't have particular use case on segment resource, but I would like to align segment with the rest of the standard API resource. This will improve the consistency of the API which will benefit our users in general.

Revision history for this message
Lujin Luo (luo-lujin) wrote :

@Hongbin, understood. I wanted to mark it as confirmed but if you have already proposed any patches please link it here, and I will keep the status as in progress.

Revision history for this message
Hongbin Lu (hongbin.lu) wrote :
Lujin Luo (luo-lujin)
Changed in neutron:
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/558318
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=4d84c10ba4430752bf8c1227c770fb3c4f0a1618
Submitter: Zuul
Branch: master

commit 4d84c10ba4430752bf8c1227c770fb3c4f0a1618
Author: Hongbin Lu <email address hidden>
Date: Mon Apr 2 23:11:38 2018 +0000

    Add standard attributes to segment resource

    Standard attributes (i.e. revision_number, created_at, updated_at)
    are missing in the segment resource. This is because the controller
    doesn't process extensions on rendering the response. This patch
    fixes it. In particular, this patch does the following:
    * Process extensions when making the segment dict. This allows
      other extensions to add attributes to segment response.
    * Make segment extension implement update_attributes_map.

    Tempest test: https://review.openstack.org/#/c/558609/

    APIImpact update api reference of segments

    Closes-Bug: #1760902
    Change-Id: I3c93818002c2d7753454547231ba08544b6fa1c0

Changed in neutron:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/queens)

Fix proposed to branch: stable/queens
Review: https://review.openstack.org/562298

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on neutron (stable/queens)

Change abandoned by Hongbin Lu (<email address hidden>) on branch: stable/queens
Review: https://review.openstack.org/562298

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to neutron-lib (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/562331

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 13.0.0.0b1

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to neutron (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/567695

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to neutron-lib (master)

Reviewed: https://review.openstack.org/562331
Committed: https://git.openstack.org/cgit/openstack/neutron-lib/commit/?id=9de5b2ee02afc3020dcda1529288deabfbab33e8
Submitter: Zuul
Branch: master

commit 9de5b2ee02afc3020dcda1529288deabfbab33e8
Author: Hongbin Lu <email address hidden>
Date: Wed Apr 18 16:09:33 2018 +0000

    Add a shim extension standard-attr-segment

    Neutron patch: https://review.openstack.org/#/c/562320/

    Change-Id: I34616a01c6fc0617984272d577650420233041e1
    Related-Bug: #1765008
    Related-Bug: #1760902

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on neutron (master)

Change abandoned by Hongbin Lu (<email address hidden>) on branch: master
Review: https://review.openstack.org/567695

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.