Backward compatibility for vpnaas
Vpnaas driver class is changed to one from this repo in case it attempts to be loaded from neutron repo. This change depends on I76af175c4387326a4e5ff95c2f15d8b866dedab3 Change-Id: I2986a9724396920071a3a22121e5b5a5a08ed059 Closes-Bug: 1401895
This commit is contained in:
parent
0b14a3f171
commit
30fe57e4a8
@ -20,9 +20,12 @@ from neutron import context as n_context
|
|||||||
from neutron.extensions import vpnaas
|
from neutron.extensions import vpnaas
|
||||||
from neutron.openstack.common import log as logging
|
from neutron.openstack.common import log as logging
|
||||||
from neutron.services import advanced_service
|
from neutron.services import advanced_service
|
||||||
|
from neutron.services import provider_configuration as provconfig
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
DEVICE_DRIVERS = 'device_drivers'
|
||||||
|
|
||||||
|
|
||||||
class VPNService(advanced_service.AdvancedService):
|
class VPNService(advanced_service.AdvancedService):
|
||||||
"""VPN Service observer."""
|
"""VPN Service observer."""
|
||||||
@ -40,6 +43,8 @@ class VPNService(advanced_service.AdvancedService):
|
|||||||
"""Loads one or more device drivers for VPNaaS."""
|
"""Loads one or more device drivers for VPNaaS."""
|
||||||
self.devices = []
|
self.devices = []
|
||||||
for device_driver in cfg.CONF.vpnagent.vpn_device_driver:
|
for device_driver in cfg.CONF.vpnagent.vpn_device_driver:
|
||||||
|
device_driver = provconfig.get_provider_driver_class(
|
||||||
|
device_driver, DEVICE_DRIVERS)
|
||||||
try:
|
try:
|
||||||
self.devices.append(importutils.import_object(device_driver,
|
self.devices.append(importutils.import_object(device_driver,
|
||||||
self,
|
self,
|
||||||
|
@ -33,6 +33,9 @@ setup-hooks =
|
|||||||
[entry_points]
|
[entry_points]
|
||||||
console_scripts =
|
console_scripts =
|
||||||
neutron-vpn-agent = neutron_vpnaas.services.vpn.agent:main
|
neutron-vpn-agent = neutron_vpnaas.services.vpn.agent:main
|
||||||
|
device_drivers =
|
||||||
|
neutron.services.vpn.device_drivers.ipsec.OpenSwanDriver = neutron_vpnaas.services.vpn.device_drivers.ipsec:OpenSwanDriver
|
||||||
|
neutron.services.vpn.device_drivers.cisco_ipsec.CiscoCsrIPsecDriver = neutron_vpnaas.services.vpn.device_drivers.cisco_ipsec:CiscoCsrIPsecDriver
|
||||||
|
|
||||||
[build_sphinx]
|
[build_sphinx]
|
||||||
all_files = 1
|
all_files = 1
|
||||||
|
Loading…
Reference in New Issue
Block a user