Comment 8 for bug 1478998

Revision history for this message
Jan Scheurich (jan-scheurich) wrote : RE: [Bug 1478998] Re: de-duplicate route_targets and {import,export}_rts

I understand. Simple for the user, cumbersome for the backend developer.
Anyway, no strong objections. Go ahead.
/Jan

> -----Original Message-----
> From: <email address hidden> [mailto:<email address hidden>] On Behalf Of Thomas Morin
> Sent: Friday, 11 December, 2015 14:43
> To: Jan Scheurich
> Subject: [Bug 1478998] Re: de-duplicate route_targets and {import,export}_rts
>
> Jan: we think it is important to make it simple to address the simple and most common use case where export-RTs==import-RTs.
>
> --
> You received this bug notification because you are subscribed to bgpvpn.
> Matching subscriptions: bgpvpn bugs
> https://bugs.launchpad.net/bugs/1478998
>
> Title:
> de-duplicate route_targets and {import,export}_rts
>
> Status in bgpvpn:
> In Progress
> Status in bgpvpn juno series:
> Confirmed
> Status in bgpvpn kilo series:
> Confirmed
> Status in bgpvpn liberty series:
> In Progress
>
> Bug description:
> API Spec text says:
>
> ------------------
> The implementation will rely on three tables:
>
> * one for BGPVPN objects
> * one to define the 1-n relation ship between a BGPVPN and a set of Networks
> * one to define the 1-n relation ship between a BGPVPN and a set of Routers
>
> These two last tables will not rely on foreign keys with the Neutron-owned
> tables for Networks and Routers.
>
> The information stored in these tables will reflect what is exposed on the
> API, with an exception for route_targets:
>
> * this list will not be present in the database
>
> * on an API request to create or modify a BGPVPN: the route_targets
> parameter will be merged without duplicates with import_rts before storing
> import_rts, ditto for export_rts
>
> * on an API request to show a BGPVPN:
>
> * route_targets will be synthesized to include RTs present in both
> export_rts and import_rts
>
> * import_targets will contain only RTs not in common with export_rts
> * export_targets will contain only RTs not in common with import_rts
> ----------------------
>
> The current code does not yet do the above.
> What is missing :
> - remove the route_targets field from the db
> - on API create and update, populate import_rts and export_rts taking into account route_targets
> - on API get, recreate route_targets
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/bgpvpn/+bug/1478998/+subscriptions