Esempio n. 1
0
 def setUp(self):
     super(TestOneConvergenceAgentBase, self).setUp()
     cfg.CONF.set_default('firewall_driver',
                          'neutron.agent.firewall.NoopFirewallDriver',
                          group='SECURITYGROUP')
     with mock.patch('oslo_service.loopingcall.'
                     'FixedIntervalLoopingCall') as loopingcall:
         kwargs = {'integ_br': 'integration_bridge', 'polling_interval': 5}
         context = mock.Mock()
         self.agent = nvsd_neutron_agent.NVSDNeutronAgent(**kwargs)
         sg_plugin_rpc = sg_rpc.SecurityGroupServerRpcApi(topics.PLUGIN)
         self.sg_agent = sg_rpc.SecurityGroupAgentRpc(
             context, sg_plugin_rpc)
         self.callback_nvsd = nvsd_neutron_agent.NVSDAgentRpcCallback(
             context, self.agent, self.sg_agent)
         self.loopingcall = loopingcall
Esempio n. 2
0
 def setUp(self):
     super(TestOneConvergenceAgentBase, self).setUp()
     cfg.CONF.set_default('firewall_driver',
                          'neutron.agent.firewall.NoopFirewallDriver',
                          group='SECURITYGROUP')
     with contextlib.nested(
             mock.patch('neutron.openstack.common.loopingcall.'
                        'FixedIntervalLoopingCall'), ) as (loopingcall):
         kwargs = {
             'integ_br': 'integration_bridge',
             'root_helper': 'dummy_wrapper',
             'polling_interval': 5
         }
         context = mock.Mock()
         self.agent = nvsd_neutron_agent.NVSDNeutronAgent(**kwargs)
         self.sg_agent = nvsd_neutron_agent.SecurityGroupAgentRpc(
             context, 'dummy_wrapper')
         self.callback_nvsd = nvsd_neutron_agent.NVSDAgentRpcCallback(
             context, self.agent, self.sg_agent)
         self.loopingcall = loopingcall
Esempio n. 3
0
 def setUp(self):
     super(TestOneConvergenceAgentBase, self).setUp()
     self.addCleanup(cfg.CONF.reset)
     cfg.CONF.set_override('rpc_backend',
                           'neutron.openstack.common.rpc.impl_fake')
     with contextlib.nested(
             mock.patch('neutron.openstack.common.loopingcall.'
                        'FixedIntervalLoopingCall'), ) as (loopingcall):
         kwargs = {
             'integ_br': 'integration_bridge',
             'root_helper': 'dummy_wrapper',
             'polling_interval': 5
         }
         context = mock.Mock()
         self.agent = nvsd_neutron_agent.NVSDNeutronAgent(**kwargs)
         self.sg_agent = nvsd_neutron_agent.SecurityGroupAgentRpc(
             context, 'dummy_wrapper')
         self.callback_nvsd = nvsd_neutron_agent.NVSDAgentRpcCallback(
             context, self.agent, self.sg_agent)
         self.loopingcall = loopingcall