Ejemplo n.º 1
0
 def __init__(self, service_plugin):
     super(CiscoCsrIPsecVPNDriver, self).__init__(
         service_plugin,
         cisco_validator.CiscoCsrVpnValidator(service_plugin))
     self.endpoints = [CiscoCsrIPsecVpnDriverCallBack(self)]
     self.conn = n_rpc.create_connection(new=True)
     self.conn.create_consumer(
         topics.CISCO_IPSEC_DRIVER_TOPIC, self.endpoints, fanout=False)
     self.conn.consume_in_threads()
     self.agent_rpc = CiscoCsrIPsecVpnAgentApi(
         topics.CISCO_IPSEC_AGENT_TOPIC, BASE_IPSEC_VERSION, self)
Ejemplo n.º 2
0
 def setUp(self):
     super(TestCiscoIPsecDriverValidation, self).setUp()
     self.l3_plugin = mock.Mock()
     mock.patch(
         'neutron.manager.NeutronManager.get_service_plugins',
         return_value={constants.L3_ROUTER_NAT: self.l3_plugin}).start()
     self.context = n_ctx.Context('some_user', 'some_tenant')
     self.vpn_service = {'router_id': '123'}
     self.router = mock.Mock()
     self.service_plugin = mock.Mock()
     self.validator = validator.CiscoCsrVpnValidator(self.service_plugin)
Ejemplo n.º 3
0
 def setUp(self):
     super(TestCiscoIPsecDriverValidation, self).setUp()
     mock.patch('neutron.common.rpc.create_connection').start()
     self.l3_plugin = mock.Mock()
     mock.patch(
         'neutron.manager.NeutronManager.get_service_plugins',
         return_value={constants.L3_ROUTER_NAT: self.l3_plugin}).start()
     self.core_plugin = mock.Mock()
     mock.patch('neutron.manager.NeutronManager.get_plugin',
                return_value=self.core_plugin).start()
     self.context = n_ctx.Context('some_user', 'some_tenant')
     self.vpn_service = mock.Mock()
     self.service_plugin = mock.Mock()
     self.validator = validator.CiscoCsrVpnValidator(self.service_plugin)