[RFE] Tag mechanism supports all resouces with standard attribute.

Bug #1682775 reported by Na Zhu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Wishlist
Hirofumi Ichihara

Bug Description

Currently, neutron resources network, subnet, subnetpool, port, and routers support tag, floatingip does not support tag. Tag is useful for floatingip, users can use floatingip tag to identify what applications the floatingip are used for.

Add tag to floatingip is useful.

Tags: rfe-approved
Akihiro Motoki (amotoki)
Changed in neutron:
importance: Undecided → Wishlist
status: New → Confirmed
Revision history for this message
Hirofumi Ichihara (ichihara-hirofumi) wrote :

I think that tagging should support all resources.

Changed in neutron:
assignee: nobody → Hirofumi Ichihara (ichihara-hirofumi)
Revision history for this message
Akihiro Motoki (amotoki) wrote :

Agree. I think tagging should be supported for all resources like other standard attributes. I am not sure there are resources which the tag mechanism does not fit.

Revision history for this message
Hirofumi Ichihara (ichihara-hirofumi) wrote :

Tag mechanism provides an identifier to specific resource in many resources so I think that tag mechanism doesn't fit network resource which has one resource only. Now there isn't such resource in resouces supporting standard sttribute.

summary: - floatingip support tag
+ [RFE] Tag mechanism supports all resouces with standard attribute.
Revision history for this message
zhaobo (zhaobo6) wrote :

It's good to go. :)

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/460391

Changed in neutron:
status: Confirmed → In Progress
Revision history for this message
Hirofumi Ichihara (ichihara-hirofumi) wrote :

There is a project depends on 'tag' and 'tag-ext' extension[1]. I have a plan that I'll add new extension supports standardattr resources except resources supported by 'tag' and 'tag-ext' and then I'll remove 'tag' and 'tag-ext' once we remove the dependency on two old extensions from Kuryr.

[1]: http://git.openstack.org/cgit/openstack/kuryr-libnetwork/tree/kuryr_libnetwork/controllers.py#n75

Revision history for this message
Akihiro Motoki (amotoki) wrote :

I am fine with the direction to support tag for all resources.

On the other hand, status "In Progress" is out of radar of the drivers team. I think it is better to be discussed in the drivers meeting for fast approval.

Changed in neutron:
status: In Progress → Triaged
Revision history for this message
Kevin Benton (kevinbenton) wrote :

This sounds good to me. We already have the database infrastructure in place for this so it's just a matter of the API plumbing. We can discuss in next drivers meeting.

Revision history for this message
Ihar Hrachyshka (ihar-hrachyshka) wrote :

Problem is, there is no clear definition of 'all resources' for neutron, since we allow for plugins into api layer. So we may still need to enlist all resources we envision.

Changed in neutron:
status: Triaged → In Progress
Changed in neutron:
status: In Progress → Triaged
Changed in neutron:
status: Triaged → In Progress
Revision history for this message
Hirofumi Ichihara (ichihara-hirofumi) wrote :

I hope that this RFE is discussed on Driver team so remark Triaged.

Changed in neutron:
status: In Progress → Triaged
Changed in neutron:
status: Triaged → In Progress
Changed in neutron:
status: In Progress → Triaged
Revision history for this message
Kevin Benton (kevinbenton) wrote :

This looks good. The only concern Ihar wants addressed is that we statically list all of the API resources this supports rather than automatically supporting any standard attr resources. Even though this is already how revision_number and timestamps work, do not follow their examples because the API in neutron-lib should be static.

tags: added: rfe-approved
removed: rfe
Revision history for this message
Hirofumi Ichihara (ichihara-hirofumi) wrote :

Thank you. I'm considering the point. We don't want to add new extension(e.g. tag-qos, tag-agent, tag-meter) every time we add tag support for new resource. I think that this proposal doesn't change Tag API definition even if we add standard attr support to a resource. However, tag support is added to the resource automatically.

Changed in neutron:
status: Triaged → In Progress
Revision history for this message
Hirofumi Ichihara (ichihara-hirofumi) wrote :

I also consider which resource really needs tag support in standard attr resources. For example, security group rule and segment seem unnecessary.

Revision history for this message
Hirofumi Ichihara (ichihara-hirofumi) wrote :

> I think that this proposal doesn't change Tag even if we add standard attr support to a resource.
My comment was bad. It's untrue.

I'm bothered that automatic tag support vs static tag support. Automatic tag support means that a new resource model with HasStandardAttributes is added and then automatically tag support is added to the resource. This is very easy but the API definition is dynamic. Static tag support means that developer must implement new extension and new API definition every time they add tag support for new resource. This is very verbose because we will have many tag extentions(e.g. tag-security-group, tag-qos, tag-floatingip, etc) but the API definitions is static.

When I added tag-ext, I adopt the latter because I thought that a few resources only need tag support. However, we got new requirement to entend tag support. I think that automatic tag support is reasonable although I know that basically it's wrong.

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/479995

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

Reviewed: https://review.openstack.org/460391
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=96f0142b8089a85f1a031f236c6d39fd463bf86c
Submitter: Jenkins
Branch: master

commit 96f0142b8089a85f1a031f236c6d39fd463bf86c
Author: Hirofumi Ichihara <email address hidden>
Date: Fri Jun 16 16:46:37 2017 +0900

    Tag mechanism supports resources with standard attribute

    Tag mechanism supports network, subnet, port, subnetpool
    router resources only. This patch allow tag mechanism to support
     resources with standard attribute.

    Two old extenions are kept because of backward compatibility.
    They will be removed in Queens release.

    APIImpact: Tag is supported by resources with standard attribute
    DocImpact: allow users to set tags on resources with standard attribute

    Change-Id: Id7bb13b5beb58c313eea94ca03835d3daf5c94bc
    Closes-Bug: #1682775

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

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

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

Reviewed: https://review.openstack.org/479995
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=140b99812efc41a8fe987be4f93af38a3c74ecfd
Submitter: Zuul
Branch: master

commit 140b99812efc41a8fe987be4f93af38a3c74ecfd
Author: Hirofumi Ichihara <email address hidden>
Date: Tue Sep 19 15:20:14 2017 +0900

    Add API tests for Tag resource with standard attribute

    This patch added some api tests for tag resource with standard
    attribute, which are securitygroup, floatingip, trunk, and policy.

    In TagFilter test, identifier of resource was changed from name to
    id because floatingip doesn't have name attribute.

    Change-Id: I3a20abe00d4cb32b1a84aeb7b05429e776244c3e
    Related-bug: #1682775

Akihiro Motoki (amotoki)
Changed in neutron:
milestone: none → pike-3
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.