Exemple #1
0
 def setUp(self):
     super(TestCiscoIPsecDriverValidation, self).setUp()
     self.context = n_ctx.Context('some_user', 'some_tenant')
     self.vpn_service = {'router_id': '123'}
     self.router = mock.Mock()
     driver = mock.Mock()
     self.service_plugin = mock.Mock()
     driver.service_plugin = self.service_plugin
     self.validator = validator.CiscoCsrVpnValidator(driver)
 def setUp(self):
     super(TestCiscoIPsecDriverValidation, self).setUp()
     self.l3_plugin = mock.Mock()
     directory.add_plugin(lib_const.L3, self.l3_plugin)
     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)
Exemple #3
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)
 def __init__(self, service_plugin):
     super(CiscoCsrIPsecVPNDriver,
           self).__init__(service_plugin,
                          cisco_validator.CiscoCsrVpnValidator(self))