Merge "Remove legacy network-related code"
This commit is contained in:
commit
8141e7d41e
@ -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],
|
||||
@ -218,7 +217,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,
|
||||
@ -311,7 +309,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