API to find BGPVPNs bound to a Network or Router

Registered by Thomas Morin

We don't have an API call allowing to identify the BGPVPN(s) bound to a said Network (or Router).

Gathering this information currently requires going through all BGPVPNs and their association sub-resources.

Using "GET /bgpvpn/bgpvpns?networks={network_uuid}" does not work because filtering on a list value is not supported.

[**proposal now abandoned**: a proposed way would be to populate Network resources with an additional parameter listing the BGPVPN associations they are in. This is already supported by the DB model, but work is needed so that the information is propagated through Neutron API.]

Blueprint information

Status:
Complete
Approver:
Mathieu Rohon
Priority:
High
Drafter:
Thomas Morin
Direction:
Approved
Assignee:
Mathieu Rohon
Definition:
Approved
Series goal:
Accepted for ocata
Implementation:
Implemented
Milestone target:
milestone icon 4.0.0
Started by
Thomas Morin
Completed by
Thomas Morin

Related branches

Sprints

Whiteboard

I investigated this, and the only way to have a l2plugin that inherits from db_base_plugin_v2 to automatically return a bgpvpn list in response to a GET /networks/uuid.json, is to register an extension method that is callable directly from the l2plugin. The method must be an attribute of the l2plugin.

Thanks to its extension manager that uses stevedore, ML2 seems able to process extensions defined outside the l2plugin. We should be able to use our own method to extend the neutron l2plugin response.

We should probably have something more generic, that works with other neutron plugin.

Moreover I only investigated the network case. It will probably be different for routers.

Gerrit topic: https://review.openstack.org/#q,topic:bug/1659895,n,z

Addressed by: https://review.openstack.org/426309
    Filtering BGP VPN list with resource associations

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.