Fix the L2gw migration script
Remove the foreign key constraint for the connection_id column. This removes the dependency from the networking-l2gw tables enabling devstack to run sucessfully. A follow up patch will be added to clean up connection mappings. Change-Id: Ib1de421e6187231c875cad76e1981c787ede89f8
This commit is contained in:
parent
c7ed3b42f3
commit
e324b7a53f
@ -30,19 +30,13 @@ import sqlalchemy as sa
|
|||||||
|
|
||||||
|
|
||||||
def upgrade():
|
def upgrade():
|
||||||
try:
|
|
||||||
op.create_table(
|
op.create_table(
|
||||||
'nsx_l2gw_connection_mappings',
|
'nsx_l2gw_connection_mappings',
|
||||||
sa.Column('connection_id', sa.String(length=36), nullable=False),
|
sa.Column('connection_id', sa.String(length=36), nullable=False),
|
||||||
sa.Column('port_id', sa.String(length=36), nullable=False),
|
sa.Column('port_id', sa.String(length=36), nullable=False),
|
||||||
sa.Column('bridge_endpoint_id', sa.String(length=36),
|
sa.Column('bridge_endpoint_id', sa.String(length=36),
|
||||||
nullable=False),
|
nullable=False),
|
||||||
sa.ForeignKeyConstraint(['connection_id'],
|
|
||||||
['l2gatewayconnections.id'],
|
|
||||||
ondelete='CASCADE'),
|
|
||||||
sa.ForeignKeyConstraint(['port_id'], ['ports.id'],
|
sa.ForeignKeyConstraint(['port_id'], ['ports.id'],
|
||||||
ondelete='CASCADE'),
|
ondelete='CASCADE'),
|
||||||
sa.PrimaryKeyConstraint('connection_id'),
|
sa.PrimaryKeyConstraint('connection_id'),
|
||||||
)
|
)
|
||||||
except Exception:
|
|
||||||
pass
|
|
||||||
|
@ -306,8 +306,6 @@ class NsxL2GWConnectionMapping(model_base.BASEV2):
|
|||||||
"""Define a mapping between L2 gateway connection and bridge endpoint."""
|
"""Define a mapping between L2 gateway connection and bridge endpoint."""
|
||||||
__tablename__ = 'nsx_l2gw_connection_mappings'
|
__tablename__ = 'nsx_l2gw_connection_mappings'
|
||||||
connection_id = sa.Column(sa.String(36),
|
connection_id = sa.Column(sa.String(36),
|
||||||
sa.ForeignKey("l2gatewayconnections.id",
|
|
||||||
ondelete="CASCADE"),
|
|
||||||
nullable=False,
|
nullable=False,
|
||||||
primary_key=True)
|
primary_key=True)
|
||||||
port_id = sa.Column(sa.String(36),
|
port_id = sa.Column(sa.String(36),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user