def _create_router(self, router=None, **kwargs):
    agent = l3_agent.L3NATAgent(HOSTNAME, self.conf)
    self.router_id = _uuid()
    if (not router):
        router = mock.MagicMock()
    kwargs['agent'] = agent
    kwargs['router_id'] = self.router_id
    kwargs['router'] = router
    kwargs['agent_conf'] = self.conf
    kwargs['interface_driver'] = mock.Mock()
    return dvr_router.DvrLocalRouter(HOSTNAME, **kwargs)
def _create_router(self, router=None, **kwargs):
    agent = l3_agent.L3NATAgent(HOSTNAME, self.conf)
    self.router_id = _uuid()
    if (not router):
        router = mock.MagicMock()
    kwargs['agent'] = agent
    kwargs['router_id'] = self.router_id
    kwargs['router'] = router
    kwargs['agent_conf'] = self.conf
    kwargs['interface_driver'] = mock.Mock()
    return dvr_router.DvrLocalRouter(HOSTNAME, **kwargs)