# Path: networking_bgpvpn/neutron/extensions/bgpvpn.py
# LOG = log.getLogger(__name__)
# class BGPVPNNotFound(n_exc.NotFound):
# class BGPVPNNetAssocNotFound(n_exc.NotFound):
# class BGPVPNRouterAssocNotFound(n_exc.NotFound):
# class BGPVPNTypeNotSupported(n_exc.BadRequest):
# class BGPVPNRDNotSupported(n_exc.BadRequest):
# class BGPVPNFindFromNetNotSupported(n_exc.BadRequest):
# class BGPVPNNetAssocAlreadyExists(n_exc.BadRequest):
# class BGPVPNRouterAssociationNotSupported(n_exc.BadRequest):
# class BGPVPNRouterAssocAlreadyExists(n_exc.BadRequest):
# class BGPVPNMultipleRouterAssocNotSupported(n_exc.BadRequest):
# class BGPVPNNetworkAssocExistsAnotherBgpvpn(n_exc.BadRequest):
# class BGPVPNDriverError(n_exc.NeutronException):
# class Bgpvpn(api_extensions.APIExtensionDescriptor):
# class BGPVPNPluginBase(libbase.ServicePluginBase, metaclass=abc.ABCMeta):
#     def get_resources(cls):
#     def get_plugin_interface(cls):
#     def get_plugin_type(self):
#     def get_plugin_description(self):
#     def create_bgpvpn(self, context, bgpvpn):
#     def get_bgpvpns(self, context, filters=None, fields=None):
#     def get_bgpvpn(self, context, id, fields=None):
#     def update_bgpvpn(self, context, id, bgpvpn):
#     def delete_bgpvpn(self, context, id):
#     def create_bgpvpn_network_association(self, context, bgpvpn_id,
#                                           network_association):
#     def get_bgpvpn_network_association(self, context, assoc_id, bgpvpn_id,
#                                        fields=None):
#     def get_bgpvpn_network_associations(self, context, bgpvpn_id,
#                                         filters=None, fields=None):
#     def update_bgpvpn_network_association(self, context, assoc_id, bgpvpn_id,
#                                           network_association):
#     def delete_bgpvpn_network_association(self, context, assoc_id, bgpvpn_id):
#     def create_bgpvpn_router_association(self, context, bgpvpn_id,
#                                          router_association):
#     def get_bgpvpn_router_association(self, context, assoc_id, bgpvpn_id,
#                                       fields=None):
#     def get_bgpvpn_router_associations(self, context, bgpvpn_id, filters=None,
#                                        fields=None):
#     def delete_bgpvpn_router_association(self, context, assoc_id, bgpvpn_id):


import copy
from unittest import mock
from oslo_utils import uuidutils
from neutron.api import extensions
from neutron.tests.unit.api.v2 import test_base
from neutron.tests.unit.extensions import base as test_extensions_base
from neutron_lib.api.definitions import bgpvpn as bgpvpn_api_def
from webob import exc
from networking_bgpvpn.neutron import extensions as bgpvpn_extensions
from networking_bgpvpn.neutron.extensions import bgpvpn
#    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.





_uuid = uuidutils.generate_uuid
_get_path = test_base._get_path
BGPVPN_PREFIX = 'bgpvpn'
BGPVPN_URI = BGPVPN_PREFIX + '/' + 'bgpvpns'


class BgpvpnExtensionTestCaseBase(test_extensions_base.ExtensionTestCase):

    def setUp(self):
        # NOTE(tmorin): this is already done in
        # networking_bgpvpn.neutron.extensions.bgpvpn at module loading time,
        # but for some reason I don't understand this is overridden later,
        # which is why we re-force this here:
        extensions.append_api_extensions_path(bgpvpn_extensions.__path__)

        super(BgpvpnExtensionTestCaseBase, self).setUp()
        plural_mappings = {'bgpvpn': 'bgpvpns'}
        self.setup_extension(
            '%s.%s' % (bgpvpn.BGPVPNPluginBase.__module__,
                       bgpvpn.BGPVPNPluginBase.__name__),
            bgpvpn_api_def.ALIAS,

# Path: networking_bgpvpn/neutron/extensions/bgpvpn.py
# LOG = log.getLogger(__name__)
# class BGPVPNNotFound(n_exc.NotFound):
# class BGPVPNNetAssocNotFound(n_exc.NotFound):
# class BGPVPNRouterAssocNotFound(n_exc.NotFound):
# class BGPVPNTypeNotSupported(n_exc.BadRequest):
# class BGPVPNRDNotSupported(n_exc.BadRequest):
# class BGPVPNFindFromNetNotSupported(n_exc.BadRequest):
# class BGPVPNNetAssocAlreadyExists(n_exc.BadRequest):
# class BGPVPNRouterAssociationNotSupported(n_exc.BadRequest):
# class BGPVPNRouterAssocAlreadyExists(n_exc.BadRequest):
# class BGPVPNMultipleRouterAssocNotSupported(n_exc.BadRequest):
# class BGPVPNNetworkAssocExistsAnotherBgpvpn(n_exc.BadRequest):
# class BGPVPNDriverError(n_exc.NeutronException):
# class Bgpvpn(api_extensions.APIExtensionDescriptor):
# class BGPVPNPluginBase(libbase.ServicePluginBase, metaclass=abc.ABCMeta):
#     def get_resources(cls):
#     def get_plugin_interface(cls):
#     def get_plugin_type(self):
#     def get_plugin_description(self):
#     def create_bgpvpn(self, context, bgpvpn):
#     def get_bgpvpns(self, context, filters=None, fields=None):
#     def get_bgpvpn(self, context, id, fields=None):
#     def update_bgpvpn(self, context, id, bgpvpn):
#     def delete_bgpvpn(self, context, id):
#     def create_bgpvpn_network_association(self, context, bgpvpn_id,
#                                           network_association):
#     def get_bgpvpn_network_association(self, context, assoc_id, bgpvpn_id,
#                                        fields=None):
#     def get_bgpvpn_network_associations(self, context, bgpvpn_id,
#                                         filters=None, fields=None):
#     def update_bgpvpn_network_association(self, context, assoc_id, bgpvpn_id,
#                                           network_association):
#     def delete_bgpvpn_network_association(self, context, assoc_id, bgpvpn_id):
#     def create_bgpvpn_router_association(self, context, bgpvpn_id,
#                                          router_association):
#     def get_bgpvpn_router_association(self, context, assoc_id, bgpvpn_id,
#                                       fields=None):
#     def get_bgpvpn_router_associations(self, context, bgpvpn_id, filters=None,
#                                        fields=None):
#     def delete_bgpvpn_router_association(self, context, assoc_id, bgpvpn_id):


# Path: networking_bgpvpn/tests/unit/extensions/test_bgpvpn.py
import copy
from unittest import mock
from oslo_utils import uuidutils
from neutron.api import extensions
from neutron.tests.unit.api.v2 import test_base
from neutron.tests.unit.extensions import base as test_extensions_base
from neutron_lib.api.definitions import bgpvpn as bgpvpn_api_def
from webob import exc
from networking_bgpvpn.neutron import extensions as bgpvpn_extensions
from networking_bgpvpn.neutron.extensions import bgpvpn

#    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.





_uuid = uuidutils.generate_uuid
_get_path = test_base._get_path
BGPVPN_PREFIX = 'bgpvpn'
BGPVPN_URI = BGPVPN_PREFIX + '/' + 'bgpvpns'


class BgpvpnExtensionTestCaseBase(test_extensions_base.ExtensionTestCase):

    def setUp(self):
        # NOTE(tmorin): this is already done in
        # networking_bgpvpn.neutron.extensions.bgpvpn at module loading time,
        # but for some reason I don't understand this is overridden later,
        # which is why we re-force this here:
        extensions.append_api_extensions_path(bgpvpn_extensions.__path__)

        super(BgpvpnExtensionTestCaseBase, self).setUp()
        plural_mappings = {'bgpvpn': 'bgpvpns'}
        self.setup_extension(
            '%s.%s' % (bgpvpn.BGPVPNPluginBase.__module__,
                       bgpvpn.BGPVPNPluginBase.__name__),
            bgpvpn_api_def.ALIAS,

            bgpvpn.Bgpvpn,