

def create_net_assoc_precommit(self, context, net_assoc):
    bgpvpns = self.bgpvpn_db.find_bgpvpns_for_network(context, net_assoc['network_id'])
    if (len(bgpvpns) > 1):
        raise bgpvpn_ext.BGPVPNNetworkAssocExistsAnotherBgpvpn(driver=OPENDAYLIGHT_BGPVPN_DRIVER_NAME, network=net_assoc['network_id'], bgpvpn=bgpvpns[0]['id'])

dataset/ETHPy150Open openstack/networking-bgpvpn/networking_bgpvpn/neutron/services/service_drivers/opendaylight/odl.py OpenDaylightBgpvpnDriver.create_net_assoc_precommit/original