*** bobmel has joined #openstack-net-bgpvpn | 00:31 | |
*** bobmel has quit IRC | 00:36 | |
*** bobmel has joined #openstack-net-bgpvpn | 02:58 | |
*** bobmel has quit IRC | 03:03 | |
*** bobmel has joined #openstack-net-bgpvpn | 05:25 | |
*** bobmel has quit IRC | 05:30 | |
*** tmorin has joined #openstack-net-bgpvpn | 07:57 | |
*** tmorin has quit IRC | 08:25 | |
*** tmorin has joined #openstack-net-bgpvpn | 08:26 | |
*** bobmel has joined #openstack-net-bgpvpn | 09:28 | |
*** tmorin has quit IRC | 09:30 | |
*** bfernando has joined #openstack-net-bgpvpn | 09:34 | |
*** mickeys has quit IRC | 09:48 | |
*** tmorin has joined #openstack-net-bgpvpn | 10:14 | |
*** mickeys has joined #openstack-net-bgpvpn | 10:49 | |
*** mickeys has quit IRC | 10:54 | |
*** bobmel has quit IRC | 11:31 | |
*** mickeys has joined #openstack-net-bgpvpn | 11:50 | |
*** mickeys has quit IRC | 11:54 | |
*** bobmel has joined #openstack-net-bgpvpn | 12:10 | |
*** tmorin1 has joined #openstack-net-bgpvpn | 12:16 | |
*** tmorin has quit IRC | 12:17 | |
*** bobmel has quit IRC | 12:17 | |
*** bobmel has joined #openstack-net-bgpvpn | 12:18 | |
*** bobmel has joined #openstack-net-bgpvpn | 12:19 | |
*** tmorin1 has quit IRC | 12:21 | |
*** tmorin has joined #openstack-net-bgpvpn | 12:27 | |
*** tmorin has quit IRC | 12:31 | |
*** tmorin has joined #openstack-net-bgpvpn | 12:50 | |
*** mickeys has joined #openstack-net-bgpvpn | 12:51 | |
*** mickeys has quit IRC | 12:55 | |
*** tmorin has quit IRC | 13:06 | |
*** tmorin has joined #openstack-net-bgpvpn | 13:06 | |
openstackgerrit | Merged openstack/networking-bgpvpn: Remove doc modindex ref https://review.openstack.org/426781 | 13:22 |
---|---|---|
*** mickeys has joined #openstack-net-bgpvpn | 13:52 | |
*** mickeys has quit IRC | 13:57 | |
*** mickeys has joined #openstack-net-bgpvpn | 14:54 | |
*** mickeys has quit IRC | 14:59 | |
*** mickeys has joined #openstack-net-bgpvpn | 15:54 | |
*** mickeys has quit IRC | 15:59 | |
doude | tmorin: from what I understand db based driver heritate from neutron db_mixin and from that mixin it seems filter resource which at least one value match | 16:05 |
doude | https://github.com/openstack/neutron/blob/master/neutron/db/common_db_mixin.py#L161 | 16:05 |
tmorin | I interpret this code as doing the following: add a condition to the query that column (e.g 'networks') is in value (e.g. <uuid-foo>) | 16:20 |
tmorin | in the case where column is a list, I think it can't work | 16:22 |
tmorin | which would explain why i've never found how to filter on list attributes in neutron API | 16:22 |
doude | tmorin: I don't know if a sql table column can contains a list | 16:30 |
tmorin | well this isn't an sql column here in fact, but a column in the sqlalchemy representation | 16:31 |
tmorin | I'm not sure about the details | 16:31 |
tmorin | this is only my understanding | 16:31 |
doude | but in bgpvpn case the network and router associations columns are relation ships with network and router tables | 16:31 |
doude | I think we hit the code case https://github.com/openstack/neutron/blob/master/neutron/db/common_db_mixin.py#L155 | 16:32 |
doude | it should work | 16:32 |
tmorin | colum in this sense: https://github.com/openstack/networking-bgpvpn/blob/master/networking_bgpvpn/neutron/db/bgpvpn_db.py#L51 | 16:32 |
doude | can you provide me a local.conf file to run a devstack/bagpipe on master branch? | 16:33 |
tmorin | sorry, wrong line | 16:33 |
tmorin | hmm I'm not sure | 16:34 |
tmorin | the networks in a bgpvpn resource are retrieved thanks to this definition: https://github.com/openstack/networking-bgpvpn/blob/master/networking_bgpvpn/neutron/db/bgpvpn_db.py#L89 | 16:34 |
tmorin | but this does not directly define the 'networks' attribute | 16:35 |
doude | yes I think we have a mapping between api attribut name and db column name | 16:36 |
tmorin | networks is defined here: https://github.com/openstack/networking-bgpvpn/blob/master/networking_bgpvpn/neutron/db/bgpvpn_db.py#L113 | 16:36 |
doude | yes that will be difficult to filter it during the db query | 16:38 |
tmorin | yes | 16:38 |
doude | the sub resource complexifies lot of things | 16:39 |
tmorin | yes, true :-( | 16:39 |
doude | do you have in mind some use case where we need to add attributs to a bgpvpn resource association? | 16:40 |
tmorin | we initially thought that static routes could be added as attribute of a port_associations | 16:41 |
tmorin | and we thought about adding a flag to router_association to control whether or not extra_routes should be advertised into the BGPVPN | 16:42 |
tmorin | similarly, net_associations could have a flag to control whether subnet host_routes would be advertised in the BGPVPN | 16:42 |
tmorin | defining a static route as an attribute of the port_association (for the port that is the next_hop of the route) is only one option among many | 16:43 |
tmorin | and this options (I noticed this recently) does not work well at all in the case where a port is associated to more than one BGPVPN | 16:44 |
tmorin | we would define the static route on one port association (for one BGPVPN), and if other associations are added, then we would have to not advertise the static route to these other BGPVPNs -- it doesn't play out very nicely | 16:45 |
tmorin | I think we should be able to build an sqlalchemy query that would join the BGPVPN and bgpvpn_network_associations tables filtering to keep only lines for which network_id is in a given list | 16:52 |
tmorin | the common db mixin will not do that for us, but its doable in sqlalchemy I think | 16:52 |
*** mickeys has joined #openstack-net-bgpvpn | 16:55 | |
tmorin | unless the AssociationProxy is the kind of thing that could allow sqlalchemy to do that for us | 16:56 |
tmorin | it seems that it might be : http://docs.sqlalchemy.org/en/latest/orm/extensions/associationproxy.html | 16:56 |
tmorin | (the example is not far from the relationship we have) | 16:56 |
tmorin | so perhaps the code at https://github.com/openstack/neutron/blob/master/neutron/db/common_db_mixin.py#L155 that you linked earlier could serve us, but we would have to modify our model to define the right association proxy | 16:57 |
tmorin | something like adding "networks = association_proxy('network_associations', 'network_id')" to the BGPVPN DB model | 16:58 |
*** mickeys has quit IRC | 17:00 | |
tmorin | hmm, I've just tried | 17:08 |
tmorin | I'm getting a "sqlalchemy.exc.InvalidRequestError: stale association proxy, parent object has gone out of scope" that I don't understand | 17:09 |
tmorin | association proxies don't seem to be widespread: http://codesearch.openstack.org/?q=associationproxy | 17:11 |
tmorin | ... | 17:11 |
tmorin | time to go home for me | 17:11 |
tmorin | bye doude, if you were still reading... | 17:11 |
*** tmorin has quit IRC | 17:15 | |
*** mickeys has joined #openstack-net-bgpvpn | 17:39 | |
*** bfernando has quit IRC | 18:04 | |
*** bobmel has quit IRC | 23:08 | |
*** bobmel has joined #openstack-net-bgpvpn | 23:09 | |
*** bobmel has quit IRC | 23:15 |
Generated by irclog2html.py 2.14.0 by Marius Gedminas - find it at mg.pov.lt!