# 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

    def test_bgpvpn_create_with_valid_export_rts(self):
        self._test_valid_field('export_targets')

    def test_bgpvpn_create_with_invalid_route_distinguishers(self):
        self._test_invalid_field('route_distinguishers')

    def test_bgpvpn_create_with_valid_route_distinguishers(self):
        self._test_valid_field('route_distinguishers')

    def test_bgpvpn_list(self):
        bgpvpn_id = _uuid()
        return_value = [{'name': 'bgpvpn1',
                         'type': 'l3',
                         'route_targets': ['1234:56'],
                         'id': bgpvpn_id}]

        self.instance.get_bgpvpns.return_value = return_value

        res = self.api.get(
            _get_path(BGPVPN_URI, fmt=self.fmt))

        self.instance.get_bgpvpns.assert_called_with(
            mock.ANY, fields=mock.ANY, filters=mock.ANY
        )
        self.assertEqual(res.status_int, exc.HTTPOk.code)

    def test_bgpvpn_update(self):
        bgpvpn_id = _uuid()
        update_data = {'bgpvpn': {'name': 'bgpvpn_updated'}}

# 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


    def test_bgpvpn_create_with_valid_export_rts(self):
        self._test_valid_field('export_targets')

    def test_bgpvpn_create_with_invalid_route_distinguishers(self):
        self._test_invalid_field('route_distinguishers')

    def test_bgpvpn_create_with_valid_route_distinguishers(self):
        self._test_valid_field('route_distinguishers')

    def test_bgpvpn_list(self):
        bgpvpn_id = _uuid()
        return_value = [{'name': 'bgpvpn1',
                         'type': 'l3',
                         'route_targets': ['1234:56'],
                         'id': bgpvpn_id}]

        self.instance.get_bgpvpns.return_value = return_value

        res = self.api.get(
            _get_path(BGPVPN_URI, fmt=self.fmt))

        self.instance.get_bgpvpns.assert_called_with(
            mock.ANY, fields=mock.ANY, filters=mock.ANY
        )
        self.assertEqual(res.status_int, exc.HTTPOk.code)

    def test_bgpvpn_update(self):
        bgpvpn_id = _uuid()
        update_data = {'bgpvpn': {'name': 'bgpvpn_updated'}}

        return_value = {'name': 'bgpvpn1',