Add vlan_transparent attribute to network model
VLAN trunking networks for NFV blueprint needs a new vlan_transparent attribute. Add this attribute to the network model. Partially-Implements: blueprint nfv-vlan-trunks Change-Id: Ib973f196989b3b119e309ce7100a1e7e7c73b3a4
This commit is contained in:
parent
05b07762de
commit
4a98eaf180
|
@ -1 +1 @@
|
|||
43763a9618fd
|
||||
bebba223288
|
||||
|
|
|
@ -0,0 +1,38 @@
|
|||
# Copyright 2015 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.
|
||||
#
|
||||
|
||||
"""Add vlan transparent property to network
|
||||
|
||||
Revision ID: bebba223288
|
||||
Revises: 43763a9618fd
|
||||
Create Date: 2015-02-04 18:07:29.670554
|
||||
|
||||
"""
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = 'bebba223288'
|
||||
down_revision = '43763a9618fd'
|
||||
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
def upgrade():
|
||||
op.add_column('networks', sa.Column('vlan_transparent', sa.Boolean(),
|
||||
nullable=True))
|
||||
|
||||
|
||||
def downgrade():
|
||||
op.drop_column('networks', 'vlan_transparent')
|
|
@ -220,3 +220,4 @@ class Network(model_base.BASEV2, HasId, HasTenant):
|
|||
admin_state_up = sa.Column(sa.Boolean)
|
||||
shared = sa.Column(sa.Boolean)
|
||||
mtu = sa.Column(sa.Integer, nullable=True)
|
||||
vlan_transparent = sa.Column(sa.Boolean, nullable=True)
|
||||
|
|
|
@ -4182,7 +4182,7 @@ class DbModelTestCase(base.BaseTestCase):
|
|||
exp_end_with = (" {tenant_id=None, id=None, "
|
||||
"name='net_net', status='OK', "
|
||||
"admin_state_up=True, shared=None, "
|
||||
"mtu=None}>")
|
||||
"mtu=None, vlan_transparent=None}>")
|
||||
final_exp = exp_start_with + exp_middle + exp_end_with
|
||||
self.assertEqual(actual_repr_output, final_exp)
|
||||
|
||||
|
|
Loading…
Reference in New Issue