https://github.com/openstack/neutron/blob/master/neutron/plugins/vmware/dbexts/networkgw_db.py#L120
class NetworkGatewayDeviceReference(model_base.BASEV2):
id = sa.Column(sa.String(36), primary_key=True)
network_gateway_id = sa.Column(sa.String(36),
sa.ForeignKey('networkgateways.id',
ondelete='CASCADE'),
primary_key=True)
interface_name = sa.Column(sa.String(64), primary_key=True)
The field 'id' refers to a gateway device. As there is no foreign key constraint the database layer will allow for creating gateway for non-existing devices - the error will then be detected in the backend anyway, but it should be caught at the DB layer.
Fix proposed to branch: master /review. openstack. org/93826
Review: https:/