From e6c525af5586d3509df11769c7f2f6fa9af003a3 Mon Sep 17 00:00:00 2001 From: Aaron Rosen Date: Tue, 29 Jan 2013 15:36:58 -0800 Subject: [PATCH] Postgresql ENUM type requires a name exceptions NVP Plugin Fixes bug 1109824 Change-Id: I62beceaa14773de94e79d7017658f9f6e6212bb6 --- .../versions/1d76643bcec4_nvp_netbinding.py | 4 +++- quantum/plugins/nicira/nicira_nvp_plugin/nicira_models.py | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/quantum/db/migration/alembic_migrations/versions/1d76643bcec4_nvp_netbinding.py b/quantum/db/migration/alembic_migrations/versions/1d76643bcec4_nvp_netbinding.py index ae1035eaf5..5f392076bb 100644 --- a/quantum/db/migration/alembic_migrations/versions/1d76643bcec4_nvp_netbinding.py +++ b/quantum/db/migration/alembic_migrations/versions/1d76643bcec4_nvp_netbinding.py @@ -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), diff --git a/quantum/plugins/nicira/nicira_nvp_plugin/nicira_models.py b/quantum/plugins/nicira/nicira_nvp_plugin/nicira_models.py index 1a176be060..37344b4e20 100644 --- a/quantum/plugins/nicira/nicira_nvp_plugin/nicira_models.py +++ b/quantum/plugins/nicira/nicira_nvp_plugin/nicira_models.py @@ -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)