vmware-nsx/vmware_nsx/services/vpnaas/nsx_tvd/plugin.py
Adit Sarfaty e3f103f269 NSX|V3: VPN connection status update
The VPNaaS plugin expects the driver to update the connection status
from a separate process/thread/agent.
When the user requests a connection/list, the status is retrived from the VPNaaS DB,
without calling the driver.

To avoid adding a process to actively query and update all connections statuses, this
patch creates a new VPNaaS plugin, to be used instead of hte default one.
This plugin (vmware_nsx_vpnaas) will issue a get-statuses call to the driver,
update the current statuses in the DB, and call the original plugin.

Change-Id: Ib750bfb8f0c8ad12265fa71506182ff5d7e8030a
2018-08-20 14:21:24 +03:00

31 lines
1.1 KiB
Python

# Copyright 2018 VMware, Inc.
# All Rights Reserved
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# 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.
from vmware_nsx.plugins.nsx import utils as tvd_utils
from vmware_nsx.services.vpnaas import nsx_plugin
@tvd_utils.filter_plugins
class VPNPlugin(nsx_plugin.NsxVPNPlugin):
"""NSX-TV plugin for VPNaaS.
This plugin adds separation between T/V instances
"""
methods_to_separate = ['get_ipsec_site_connections',
'get_ikepolicies',
'get_ipsecpolicies',
'get_vpnservices',
'get_endpoint_groups']