expected_code=exc.HTTPNotFound.code)
self.assertEqual(
- set(n['event_type'] for n in test_notifier.NOTIFICATIONS),
- set(exp_notifications))
+ set(exp_notifications),
+ set(n['event_type'] for n in test_notifier.NOTIFICATIONS))
+ for n in test_notifier.NOTIFICATIONS:
+ if n['event_type'].startswith('router.interface.'):
+ payload = n['payload']['router.interface']
+ self.assertIn('id', payload)
+ self.assertEquals(payload['id'], r['router']['id'])
+ self.assertIn('tenant_id', payload)
+ stid = s['subnet']['tenant_id']
+ # tolerate subnet tenant deliberately to '' in the
+ # nicira metadata access case
+ self.assertTrue(payload['tenant_id'] == stid or
+ payload['tenant_id'] == '')
+
def test_router_add_interface_subnet_with_bad_tenant_returns_404(self):
with mock.patch('quantum.context.Context.to_dict') as tdict:
tenant_id = _uuid()