Browse Source

use payloads for ROUTER_INTERFACE BEFORE_DELETE events

This patch switches over to the payload style of callbacks by updating
neutron to callbacks to handle a DBEventPayload for BEFORE_DELETE events
of ROUTER_INTERFACE resources. See the depends on patch for more
details.

This change also disables legacy-tempest-dsvm-networking-bgpvpn-bagpipe
that is currently broken because of bug 1807152 - since both this change
and that bug break the gate, we have to squash.

Change-Id: Ieda7d74aec8ccad4b22e19b0470237fa70885714
Depends-On: https://review.openstack.org/#/c/598347/
Boden R 7 months ago
parent
commit
3654b49a8d

+ 2
- 0
.zuul.yaml View File

@@ -90,6 +90,7 @@
90 90
               - openstack/networking-bagpipe
91 91
               - openstack/horizon
92 92
         - legacy-tempest-dsvm-networking-bgpvpn-bagpipe:
93
+            voting: false # until bug 1807152 is resolved
93 94
             irrelevant-files:
94 95
               - ^(test-|)requirements.txt$
95 96
               - ^setup.cfg$
@@ -124,6 +125,7 @@
124 125
               - openstack/networking-bagpipe
125 126
               - openstack/horizon
126 127
         - legacy-tempest-dsvm-networking-bgpvpn-bagpipe:
128
+            voting: false # until bug 1807152 is resolved
127 129
             irrelevant-files:
128 130
               - ^(test-|)requirements.txt$
129 131
               - ^setup.cfg$

+ 7
- 6
networking_bgpvpn/neutron/services/service_drivers/bagpipe/bagpipe_v2.py View File

@@ -242,19 +242,20 @@ class BaGPipeBGPVPNDriver(driver_api.BGPVPNDriverRC):
242 242
     @registry.receives(resources.ROUTER_INTERFACE, [events.BEFORE_DELETE])
243 243
     @log_helpers.log_method_call
244 244
     def registry_router_interface_deleted(self, resource, event, trigger,
245
-                                          **kwargs):
245
+                                          payload=None):
246 246
         try:
247
-            context = kwargs['context']
247
+            context = payload.context
248 248
             # for router_interface after_delete, in stable/newton, the
249 249
             # callback does not include the router_id directly, but we find
250 250
             # it in the port device_id
251
-            router_id = kwargs['router_id']
252
-            subnet_id = kwargs['subnet_id']
251
+            router_id = payload.resource_id
252
+            subnet_id = payload.metadata['subnet_id']
253 253
             # find the network for this subnet
254 254
             network_id = directory.get_plugin().get_subnet(
255 255
                 context, subnet_id)['network_id']
256 256
             self.notify_router_interface_deleted(
257 257
                 context, router_id, network_id)
258 258
         except Exception as e:
259
-            _log_callback_processing_exception(resource, event, trigger,
260
-                                               kwargs, e)
259
+            _log_callback_processing_exception(
260
+                resource, event, trigger,
261
+                {'subnet_id': subnet_id, 'router_id': router_id}, e)

Loading…
Cancel
Save