aboutsummaryrefslogtreecommitdiffstats
path: root/docker/smoke-cntt/testcases.yaml
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2020-05-24 12:04:16 +0200
committerCédric Ollivier <cedric.ollivier@orange.com>2020-05-24 12:05:27 +0200
commit7ccc1b0793e32cad3912e63bbca971d5c3ecd724 (patch)
treedf08bb8ad3adb529d90fd6bb81fca85193819032 /docker/smoke-cntt/testcases.yaml
parent82ceefd8f1609508a476aa2e4573e59926653165 (diff)
Precise validation configs in Neutron
ServerActionsTestJSON.test_reboot_server_hard [1] sometimes fails in gates. We may increase timeouts if it stills fails. [1] http://artifacts.opnfv.org/functest/LIQH38CPR30X/functest-opnfv-functest-smoke-hunter-tempest_full-run-649/tempest_full/tempest-report.html Change-Id: Ia27c0faead1df5c2b33a3e1a272e5a1010a5a83e Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
Diffstat (limited to 'docker/smoke-cntt/testcases.yaml')
0 files changed, 0 insertions, 0 deletions
id='n154' href='#n154'>154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301
From: Stanislaw Kardach <stanislaw.kardach@caviumnetworks.com>
Date: Wed, 24 Feb 2016 20:11:54 +0100
Subject: [PATCH] Add arch to nailgun release and target image

This 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         | 53 ++++++++++++++++++++++
 nailgun/nailgun/db/sqlalchemy/models/release.py    |  8 ++++
 nailgun/nailgun/fixtures/openstack.yaml            |  3 ++
 .../nailgun/orchestrator/deployment_serializers.py |  9 +++-
 .../orchestrator/provisioning_serializers.py       |  3 +-
 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 ++-
 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
index bb69168..2c19ec9 100644
--- a/nailgun/nailgun/consts.py
+++ b/nailgun/nailgun/consts.py
@@ -38,6 +38,11 @@ RELEASE_OS = Enum(
     )
 )
 
+RELEASE_ARCHS = Enum(
+    'amd64',
+    'arm64'
+)
+
 CLUSTER_MODES = Enum(
     'multinode',
     '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..8cca69c
--- /dev/null
+++ b/nailgun/nailgun/db/migration/alembic_migrations/versions/armband.py
@@ -0,0 +1,53 @@
+#    Copyright 2016 Cavium, Inc.
+#
+#    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.
+
+"""Armband patches
+
+Revision ID: f9b7fd91ac19
+Revises: 43b2cb64dae6
+Create Date: 2016-03-01 23:18:58.712617
+
+"""
+
+# revision identifiers, used by Alembic.
+revision = 'f9b7fd91ac19'
+down_revision = '43b2cb64dae6'
+
+from alembic import op
+from nailgun.utils.migration import drop_enum
+import sqlalchemy as sa
+
+ENUMS = (
+    '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,
+                  server_default='amd64'))
+
+
+def remove_release_arch():
+    op.drop_column('releases', 'arch')
diff --git a/nailgun/nailgun/db/sqlalchemy/models/release.py b/nailgun/nailgun/db/sqlalchemy/models/release.py
index 96cf2ed..62ac2c1 100644
--- a/nailgun/nailgun/db/sqlalchemy/models/release.py
+++ b/nailgun/nailgun/db/sqlalchemy/models/release.py
@@ -38,6 +38,14 @@ class Release(Base):
     id = Column(Integer, primary_key=True)
     name = Column(Unicode(100), nullable=False)
     version = Column(String(30), nullable=False)
+    arch = Column(
+        Enum(
+            *consts.RELEASE_ARCHS,
+            name='release_arch'
+        ),
+        nullable=False,
+        default=consts.RELEASE_ARCHS.amd64
+    )
     can_update_from_versions = Column(JSON, default=[],
                                       nullable=False, server_default='[]')
     description = Column(Unicode)
diff --git a/nailgun/nailgun/fixtures/openstack.yaml b/nailgun/nailgun/fixtures/openstack.yaml
index a330f4e..9da1346 100644
--- a/nailgun/nailgun/fixtures/openstack.yaml
+++ b/nailgun/nailgun/fixtures/openstack.yaml
@@ -1913,6 +1913,7 @@
     name: "Liberty on CentOS 6.5"
     state: "unavailable"
     version: "liberty-8.0"
+    arch: "amd64"
     can_update_from_versions: []
     operating_system: "CentOS"
     description: "This option will install the OpenStack Liberty packages using a CentOS based operating system. With high availability features built in, you are getting a robust, enterprise-grade OpenStack deployment."
@@ -1986,6 +1987,7 @@
   fields:
     name: "Liberty on Ubuntu 14.04"
     version: "liberty-8.0"
+    arch: "amd64"
     can_update_from_versions: []
     operating_system: "Ubuntu"
     description: "This option will install the OpenStack Liberty packages using Ubuntu as a base operating system. With high availability features built in, you are getting a robust, enterprise-grade OpenStack deployment."
@@ -2084,6 +2086,7 @@
   fields:
     name: "Liberty on Ubuntu 14.04 (aarch64)"
     version: "liberty-8.0"
+    arch: "arm64"
     can_update_from_versions: []
     operating_system: "Ubuntu"
     description: "This option will install the OpenStack Liberty packages using Ubuntu as a base operating system. With high availability features built in, you are getting a robust, enterprise-grade OpenStack deployment."
diff --git a/nailgun/nailgun/orchestrator/deployment_serializers.py b/nailgun/nailgun/orchestrator/deployment_serializers.py
index 375a1ce..b8b38e2 100644
--- a/nailgun/nailgun/orchestrator/deployment_serializers.py
+++ b/nailgun/nailgun/orchestrator/deployment_serializers.py
@@ -291,7 +291,14 @@ class DeploymentMultinodeSerializer(object):
             img_dir = '/usr/share/cirros-testvm/'
         else:
             img_dir = '/opt/vm/'
-        image_data['img_path'] = '{0}cirros-x86_64-disk.img'.format(img_dir)
+        release = self.current_release(node.cluster)
+        arch = release.arch
+        if arch == "amd64":
+            arch = "x86_64"
+        elif arch == "arm64":
+            arch = "aarch64"
+        image_data['img_path'] = '{0}cirros-{1}-disk.img'.format(img_dir,
+            arch)
 
         glance_properties = []
 
diff --git a/nailgun/nailgun/orchestrator/provisioning_serializers.py b/nailgun/nailgun/orchestrator/provisioning_serializers.py
index 04ae0b0..c927f03 100644
--- a/nailgun/nailgun/orchestrator/provisioning_serializers.py
+++ b/nailgun/nailgun/orchestrator/provisioning_serializers.py
@@ -313,7 +313,8 @@ class ProvisioningSerializer61(ProvisioningSerializer):
                     [consts.MASTER_NODE_UID],
                     attrs['repo_setup']['repos'],
                     attrs['provision'],
-                    cluster.id))
+                    cluster.id,
+                    cluster.release.arch))
 
         # NOTE(kozhukalov): This pre-provision task is going to be
         # removed by 7.0 because we need this only for classic way of
diff --git a/nailgun/nailgun/orchestrator/tasks_templates.py b/nailgun/nailgun/orchestrator/tasks_templates.py
index 39f2067..cd2278c 100644
--- a/nailgun/nailgun/orchestrator/tasks_templates.py
+++ b/nailgun/nailgun/orchestrator/tasks_templates.py
@@ -207,7 +207,7 @@ def make_reboot_task(uids, task):
             'timeout': task['parameters']['timeout']}}
 
 
-def make_provisioning_images_task(uids, repos, provision_data, cid):
+def make_provisioning_images_task(uids, repos, provision_data, cid, arch):
     conf = {
         'repos': repos,
         'image_data': provision_data['image_data'],
@@ -224,7 +224,8 @@ def make_provisioning_images_task(uids, repos, provision_data, cid):
                     "--image_build_dir /var/lib/fuel/ibp "
                     "--log-file /var/log/fuel-agent-env-{0}.log "
                     "--data_driver nailgun_build_image "
-                    "--input_data '{1}'").format(cid, conf),
+                    "--target_arch {1} "
+                    "--input_data '{2}'").format(cid, arch, conf),
             '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
+++ b/nailgun/nailgun/test/unit/test_tasks_templates.py
@@ -133,7 +133,8 @@ class TestMakeTask(base.BaseTestCase):
                         'uri': 'http://uri'
                     }
                 }},
-            cid=123)
+            cid=123,
+            arch='amd64')
 
         fuel_image_conf = {
             "image_data": {
@@ -168,7 +169,8 @@ class TestMakeTask(base.BaseTestCase):
         cmd = result["parameters"]["cmd"].lstrip(
             "fa_build_image --image_build_dir /var/lib/fuel/ibp "
             "--log-file /var/log/fuel-agent-env-123.log "
-            "--data_driver nailgun_build_image --input_data '").rstrip("'")
+            "--data_driver nailgun_build_image --target_arch amd64"
+            " --input_data '").rstrip("'")
         self.assertEqual(jsonutils.loads(cmd), fuel_image_conf)
 
     def test_generate_ironic_bootstrap_keys_task(self):