def test_register(self, mocked_subscribe): mock_callback = mock.Mock() mock_agent_type = mock.Mock() capabilities.register(mock_callback, mock_agent_type) mocked_subscribe.assert_called_with(mock_callback, mock_agent_type, events.AFTER_INIT)
def test_register(self): mock_callback = mock.Mock() mock_agent_type = mock.Mock() capabilities.register(mock_callback, mock_agent_type) args = tools.get_subscribe_args( mock_callback, mock_agent_type, events.AFTER_INIT) self._mgr.subscribe.assert_called_with(*args)
def register(): """Register Linux Bridge capabilities.""" # Add capabilities to be loaded during agent initialization capabilities.register(driver.init_handler, constants.AGENT_TYPE_LINUXBRIDGE)
def register(): """Register OVS capabilities.""" # Add capabilities to be loaded during agent initialization capabilities.register(driver.init_handler, constants.AGENT_TYPE_OVS)
def test_register(self): mock_callback = mock.Mock() mock_agent_type = mock.Mock() capabilities.register(mock_callback, mock_agent_type) self._mgr.subscribe.assert_called_with(mock_callback, mock_agent_type, events.AFTER_INIT)