diff options
Diffstat (limited to 'patches/fuel-web/0002-Add-arch-to-nailgun-release-and-target-image.patch')
-rw-r--r-- | patches/fuel-web/0002-Add-arch-to-nailgun-release-and-target-image.patch | 110 |
1 files changed, 96 insertions, 14 deletions
diff --git a/patches/fuel-web/0002-Add-arch-to-nailgun-release-and-target-image.patch b/patches/fuel-web/0002-Add-arch-to-nailgun-release-and-target-image.patch index c5742f01..7af57961 100644 --- a/patches/fuel-web/0002-Add-arch-to-nailgun-release-and-target-image.patch +++ b/patches/fuel-web/0002-Add-arch-to-nailgun-release-and-target-image.patch @@ -6,15 +6,17 @@ Thsi is required so that the TestVM image is created using a cirros image that is compatible with the architecture of the deployment setup. As a bonus, it is also used when building the target image. --- - nailgun/nailgun/consts.py | 5 +++ - .../alembic_migrations/versions/armband.py | 47 ++++++++++++++++++++++ + nailgun/nailgun/consts.py | 5 ++ + .../alembic_migrations/versions/armband.py | 53 ++++++++++++++++++++++ nailgun/nailgun/db/sqlalchemy/models/release.py | 8 ++++ nailgun/nailgun/fixtures/openstack.yaml | 3 ++ - .../nailgun/orchestrator/deployment_serializers.py | 9 ++++- + .../nailgun/orchestrator/deployment_serializers.py | 9 +++- .../orchestrator/provisioning_serializers.py | 3 +- - nailgun/nailgun/orchestrator/tasks_templates.py | 5 ++- + nailgun/nailgun/orchestrator/tasks_templates.py | 5 +- + .../integration/test_cluster_changes_handler.py | 12 ++--- + .../integration/test_orchestrator_serializer.py | 4 +- nailgun/nailgun/test/unit/test_tasks_templates.py | 6 ++- - 8 files changed, 80 insertions(+), 6 deletions(-) + 10 files changed, 94 insertions(+), 14 deletions(-) create mode 100644 nailgun/nailgun/db/migration/alembic_migrations/versions/armband.py diff --git a/nailgun/nailgun/consts.py b/nailgun/nailgun/consts.py @@ -35,10 +37,10 @@ index bb69168..2c19ec9 100644 'ha_full', diff --git a/nailgun/nailgun/db/migration/alembic_migrations/versions/armband.py b/nailgun/nailgun/db/migration/alembic_migrations/versions/armband.py new file mode 100644 -index 0000000..8b832df +index 0000000..ad297b1 --- /dev/null +++ b/nailgun/nailgun/db/migration/alembic_migrations/versions/armband.py -@@ -0,0 +1,47 @@ +@@ -0,0 +1,53 @@ +# Copyright 2016 Mirantis, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may @@ -66,23 +68,29 @@ index 0000000..8b832df +down_revision = '43b2cb64dae6' + +from alembic import op ++from nailgun.utils.migration import drop_enum +import sqlalchemy as sa -+from sqlalchemy.dialects import postgresql + +ENUMS = ( -+ 'release_arch') ++ 'release_arch', ++) ++ + +def upgrade(): + add_release_arch() + ++ +def downgrade(): + remove_release_arch() + map(drop_enum, ENUMS) + ++ +def add_release_arch(): + arch_enum = sa.Enum('amd64', 'arm64', name='release_arch') + arch_enum.create(op.get_bind(), checkfirst=False) -+ op.add_column('releases', sa.Column('arch', arch_enum, nullable=False)) ++ op.add_column('releases', sa.Column('arch', arch_enum, nullable=False, ++ server_default='amd64')) ++ + +def remove_release_arch(): + op.drop_column('releases', 'arch') @@ -106,7 +114,7 @@ index 96cf2ed..62ac2c1 100644 nullable=False, server_default='[]') description = Column(Unicode) diff --git a/nailgun/nailgun/fixtures/openstack.yaml b/nailgun/nailgun/fixtures/openstack.yaml -index 4daa2a2..733fa0c 100644 +index bf6f7c4..4979fb5 100644 --- a/nailgun/nailgun/fixtures/openstack.yaml +++ b/nailgun/nailgun/fixtures/openstack.yaml @@ -1913,6 +1913,7 @@ @@ -190,6 +198,83 @@ index 39f2067..cd2278c 100644 'timeout': settings.PROVISIONING_IMAGES_BUILD_TIMEOUT, 'retries': 1}}) +diff --git a/nailgun/nailgun/test/integration/test_cluster_changes_handler.py b/nailgun/nailgun/test/integration/test_cluster_changes_handler.py +index 56bd307..34b4ce3 100644 +--- a/nailgun/nailgun/test/integration/test_cluster_changes_handler.py ++++ b/nailgun/nailgun/test/integration/test_cluster_changes_handler.py +@@ -159,7 +159,7 @@ class TestHandlers(BaseIntegrationTest): + common_attrs['last_controller'] = controller_nodes[-1]['name'] + common_attrs['storage']['pg_num'] = 128 + +- common_attrs['test_vm_image'] = { ++ common_attrs['test_vm_image'] = [{ + 'container_format': 'bare', + 'public': 'true', + 'disk_format': 'qcow2', +@@ -171,7 +171,7 @@ class TestHandlers(BaseIntegrationTest): + """--property murano_image_info=""" + """'{"title": "Murano Demo", "type": "cirros.demo"}'""" + ), +- } ++ }] + + critical_mapping = { + 'primary-controller': True, +@@ -575,7 +575,7 @@ class TestHandlers(BaseIntegrationTest): + common_attrs['last_controller'] = controller_nodes[-1]['name'] + common_attrs['storage']['pg_num'] = 128 + +- common_attrs['test_vm_image'] = { ++ common_attrs['test_vm_image'] = [{ + 'container_format': 'bare', + 'public': 'true', + 'disk_format': 'qcow2', +@@ -587,7 +587,7 @@ class TestHandlers(BaseIntegrationTest): + """--property murano_image_info=""" + """'{"title": "Murano Demo", "type": "cirros.demo"}'""" + ), +- } ++ }] + + critical_mapping = { + 'primary-controller': True, +@@ -1062,7 +1062,7 @@ class TestHandlers(BaseIntegrationTest): + common_attrs['last_controller'] = controller_nodes[-1]['name'] + common_attrs['storage']['pg_num'] = 128 + +- common_attrs['test_vm_image'] = { ++ common_attrs['test_vm_image'] = [{ + 'container_format': 'bare', + 'public': 'true', + 'disk_format': 'qcow2', +@@ -1074,7 +1074,7 @@ class TestHandlers(BaseIntegrationTest): + """--property murano_image_info=""" + """'{"title": "Murano Demo", "type": "cirros.demo"}'""" + ), +- } ++ }] + + critical_mapping = { + 'primary-controller': True, +diff --git a/nailgun/nailgun/test/integration/test_orchestrator_serializer.py b/nailgun/nailgun/test/integration/test_orchestrator_serializer.py +index 8ce987a..e75b3c2 100644 +--- a/nailgun/nailgun/test/integration/test_orchestrator_serializer.py ++++ b/nailgun/nailgun/test/integration/test_orchestrator_serializer.py +@@ -2656,12 +2656,12 @@ class BaseDeploymentSerializer(base.BaseIntegrationTest): + + def check_no_murano_data(self): + glance_properties = self.serializer.generate_test_vm_image_data( +- self.env.nodes[0])['test_vm_image']['glance_properties'] ++ self.env.nodes[0])['test_vm_image'][0]['glance_properties'] + self.assertNotIn('murano_image_info', glance_properties) + + def check_murano_data(self): + glance_properties = self.serializer.generate_test_vm_image_data( +- self.env.nodes[0])['test_vm_image']['glance_properties'] ++ self.env.nodes[0])['test_vm_image'][0]['glance_properties'] + self.assertIn('murano_image_info', glance_properties) + + diff --git a/nailgun/nailgun/test/unit/test_tasks_templates.py b/nailgun/nailgun/test/unit/test_tasks_templates.py index a38e975..9cb9171 100644 --- a/nailgun/nailgun/test/unit/test_tasks_templates.py @@ -214,6 +299,3 @@ index a38e975..9cb9171 100644 self.assertEqual(jsonutils.loads(cmd), fuel_image_conf) def test_generate_ironic_bootstrap_keys_task(self): --- -1.9.1 - |