Name the securitygrouprules.direction enum.
Updates to the SecurityGroupRule model and migration so that we explicitly name the securitygrouprules.direction enum. This fixes 'Postgresql ENUM type requires a name.' errors. Fixes LP Bug #1099267. Change-Id: Ia46fe8d4b0793caaabbfc71b7fa5f0cbb8c6d24b
This commit is contained in:
parent
a2ad647b12
commit
d76ab1d0fa
@ -62,7 +62,10 @@ def upgrade(active_plugin=None, options=None):
|
||||
sa.Column('external_id', sa.Integer(), nullable=True),
|
||||
sa.Column('security_group_id', sa.String(length=36), nullable=False),
|
||||
sa.Column('source_group_id', sa.String(length=36), nullable=True),
|
||||
sa.Column('direction', sa.Enum('ingress', 'egress'), nullable=True),
|
||||
sa.Column('direction',
|
||||
sa.Enum('ingress', 'egress',
|
||||
name='securitygrouprules_direction'),
|
||||
nullable=True),
|
||||
sa.Column('ethertype', sa.String(length=40), nullable=True),
|
||||
sa.Column('protocol', sa.String(length=40), nullable=True),
|
||||
sa.Column('port_range_min', sa.Integer(), nullable=True),
|
||||
|
@ -62,7 +62,8 @@ class SecurityGroupRule(model_base.BASEV2, models_v2.HasId,
|
||||
ondelete="CASCADE"),
|
||||
nullable=True)
|
||||
|
||||
direction = sa.Column(sa.Enum('ingress', 'egress'))
|
||||
direction = sa.Column(sa.Enum('ingress', 'egress',
|
||||
name='securitygrouprules_direction'))
|
||||
ethertype = sa.Column(sa.String(40))
|
||||
protocol = sa.Column(sa.String(40))
|
||||
port_range_min = sa.Column(sa.Integer)
|
||||
|
Loading…
Reference in New Issue
Block a user