Beispiel #1
0
 def setUp(self):
     super(TestIPsecDriverValidation, self).setUp()
     self.l3_plugin = mock.Mock()
     self.core_plugin = mock.Mock()
     directory.add_plugin(lconstants.CORE, self.core_plugin)
     directory.add_plugin(lconstants.L3, self.l3_plugin)
     self.context = n_ctx.Context('some_user', 'some_tenant')
     self.service_plugin = mock.Mock()
     self.validator = vpn_validator.IpsecVpnValidator(self.service_plugin)
     self.router = mock.Mock()
     self.router.gw_port = {'fixed_ips': [{'ip_address': '10.0.0.99'}]}
 def setUp(self):
     super(TestIPsecDriverValidation, self).setUp()
     self.l3_plugin = mock.Mock()
     mock.patch('neutron.manager.NeutronManager.get_service_plugins',
                return_value={
                    nconstants.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.service_plugin = mock.Mock()
     self.validator = vpn_validator.IpsecVpnValidator(self.service_plugin)
     self.router = mock.Mock()
     self.router.gw_port = {'fixed_ips': [{'ip_address': '10.0.0.99'}]}
Beispiel #3
0
    def setUp(self):
        super(TestIPsecDriver, self).setUp()
        mock.patch('neutron_lib.rpc.Connection').start()

        l3_agent = mock.Mock()
        l3_agent.host = FAKE_HOST
        plugin = mock.Mock()
        plugin.get_l3_agents_hosting_routers.return_value = [l3_agent]
        directory.add_plugin(constants.CORE, plugin)
        directory.add_plugin(constants.L3, plugin)
        self.svc_plugin = mock.Mock()
        self.svc_plugin.get_l3_agents_hosting_routers.return_value = [l3_agent]
        self._fake_vpn_router_id = _uuid()
        self.svc_plugin._get_vpnservice.return_value = {
            'router_id': self._fake_vpn_router_id
        }
        self.driver = ipsec_driver.IPsecVPNDriver(self.svc_plugin)
        self.validator = ipsec_validator.IpsecVpnValidator(self.driver)
        self.context = n_ctx.get_admin_context()
Beispiel #4
0
 def __init__(self, service_plugin):
     super(IPsecVPNDriver,
           self).__init__(service_plugin,
                          ipsec_validator.IpsecVpnValidator(self))
Beispiel #5
0
 def __init__(self, service_plugin):
     super(MidonetIPsecVPNDriver,
           self).__init__(service_plugin,
                          ipsec_validator.IpsecVpnValidator(self))
     self.plugin = plugin.VPNPlugin()
     self.client = c_base.load_client(cfg.CONF.MIDONET)
Beispiel #6
0
 def __init__(self, service_plugin):
     self.service_plugin = service_plugin
     super(NuageIPsecVPNDriver,
           self).__init__(service_plugin,
                          ipsec_validator.IpsecVpnValidator(service_plugin))