Remove legacy network-related code
In this patch 'networking' field was removed from environment and environment template models. Also, it was cleared from DB and tests. Change-Id: I372f032a2b1fad1bd9c65016a8d3330bba4bf853 Closes-Bug: #1314192
This commit is contained in:
parent
394f9f0f67
commit
53615655f2
@ -64,7 +64,6 @@ class ResultEndpoint(object):
|
||||
if environment.description['Objects'] is not None:
|
||||
environment.description['Objects']['services'] = \
|
||||
environment.description['Objects'].pop('applications', [])
|
||||
# environment.networking = result.get('networking', {})
|
||||
action_name = 'Deployment'
|
||||
deleted = False
|
||||
else:
|
||||
|
@ -0,0 +1,42 @@
|
||||
# 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.
|
||||
|
||||
"""
|
||||
Revision ID: 010
|
||||
Revises: None
|
||||
Create Date: 2015-09-08 00:00:00.698760
|
||||
|
||||
"""
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '010'
|
||||
down_revision = '009'
|
||||
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
MYSQL_ENGINE = 'InnoDB'
|
||||
MYSQL_CHARSET = 'utf8'
|
||||
|
||||
|
||||
def upgrade():
|
||||
op.drop_column('environment', 'networking')
|
||||
op.drop_column('environment-template', 'networking')
|
||||
|
||||
|
||||
def downgrade():
|
||||
op.add_column('environment', sa.Column('networking', sa.Text(),
|
||||
nullable=True))
|
||||
op.add_column('environment-template', sa.Column('networking', sa.Text(),
|
||||
nullable=True))
|
@ -66,7 +66,6 @@ class Environment(Base, TimestampMixin):
|
||||
tenant_id = sa.Column(sa.String(36), nullable=False)
|
||||
version = sa.Column(sa.BigInteger, nullable=False, default=0)
|
||||
description = sa.Column(st.JsonBlob(), nullable=False, default={})
|
||||
networking = sa.Column(st.JsonBlob(), nullable=True, default={})
|
||||
|
||||
sessions = sa_orm.relationship("Session", backref='environment',
|
||||
cascade='save-update, merge, delete')
|
||||
@ -98,7 +97,6 @@ class EnvironmentTemplate(Base, TimestampMixin):
|
||||
tenant_id = sa.Column(sa.String(36), nullable=False)
|
||||
version = sa.Column(sa.BigInteger, nullable=False, default=0)
|
||||
description = sa.Column(st.JsonBlob(), nullable=False, default={})
|
||||
networking = sa.Column(st.JsonBlob(), nullable=True, default={})
|
||||
|
||||
def to_dict(self):
|
||||
dictionary = super(EnvironmentTemplate, self).to_dict()
|
||||
|
@ -42,7 +42,6 @@ class TestActionsApi(tb.ControllerTest, tb.MuranoApiTestCase):
|
||||
id='12345',
|
||||
name='my-env',
|
||||
version=0,
|
||||
networking={},
|
||||
created=fake_now,
|
||||
updated=fake_now,
|
||||
tenant_id=self.tenant,
|
||||
|
@ -60,7 +60,6 @@ class TestEnvTemplateApi(tb.ControllerTest, tb.MuranoApiTestCase):
|
||||
expected = {'tenant_id': self.tenant,
|
||||
'id': 'env_template_id',
|
||||
'name': 'mytemp',
|
||||
'networking': {},
|
||||
'version': 0,
|
||||
'created': timeutils.isotime(fake_now)[:-1],
|
||||
'updated': timeutils.isotime(fake_now)[:-1]}
|
||||
@ -161,7 +160,6 @@ class TestEnvTemplateApi(tb.ControllerTest, tb.MuranoApiTestCase):
|
||||
id='12345',
|
||||
name='my-temp',
|
||||
version=0,
|
||||
networking={},
|
||||
created=fake_now,
|
||||
updated=fake_now,
|
||||
tenant_id=self.tenant,
|
||||
@ -213,7 +211,6 @@ class TestEnvTemplateApi(tb.ControllerTest, tb.MuranoApiTestCase):
|
||||
id='12345',
|
||||
name='my-temp',
|
||||
version=0,
|
||||
networking={},
|
||||
created=fake_now,
|
||||
updated=fake_now,
|
||||
tenant_id=self.tenant,
|
||||
@ -246,7 +243,6 @@ class TestEnvTemplateApi(tb.ControllerTest, tb.MuranoApiTestCase):
|
||||
expected = {'tenant_id': self.tenant,
|
||||
'id': self.uuids[0],
|
||||
'name': 'env_template_name',
|
||||
'networking': {},
|
||||
'version': 0,
|
||||
'created': timeutils.isotime(fake_now)[:-1],
|
||||
'updated': timeutils.isotime(fake_now)[:-1]}
|
||||
|
@ -97,7 +97,6 @@ class TestEnvironmentApi(tb.ControllerTest, tb.MuranoApiTestCase):
|
||||
expected = {'tenant_id': self.tenant,
|
||||
'id': 'environment_id',
|
||||
'name': 'my_env',
|
||||
'networking': {},
|
||||
'version': 0,
|
||||
# TODO(sjmc7) - bug 1347298
|
||||
'created': timeutils.isotime(fake_now)[:-1],
|
||||
@ -201,7 +200,6 @@ class TestEnvironmentApi(tb.ControllerTest, tb.MuranoApiTestCase):
|
||||
id='12345',
|
||||
name='my-env',
|
||||
version=0,
|
||||
networking={},
|
||||
created=fake_now,
|
||||
updated=fake_now,
|
||||
tenant_id=self.tenant,
|
||||
@ -294,7 +292,6 @@ class TestEnvironmentApi(tb.ControllerTest, tb.MuranoApiTestCase):
|
||||
id=env_id,
|
||||
name=env_name,
|
||||
version=0,
|
||||
networking={},
|
||||
created=fake_now,
|
||||
updated=fake_now,
|
||||
tenant_id=self.tenant,
|
||||
|
Loading…
Reference in New Issue
Block a user