예제 #1
0
 def test_main_l2gw_agent(self):
     logging_str = 'neutron.conf.agent.common.setup_logging'
     common_config_str = mock.patch.object(common_config, 'init').start()
     with mock.patch.object(common_config_str, 'init'), \
             mock.patch(logging_str), \
             mock.patch.object(agent.service, 'launch') as mock_launch, \
             mock.patch('sys.argv'), \
             mock.patch.object(agent.manager, 'OVSDBManager'), \
             mock.patch.object(cfg.CONF, 'register_opts'):
         agent.main()
         mock_launch.assert_called_once_with(cfg.CONF, mock.ANY)
예제 #2
0
 def test_main_l2gw_agent(self):
     logging_str = 'neutron.conf.agent.common.setup_logging'
     common_config_str = mock.patch.object(common_config, 'init').start()
     with mock.patch.object(common_config_str, 'init'), \
             mock.patch(logging_str), \
             mock.patch.object(agent.service, 'launch') as mock_launch, \
             mock.patch('sys.argv'), \
             mock.patch.object(agent.manager, 'OVSDBManager'), \
             mock.patch.object(cfg.CONF, 'register_opts'):
         agent.main()
         mock_launch.assert_called_once_with(cfg.CONF, mock.ANY)
예제 #3
0
 def test_main_l2gw_agent(self):
     logging_str = 'neutron.agent.common.config.setup_logging'
     common_config_str = mock.patch.object(common_config, 'init').start()
     with contextlib.nested(
         mock.patch.object(common_config_str, 'init'),
         mock.patch(logging_str),
         mock.patch.object(agent.service, 'launch'),
         mock.patch('sys.argv'),
         mock.patch.object(agent.manager, 'OVSDBManager'),
         mock.patch.object(cfg.CONF, 'register_opts')
     ) as (mock_config, mock_logging, mock_launch, sys_argv,
           mgr_cls, ro):
         agent.main()
         mock_launch.assert_called_once_with(cfg.CONF, mock.ANY)
예제 #4
0
 def test_main_l2gw_agent(self):
     logging_str = 'neutron.agent.common.config.setup_logging'
     common_config_str = mock.patch.object(common_config, 'init').start()
     with contextlib.nested(
             mock.patch.object(common_config_str, 'init'),
             mock.patch(logging_str),
             mock.patch.object(agent.service, 'launch'),
             mock.patch('sys.argv'),
             mock.patch.object(agent.manager, 'OVSDBManager'),
             mock.patch.object(cfg.CONF,
                               'register_opts')) as (mock_config,
                                                     mock_logging,
                                                     mock_launch, sys_argv,
                                                     mgr_cls, ro):
         agent.main()
         mock_launch.assert_called_once_with(cfg.CONF, mock.ANY)
예제 #5
0
def main():
    l2gw_agent.main()