Increase ip_pool to 256 characters

The length of the ip_pool parameter in L3 policies is limited,
and needs to be increased in order to support multiple prefixes,
as well as prefixes from all address families (v4 and v6).

Change-Id: I9dc03ac4275e0f269746011a075bf3b78e0d5233
This commit is contained in:
Thomas Bachman 2017-07-06 19:43:44 +00:00
parent 7eb3afc6f0
commit e3e62e1197
3 changed files with 41 additions and 2 deletions

View File

@ -157,7 +157,7 @@ class L3Policy(model_base.BASEV2, BaseSharedGbpResource):
'polymorphic_identity': 'base'
}
ip_version = sa.Column(sa.Integer, nullable=False)
ip_pool = sa.Column(sa.String(64))
ip_pool = sa.Column(sa.String(255))
subnet_prefix_length = sa.Column(sa.Integer)
l2_policies = orm.relationship(L2Policy, backref='l3_policy')
external_segments = orm.relationship(

View File

@ -0,0 +1,39 @@
# Copyright 2017 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
"""l3p ip pool size
Revision ID: 27b724002081
Revises: bff1774e749e
Create Date: 2017-07-06 17:34:18.856803
"""
# revision identifiers, used by Alembic.
revision = '27b724002081'
down_revision = 'bff1774e749e'
from alembic import op
import sqlalchemy as sa
def upgrade():
op.alter_column('gp_l3_policies', 'ip_pool',
existing_type=sa.String(length=64),
type_=sa.String(length=255))
def downgrade():
pass

View File

@ -1 +1 @@
bff1774e749e
27b724002081