Postgresql ENUM type requires a name exceptions NVP Plugin

Fixes bug 1109824

Change-Id: I62beceaa14773de94e79d7017658f9f6e6212bb6
This commit is contained in:
Aaron Rosen 2013-01-29 15:36:58 -08:00
parent 71d6ab7993
commit e6c525af55
2 changed files with 6 additions and 2 deletions

View File

@ -46,7 +46,9 @@ def upgrade(active_plugin=None, options=None):
op.create_table(
'nvp_network_bindings',
sa.Column('network_id', sa.String(length=36), nullable=False),
sa.Column('binding_type', sa.Enum('flat', 'vlan', 'stt', 'gre'),
sa.Column('binding_type',
sa.Enum('flat', 'vlan', 'stt', 'gre',
name='nvp_network_bindings_binding_type'),
nullable=False),
sa.Column('tz_uuid', sa.String(length=36), nullable=True),
sa.Column('vlan_id', sa.Integer(), nullable=True),

View File

@ -33,7 +33,9 @@ class NvpNetworkBinding(model_base.BASEV2):
ForeignKey('networks.id', ondelete="CASCADE"),
primary_key=True)
# 'flat', 'vlan', stt' or 'gre'
binding_type = Column(Enum('flat', 'vlan', 'stt', 'gre'), nullable=False)
binding_type = Column(Enum('flat', 'vlan', 'stt', 'gre',
name='nvp_network_bindings_binding_type'),
nullable=False)
tz_uuid = Column(String(36))
vlan_id = Column(Integer)