# Path: neutron_vpnaas/services/vpn/common/topics.py
# IPSEC_DRIVER_TOPIC = 'ipsec_driver'
# IPSEC_AGENT_TOPIC = 'ipsec_agent'
# 
# Path: neutron_vpnaas/services/vpn/service_drivers/base_ipsec.py
# IPSEC = 'ipsec'
# BASE_IPSEC_VERSION = '1.0'
# class IPsecVpnDriverCallBack(object):
# class IPsecVpnAgentApi(service_drivers.BaseIPsecVpnAgentApi):
# class BaseIPsecVPNDriver(service_drivers.VpnDriver, metaclass=abc.ABCMeta):
#     def __init__(self, driver):
#     def _get_agent_hosting_vpn_services(self, context, host):
#     def get_vpn_services_on_host(self, context, host=None):
#     def update_status(self, context, status):
#     def __init__(self, topic, default_version, driver):
#     def __init__(self, service_plugin, validator=None):
#     def service_type(self):
#     def create_rpc_conn(self):
#     def create_ipsec_site_connection(self, context, ipsec_site_connection):
#     def update_ipsec_site_connection(
#         self, context, old_ipsec_site_connection, ipsec_site_connection):
#     def delete_ipsec_site_connection(self, context, ipsec_site_connection):
#     def create_ikepolicy(self, context, ikepolicy):
#     def delete_ikepolicy(self, context, ikepolicy):
#     def update_ikepolicy(self, context, old_ikepolicy, ikepolicy):
#     def create_ipsecpolicy(self, context, ipsecpolicy):
#     def delete_ipsecpolicy(self, context, ipsecpolicy):
#     def update_ipsecpolicy(self, context, old_ipsec_policy, ipsecpolicy):
#     def _get_gateway_ips(self, router):
#     def create_vpnservice(self, context, vpnservice_dict):
#     def update_vpnservice(self, context, old_vpnservice, vpnservice):
#     def delete_vpnservice(self, context, vpnservice):
#     def get_external_ip_based_on_peer(self, vpnservice, ipsec_site_con):
#     def make_vpnservice_dict(self, vpnservice, local_cidr_map):
# 
# Path: neutron_vpnaas/services/vpn/service_drivers/ipsec_validator.py
# class IpsecValidationFailure(nexception.BadRequest):
# class IpsecVpnValidator(driver_validator.VpnDriverValidator):
#     def _check_transform_protocol(self, context, transform_protocol):
#     def validate_ipsec_policy(self, context, ipsec_policy):
#     def validate_ipsec_site_connection(self, context, ipsec_sitecon):


from neutron_lib import rpc as n_rpc
from neutron_vpnaas.services.vpn.common import topics
from neutron_vpnaas.services.vpn.service_drivers import base_ipsec
from neutron_vpnaas.services.vpn.service_drivers import ipsec_validator
#         http://www.apache.org/licenses/LICENSE-2.0
#
#    Unless required by applicable law or agreed to in writing, software
#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
#    License for the specific language governing permissions and limitations
#    under the License.




IPSEC = 'ipsec'
BASE_IPSEC_VERSION = '1.0'


class IPsecVPNDriver(base_ipsec.BaseIPsecVPNDriver):
    """VPN Service Driver class for IPsec."""

    def __init__(self, service_plugin):
        super(IPsecVPNDriver, self).__init__(
            service_plugin,
            ipsec_validator.IpsecVpnValidator(self))

    def create_rpc_conn(self):
        self.endpoints = [base_ipsec.IPsecVpnDriverCallBack(self)]
        self.conn = n_rpc.Connection()
        self.conn.create_consumer(
            topics.IPSEC_DRIVER_TOPIC, self.endpoints, fanout=False)
        self.conn.consume_in_threads()
        self.agent_rpc = base_ipsec.IPsecVpnAgentApi(

# Path: neutron_vpnaas/services/vpn/common/topics.py
# IPSEC_DRIVER_TOPIC = 'ipsec_driver'
# IPSEC_AGENT_TOPIC = 'ipsec_agent'
# 
# Path: neutron_vpnaas/services/vpn/service_drivers/base_ipsec.py
# IPSEC = 'ipsec'
# BASE_IPSEC_VERSION = '1.0'
# class IPsecVpnDriverCallBack(object):
# class IPsecVpnAgentApi(service_drivers.BaseIPsecVpnAgentApi):
# class BaseIPsecVPNDriver(service_drivers.VpnDriver, metaclass=abc.ABCMeta):
#     def __init__(self, driver):
#     def _get_agent_hosting_vpn_services(self, context, host):
#     def get_vpn_services_on_host(self, context, host=None):
#     def update_status(self, context, status):
#     def __init__(self, topic, default_version, driver):
#     def __init__(self, service_plugin, validator=None):
#     def service_type(self):
#     def create_rpc_conn(self):
#     def create_ipsec_site_connection(self, context, ipsec_site_connection):
#     def update_ipsec_site_connection(
#         self, context, old_ipsec_site_connection, ipsec_site_connection):
#     def delete_ipsec_site_connection(self, context, ipsec_site_connection):
#     def create_ikepolicy(self, context, ikepolicy):
#     def delete_ikepolicy(self, context, ikepolicy):
#     def update_ikepolicy(self, context, old_ikepolicy, ikepolicy):
#     def create_ipsecpolicy(self, context, ipsecpolicy):
#     def delete_ipsecpolicy(self, context, ipsecpolicy):
#     def update_ipsecpolicy(self, context, old_ipsec_policy, ipsecpolicy):
#     def _get_gateway_ips(self, router):
#     def create_vpnservice(self, context, vpnservice_dict):
#     def update_vpnservice(self, context, old_vpnservice, vpnservice):
#     def delete_vpnservice(self, context, vpnservice):
#     def get_external_ip_based_on_peer(self, vpnservice, ipsec_site_con):
#     def make_vpnservice_dict(self, vpnservice, local_cidr_map):
# 
# Path: neutron_vpnaas/services/vpn/service_drivers/ipsec_validator.py
# class IpsecValidationFailure(nexception.BadRequest):
# class IpsecVpnValidator(driver_validator.VpnDriverValidator):
#     def _check_transform_protocol(self, context, transform_protocol):
#     def validate_ipsec_policy(self, context, ipsec_policy):
#     def validate_ipsec_site_connection(self, context, ipsec_sitecon):


# Path: neutron_vpnaas/services/vpn/service_drivers/ipsec.py
from neutron_lib import rpc as n_rpc
from neutron_vpnaas.services.vpn.common import topics
from neutron_vpnaas.services.vpn.service_drivers import base_ipsec
from neutron_vpnaas.services.vpn.service_drivers import ipsec_validator

#         http://www.apache.org/licenses/LICENSE-2.0
#
#    Unless required by applicable law or agreed to in writing, software
#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
#    License for the specific language governing permissions and limitations
#    under the License.




IPSEC = 'ipsec'
BASE_IPSEC_VERSION = '1.0'


class IPsecVPNDriver(base_ipsec.BaseIPsecVPNDriver):
    """VPN Service Driver class for IPsec."""

    def __init__(self, service_plugin):
        super(IPsecVPNDriver, self).__init__(
            service_plugin,
            ipsec_validator.IpsecVpnValidator(self))

    def create_rpc_conn(self):
        self.endpoints = [base_ipsec.IPsecVpnDriverCallBack(self)]
        self.conn = n_rpc.Connection()
        self.conn.create_consumer(
            topics.IPSEC_DRIVER_TOPIC, self.endpoints, fanout=False)
        self.conn.consume_in_threads()
        self.agent_rpc = base_ipsec.IPsecVpnAgentApi(

            topics.IPSEC_AGENT_TOPIC, BASE_IPSEC_VERSION, self)