Esempio n. 1
0
 def test_sync_router(self):
     sync = apic_sync.ApicRouterSynchronizer(self.driver)
     sync.core_plugin = mock.Mock()
     sync.core_plugin.get_ports.return_value = [{'id': 'port',
                                                 'network_id': 'net',
                                                 'device_id': 'dev'}]
     sync.sync_router()
     self.assertEqual(
         1, self.driver.add_router_interface_postcommit.call_count)
Esempio n. 2
0
 def get_router_synchronizer(inst):
     apic_config = cfg.CONF.ml2_cisco_apic
     return apic_sync.ApicRouterSynchronizer(inst,
                                             apic_config.apic_sync_interval)