diff options
author | vikram.choudhary <vikram.choudhary@huawei.com> | 2016-02-14 16:51:00 +0530 |
---|---|---|
committer | Ryan Tidwell <ryan.tidwell@hpe.com> | 2016-03-08 14:06:39 -0800 |
commit | 8bf46be67cc543cc3938122708a67271ce2eb7aa (patch) | |
tree | 54d78482ae96b890c86205b1a4444b016fb7baae /neutron/db/l3_dvr_db.py | |
parent | 1c9e439e7a1bda5b665997816891111e679faf67 (diff) | |
download | neutron-8bf46be67cc543cc3938122708a67271ce2eb7aa.tar.gz |
Add BGP Callback and agent RPC notifcation implementations
This patch adds RPC calls to the BGP speaker service plugin. This enables
the service plugin to notify the appropriate BGP dynamic routing agents
(bgp_dragent) when tenants add router gateway ports, router interfaces,
associate/disassociate floating IP's, and when and admin binds/unbinds
a gateway network to a BGP speaker. Compatible with centralized routers,
distributed routers not supported.
Partially-Implements: blueprint bgp-dynamic-routing
Co-Authored-By: vikram.choudhary <vikram.choudhary@huawei.com>
Change-Id: Ide76f9fdfba228000ddfa41a1168e77d21e92d9f
Diffstat (limited to 'neutron/db/l3_dvr_db.py')
-rw-r--r-- | neutron/db/l3_dvr_db.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/neutron/db/l3_dvr_db.py b/neutron/db/l3_dvr_db.py index f4a62c073c..2df7df3768 100644 --- a/neutron/db/l3_dvr_db.py +++ b/neutron/db/l3_dvr_db.py @@ -302,6 +302,18 @@ class L3_NAT_with_dvr_db_mixin(l3_db.L3_NAT_db_mixin, subnet['id'], [subnet['id']]) self.notify_router_interface_action( context, router_interface_info, 'add') + if router.gw_port: + gw_network_id = router.gw_port.network_id + gw_ips = [x['ip_address'] for x in router.gw_port.fixed_ips] + registry.notify(resources.ROUTER_INTERFACE, + events.AFTER_CREATE, + self, + network_id=gw_network_id, + gateway_ips=gw_ips, + cidrs=[x['cidr'] for x in subnets], + port_id=port['id'], + router_id=router_id, + interface_info=interface_info) return router_interface_info def _port_has_ipv6_address(self, port, csnat_port_check=True): |