Corrected the following models according to database
content:
- NOT NULL for LsnPort lsn_id;
- NOT NULL for NeutronNsxPortMapping nsx_port_id;
Partial-Bug: #
1296282
Change-Id: Ia67fcc68eeceb27d9274adb652ab45b32152f01c
lsn_port_id = Column(String(36), primary_key=True)
- lsn_id = Column(String(36), ForeignKey('lsn.lsn_id', ondelete="CASCADE"))
+ lsn_id = Column(String(36), ForeignKey('lsn.lsn_id', ondelete="CASCADE"),
+ nullable=False)
sub_id = Column(String(36), nullable=False, unique=True)
mac_addr = Column(String(32), nullable=False, unique=True)
ForeignKey('ports.id', ondelete="CASCADE"),
primary_key=True)
nsx_switch_id = Column(String(36))
- nsx_port_id = Column(String(36))
+ nsx_port_id = Column(String(36), nullable=False)
def __init__(self, neutron_id, nsx_switch_id, nsx_port_id):
self.neutron_id = neutron_id