Exemple #1
0
def get_polling_manager(
    minimize_polling=False,
    ovsdb_monitor_respawn_interval=(constants.DEFAULT_OVSDBMON_RESPAWN)):
    if minimize_polling:
        pm = InterfacePollingMinimizer(
            ovsdb_monitor_respawn_interval=ovsdb_monitor_respawn_interval)
        pm.start()
    else:
        pm = base_polling.AlwaysPoll()
    try:
        yield pm
    finally:
        if minimize_polling:
            pm.stop()
Exemple #2
0
 def test_is_polling_required_always_returns_true(self):
     pm = polling.AlwaysPoll()
     self.assertTrue(pm.is_polling_required)
Exemple #3
0
def get_polling_manager(minimize_polling, ovsdb_monitor_respawn_interval):
    pm = base_polling.AlwaysPoll()
    yield pm