Create specific flavor for neutron-l3-agent HA test 01/58601/2
authorGeorg Kunz <georg.kunz@ericsson.com>
Fri, 15 Jun 2018 20:20:01 +0000 (22:20 +0200)
committerDan Xu <xudan16@huawei.com>
Tue, 19 Jun 2018 04:14:05 +0000 (04:14 +0000)
The neutron-l3-agent test assumes that a default image and flavor are
available. On current OPNFV deployments, these resources do not exist
anymore by default and hence the test case fails.

This patch enables Dovetail to create a specific flavor as part of the
test case config. This is temporary workaround until the test case
itself takes care of checking and creating all resources needed. A
ticket for the HA project has been created accordingly:
https://jira.opnfv.org/browse/HA-36

Change-Id: I6523d8411fe853a5645566b2fabe1409b5715491
Signed-off-by: Georg Kunz <georg.kunz@ericsson.com>
etc/testcase/ha.neutron_l3_agent.yml

index f5170d4..a4daad7 100644 (file)
@@ -6,17 +6,21 @@ dovetail.ha.neutron_l3_agent:
     type: yardstick
     testcase: opnfv_yardstick_tc058
     pre_condition:
-      - 'source /etc/yardstick/openstack.creds && openstack --insecure image create cirros-ha-11
-         --disk-format qcow2 --container-format bare --public
-         --file /home/opnfv/userconfig/images/cirros-0.4.0-x86_64-disk.img'
+      - 'source /etc/yardstick/openstack.creds &&
+         openstack --insecure image create neutron-l3-agent_ha_image
+           --disk-format qcow2 --container-format bare --public
+           --file /home/opnfv/userconfig/images/cirros-0.4.0-x86_64-disk.img &&
+         openstack --insecure flavor create --ram 512 --vcpu 1 --disk 1 neutron-l3-agent_ha_flavor'
     cmds:
       - "cd /home/opnfv/repos/yardstick && source /etc/yardstick/openstack.creds &&
          yardstick task start tests/opnfv/test_cases/{{validate_testcase}}.yaml
          --output-file /tmp/yardstick/{{testcase}}.out
          --task-args '{'file': '/home/opnfv/userconfig/pre_config/pod.yaml',
-         'image': 'cirros-ha-11', 'flavor': 'm1.tiny'}'"
+         'image': 'neutron-l3-agent_ha_image', 'flavor': 'neutron-l3-agent_ha_flavor'}'"
     post_condition:
-      - 'source /etc/yardstick/openstack.creds && openstack --insecure image delete cirros-ha-11'
+      - 'source /etc/yardstick/openstack.creds &&
+         openstack --insecure image delete neutron-l3-agent_ha_image &&
+         openstack --insecure flavor delete neutron-l3-agent_ha_flavor'
   report:
     source_archive_files:
       - yardstick.log