# 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.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_def
from neutron_lib.api.definitions import bgpvpn_vni as bgpvpn_vni_def
from webob import exc
from networking_bgpvpn.neutron.extensions import bgpvpn
            'bgpvpn': {'name': 'bgpvpn1',
                       'type': 'l3',
                       'route_targets': ['1234:56'],
                       'vni': 1000,
                       'tenant_id': _uuid()}
        }
        expected_ret_val = copy.copy(data['bgpvpn'])
        expected_ret_val['import_targets'] = []
        expected_ret_val['export_targets'] = []
        expected_ret_val['route_distinguishers'] = []
        expected_ret_val['vni'] = 1000
        expected_call_args = copy.copy(expected_ret_val)
        expected_ret_val.update({'id': bgpvpn_id})

        self.instance.create_bgpvpn.return_value = expected_ret_val
        res = self.api.post(_get_path(BGPVPN_URI, fmt=self.fmt),
                            self.serialize(data),
                            content_type='application/%s' % self.fmt)
        self.assertTrue(self.instance.create_bgpvpn.called)
        self.assertDictSupersetOf(
            expected_call_args,
            self.instance.create_bgpvpn.call_args[1]['bgpvpn']['bgpvpn'])
        self.assertEqual(res.status_int, exc.HTTPCreated.code)
        res = self.deserialize(res)
        self.assertIn('bgpvpn', res)
        self.assertDictSupersetOf(expected_ret_val, res['bgpvpn'])

    def test_bgpvpn_get(self):
        bgpvpn_id = _uuid()
        return_value = {'name': 'bgpvpn1',

# 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_vni.py
import copy
from unittest import mock
from oslo_utils import uuidutils
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_def
from neutron_lib.api.definitions import bgpvpn_vni as bgpvpn_vni_def
from webob import exc
from networking_bgpvpn.neutron.extensions import bgpvpn

            'bgpvpn': {'name': 'bgpvpn1',
                       'type': 'l3',
                       'route_targets': ['1234:56'],
                       'vni': 1000,
                       'tenant_id': _uuid()}
        }
        expected_ret_val = copy.copy(data['bgpvpn'])
        expected_ret_val['import_targets'] = []
        expected_ret_val['export_targets'] = []
        expected_ret_val['route_distinguishers'] = []
        expected_ret_val['vni'] = 1000
        expected_call_args = copy.copy(expected_ret_val)
        expected_ret_val.update({'id': bgpvpn_id})

        self.instance.create_bgpvpn.return_value = expected_ret_val
        res = self.api.post(_get_path(BGPVPN_URI, fmt=self.fmt),
                            self.serialize(data),
                            content_type='application/%s' % self.fmt)
        self.assertTrue(self.instance.create_bgpvpn.called)
        self.assertDictSupersetOf(
            expected_call_args,
            self.instance.create_bgpvpn.call_args[1]['bgpvpn']['bgpvpn'])
        self.assertEqual(res.status_int, exc.HTTPCreated.code)
        res = self.deserialize(res)
        self.assertIn('bgpvpn', res)
        self.assertDictSupersetOf(expected_ret_val, res['bgpvpn'])

    def test_bgpvpn_get(self):
        bgpvpn_id = _uuid()
        return_value = {'name': 'bgpvpn1',

                        'type': 'l3',