| Sean Dague | e263c82 | 2014-12-05 14:25:28 -0500 | [diff] [blame] | 1 | #!/bin/bash | 
|  | 2 | # | 
| Sean Dague | d093121 | 2012-10-04 16:06:44 -0400 | [diff] [blame] | 3 | # lib/tempest | 
| Dean Troyer | 6d04fd7 | 2012-12-21 11:03:37 -0600 | [diff] [blame] | 4 | # Install and configure Tempest | 
| Sean Dague | d093121 | 2012-10-04 16:06:44 -0400 | [diff] [blame] | 5 |  | 
|  | 6 | # Dependencies: | 
| Adam Spiers | 6a5aa7c | 2013-10-24 11:27:02 +0100 | [diff] [blame] | 7 | # | 
|  | 8 | # - ``functions`` file | 
|  | 9 | # - ``lib/nova`` service is running | 
|  | 10 | # - Global vars that are assumed to be defined: | 
|  | 11 | #   - ``DEST``, ``FILES`` | 
|  | 12 | #   - ``ADMIN_PASSWORD`` | 
|  | 13 | #   - ``DEFAULT_IMAGE_NAME`` | 
| Matthew Treinish | befe092 | 2017-02-16 15:45:11 -0500 | [diff] [blame] | 14 | #   - ``DEFAULT_IMAGE_FILE_NAME`` | 
| Adam Spiers | 6a5aa7c | 2013-10-24 11:27:02 +0100 | [diff] [blame] | 15 | #   - ``S3_SERVICE_PORT`` | 
|  | 16 | #   - ``SERVICE_HOST`` | 
|  | 17 | #   - ``BASE_SQL_CONN`` ``lib/database`` declares | 
|  | 18 | #   - ``PUBLIC_NETWORK_NAME`` | 
| Adam Spiers | 6a5aa7c | 2013-10-24 11:27:02 +0100 | [diff] [blame] | 19 | #   - ``VIRT_DRIVER`` | 
|  | 20 | #   - ``LIBVIRT_TYPE`` | 
| Dr. Jens Harbott | eb0ac1d | 2024-07-08 18:02:25 +0200 | [diff] [blame] | 21 | #   - ``KEYSTONE_SERVICE_URI_V3`` from lib/keystone | 
| Adam Spiers | 6a5aa7c | 2013-10-24 11:27:02 +0100 | [diff] [blame] | 22 | # | 
| Attila Fazekas | 2aa3517 | 2012-12-05 20:03:40 +0100 | [diff] [blame] | 23 | # Optional Dependencies: | 
| Adam Spiers | 6a5aa7c | 2013-10-24 11:27:02 +0100 | [diff] [blame] | 24 | # | 
| Einst Crazy | f54f60a | 2015-10-30 23:00:57 +0800 | [diff] [blame] | 25 | # - ``ALT_*`` | 
| Adam Spiers | 6a5aa7c | 2013-10-24 11:27:02 +0100 | [diff] [blame] | 26 | # - ``LIVE_MIGRATION_AVAILABLE`` | 
|  | 27 | # - ``USE_BLOCK_MIGRATION_FOR_LIVE_MIGRATION`` | 
|  | 28 | # - ``DEFAULT_INSTANCE_TYPE`` | 
|  | 29 | # - ``DEFAULT_INSTANCE_USER`` | 
| Weronika Sikora | d7d87b0 | 2019-09-18 13:45:53 +0000 | [diff] [blame] | 30 | # - ``DEFAULT_INSTANCE_ALT_USER`` | 
| Swapnil Kulkarni | 09fb7ba | 2014-10-16 06:30:28 +0000 | [diff] [blame] | 31 | # - ``CINDER_ENABLED_BACKENDS`` | 
| Lukas Piwowarski | 8c25a85 | 2023-10-05 08:11:05 +0000 | [diff] [blame] | 32 | # - ``CINDER_BACKUP_DRIVER`` | 
| Matt Riedemann | 89ee585 | 2015-07-09 13:25:04 -0700 | [diff] [blame] | 33 | # - ``NOVA_ALLOW_DUPLICATE_NETWORKS`` | 
| Adam Spiers | 6a5aa7c | 2013-10-24 11:27:02 +0100 | [diff] [blame] | 34 | # | 
| Sean Dague | d093121 | 2012-10-04 16:06:44 -0400 | [diff] [blame] | 35 | # ``stack.sh`` calls the entry points in this order: | 
|  | 36 | # | 
| Adam Spiers | 6a5aa7c | 2013-10-24 11:27:02 +0100 | [diff] [blame] | 37 | # - install_tempest | 
|  | 38 | # - configure_tempest | 
| Sean Dague | d093121 | 2012-10-04 16:06:44 -0400 | [diff] [blame] | 39 |  | 
|  | 40 | # Save trace setting | 
| Ian Wienand | 523f488 | 2015-10-13 11:03:03 +1100 | [diff] [blame] | 41 | _XTRACE_TEMPEST=$(set +o | grep xtrace) | 
| Sean Dague | d093121 | 2012-10-04 16:06:44 -0400 | [diff] [blame] | 42 | set +o xtrace | 
|  | 43 |  | 
| Dean Troyer | 6d04fd7 | 2012-12-21 11:03:37 -0600 | [diff] [blame] | 44 |  | 
| Sean Dague | d093121 | 2012-10-04 16:06:44 -0400 | [diff] [blame] | 45 | # Defaults | 
|  | 46 | # -------- | 
|  | 47 |  | 
| Sean Dague | d093121 | 2012-10-04 16:06:44 -0400 | [diff] [blame] | 48 | # Set up default directories | 
|  | 49 | TEMPEST_DIR=$DEST/tempest | 
| john-griffith | dc4dc7f | 2014-01-22 18:09:32 -0700 | [diff] [blame] | 50 | TEMPEST_CONFIG_DIR=${TEMPEST_CONFIG_DIR:-$TEMPEST_DIR/etc} | 
|  | 51 | TEMPEST_CONFIG=$TEMPEST_CONFIG_DIR/tempest.conf | 
| Matthew Treinish | 14ccba0 | 2013-07-29 16:15:53 -0400 | [diff] [blame] | 52 | TEMPEST_STATE_PATH=${TEMPEST_STATE_PATH:=$DATA_DIR/tempest} | 
| Attila Fazekas | 2aa3517 | 2012-12-05 20:03:40 +0100 | [diff] [blame] | 53 |  | 
| Arx Cruz | 1bde9b4 | 2014-07-18 11:34:33 -0300 | [diff] [blame] | 54 | # This is the timeout that tempest will wait for a VM to change state, | 
|  | 55 | # spawn, delete, etc. | 
|  | 56 | # The default is set to 196 seconds. | 
|  | 57 | BUILD_TIMEOUT=${BUILD_TIMEOUT:-196} | 
| Sean Dague | d093121 | 2012-10-04 16:06:44 -0400 | [diff] [blame] | 58 |  | 
| Joe Gordon | c9b245b | 2015-02-10 14:32:39 -0800 | [diff] [blame] | 59 | # This must be False on stable branches, as master tempest | 
|  | 60 | # deps do not match stable branch deps. Set this to True to | 
| Dean Troyer | dc97cb7 | 2015-03-28 08:20:50 -0500 | [diff] [blame] | 61 | # have tempest installed in DevStack by default. | 
| Matthew Treinish | cb3cece | 2015-03-16 10:37:51 -0400 | [diff] [blame] | 62 | INSTALL_TEMPEST=${INSTALL_TEMPEST:-"True"} | 
| Joe Gordon | c9b245b | 2015-02-10 14:32:39 -0800 | [diff] [blame] | 63 |  | 
| Matthew Treinish | 440464c | 2016-05-04 11:55:12 -0400 | [diff] [blame] | 64 | # This variable is passed directly to pip install inside the common tox venv | 
|  | 65 | # that is created | 
|  | 66 | TEMPEST_PLUGINS=${TEMPEST_PLUGINS:-0} | 
|  | 67 |  | 
| john-griffith | dc4dc7f | 2014-01-22 18:09:32 -0700 | [diff] [blame] | 68 | # Cinder/Volume variables | 
|  | 69 | TEMPEST_VOLUME_DRIVER=${TEMPEST_VOLUME_DRIVER:-default} | 
| Eric Harney | 0145648 | 2014-10-14 18:53:53 -0400 | [diff] [blame] | 70 | TEMPEST_DEFAULT_VOLUME_VENDOR="Open Source" | 
|  | 71 | TEMPEST_VOLUME_VENDOR=${TEMPEST_VOLUME_VENDOR:-$TEMPEST_DEFAULT_VOLUME_VENDOR} | 
|  | 72 | TEMPEST_DEFAULT_STORAGE_PROTOCOL="iSCSI" | 
|  | 73 | TEMPEST_STORAGE_PROTOCOL=${TEMPEST_STORAGE_PROTOCOL:-$TEMPEST_DEFAULT_STORAGE_PROTOCOL} | 
| Dean Troyer | cc6b443 | 2013-04-08 15:38:03 -0500 | [diff] [blame] | 74 |  | 
| Brian Rosmaita | 111a38b | 2022-05-13 20:53:26 -0400 | [diff] [blame] | 75 | # Glance/Image variables | 
|  | 76 | # When Glance image import is enabled, image creation is asynchronous and images | 
|  | 77 | # may not yet be active when tempest looks for them.  In that case, we poll | 
|  | 78 | # Glance every TEMPEST_GLANCE_IMPORT_POLL_INTERVAL seconds for the number of | 
|  | 79 | # times specified by TEMPEST_GLANCE_IMPORT_POLL_LIMIT.  If you are importing | 
|  | 80 | # multiple images, set TEMPEST_GLANCE_IMAGE_COUNT so the poller does not quit | 
|  | 81 | # too early (though it will not exceed the polling limit). | 
|  | 82 | TEMPEST_GLANCE_IMPORT_POLL_INTERVAL=${TEMPEST_GLANCE_IMPORT_POLL_INTERVAL:-1} | 
|  | 83 | TEMPEST_GLANCE_IMPORT_POLL_LIMIT=${TEMPEST_GLANCE_IMPORT_POLL_LIMIT:-12} | 
|  | 84 | TEMPEST_GLANCE_IMAGE_COUNT=${TEMPEST_GLANCE_IMAGE_COUNT:-1} | 
|  | 85 |  | 
| armando-migliaccio | 71ef61a | 2014-02-19 22:19:24 -0800 | [diff] [blame] | 86 | # Neutron/Network variables | 
| Sean Dague | 5375329 | 2014-12-04 19:38:15 -0500 | [diff] [blame] | 87 | IPV6_ENABLED=$(trueorfalse True IPV6_ENABLED) | 
|  | 88 | IPV6_SUBNET_ATTRIBUTES_ENABLED=$(trueorfalse True IPV6_SUBNET_ATTRIBUTES_ENABLED) | 
| armando-migliaccio | 71ef61a | 2014-02-19 22:19:24 -0800 | [diff] [blame] | 89 |  | 
| Matthew Treinish | df8f43b | 2015-08-09 20:30:39 -0400 | [diff] [blame] | 90 | # Do we want to make a configuration where Tempest has admin on | 
|  | 91 | # the cloud. We don't always want to so that we can ensure Tempest | 
|  | 92 | # would work on a public cloud. | 
|  | 93 | TEMPEST_HAS_ADMIN=$(trueorfalse True TEMPEST_HAS_ADMIN) | 
|  | 94 |  | 
|  | 95 | # Credential provider configuration option variables | 
|  | 96 | TEMPEST_ALLOW_TENANT_ISOLATION=${TEMPEST_ALLOW_TENANT_ISOLATION:-$TEMPEST_HAS_ADMIN} | 
| Matthew Treinish | 403fbb1 | 2015-08-24 21:17:37 -0400 | [diff] [blame] | 97 | TEMPEST_USE_TEST_ACCOUNTS=$(trueorfalse False TEMPEST_USE_TEST_ACCOUNTS) | 
| Matthew Treinish | df8f43b | 2015-08-09 20:30:39 -0400 | [diff] [blame] | 98 |  | 
|  | 99 | # The number of workers tempest is expected to be run with. This is used for | 
|  | 100 | # generating a accounts.yaml for running with test-accounts. This is also the | 
|  | 101 | # same variable that devstack-gate uses to specify the number of workers that | 
|  | 102 | # it will run tempest with | 
|  | 103 | TEMPEST_CONCURRENCY=${TEMPEST_CONCURRENCY:-$(nproc)} | 
|  | 104 |  | 
| Sean Mooney | 6df5371 | 2024-07-12 20:08:58 +0100 | [diff] [blame] | 105 | TEMPEST_FLAVOR_RAM=${TEMPEST_FLAVOR_RAM:-192} | 
|  | 106 | TEMPEST_FLAVOR_ALT_RAM=${TEMPEST_FLAVOR_ALT_RAM:-256} | 
|  | 107 |  | 
| Dean Troyer | cc6b443 | 2013-04-08 15:38:03 -0500 | [diff] [blame] | 108 | # Functions | 
|  | 109 | # --------- | 
| Sean Dague | d093121 | 2012-10-04 16:06:44 -0400 | [diff] [blame] | 110 |  | 
| Salvatore | 33e8ee2 | 2014-10-05 01:36:34 +0200 | [diff] [blame] | 111 | # remove_disabled_extension - removes disabled extensions from the list of extensions | 
|  | 112 | # to test for a given service | 
|  | 113 | function remove_disabled_extensions { | 
|  | 114 | local extensions_list=$1 | 
|  | 115 | shift | 
|  | 116 | local disabled_exts=$* | 
| fumihiko kakuma | 8606c98 | 2015-04-13 09:55:06 +0900 | [diff] [blame] | 117 | remove_disabled_services "$extensions_list" "$disabled_exts" | 
| Salvatore | 33e8ee2 | 2014-10-05 01:36:34 +0200 | [diff] [blame] | 118 | } | 
|  | 119 |  | 
| Matt Riedemann | 23d33a8 | 2018-11-21 12:10:32 -0500 | [diff] [blame] | 120 | # image_size_in_gib - converts an image size from bytes to GiB, rounded up | 
|  | 121 | # Takes an image ID parameter as input | 
|  | 122 | function image_size_in_gib { | 
|  | 123 | local size | 
| Julia Kreger | 5c9affd | 2021-03-12 11:19:52 -0800 | [diff] [blame] | 124 | size=$(openstack --os-cloud devstack-admin image show $1 -c size -f value) | 
| Lucas Alvares Gomes | 40f7579 | 2019-11-26 15:20:03 +0000 | [diff] [blame] | 125 | echo $size | python3 -c "import math; print(int(math.ceil(float(int(input()) / 1024.0 ** 3))))" | 
| Matt Riedemann | 23d33a8 | 2018-11-21 12:10:32 -0500 | [diff] [blame] | 126 | } | 
|  | 127 |  | 
| Ghanshyam Mann | 3bdc8f6 | 2021-02-09 12:56:34 -0600 | [diff] [blame] | 128 | function set_tempest_venv_constraints { | 
|  | 129 | local tmp_c | 
|  | 130 | tmp_c=$1 | 
|  | 131 | if [[ $TEMPEST_VENV_UPPER_CONSTRAINTS == "master" ]]; then | 
| Dr. Jens Harbott | 2ef4a4c | 2022-01-03 15:13:44 +0100 | [diff] [blame] | 132 | (cd $REQUIREMENTS_DIR && | 
|  | 133 | git show master:upper-constraints.txt 2>/dev/null || | 
|  | 134 | git show origin/master:upper-constraints.txt) > $tmp_c | 
| Ghanshyam Mann | 7fe9981 | 2023-01-26 22:28:07 -0600 | [diff] [blame] | 135 | # NOTE(gmann): we need to set the below env var pointing to master | 
|  | 136 | # constraints even that is what default in tox.ini. Otherwise it can | 
|  | 137 | # create the issue for grenade run where old and new devstack can have | 
|  | 138 | # different tempest (old and master) to install. For detail problem, | 
|  | 139 | # refer to the https://bugs.launchpad.net/devstack/+bug/2003993 | 
|  | 140 | export UPPER_CONSTRAINTS_FILE=https://releases.openstack.org/constraints/upper/master | 
|  | 141 | export TOX_CONSTRAINTS_FILE=https://releases.openstack.org/constraints/upper/master | 
| Ghanshyam Mann | 3bdc8f6 | 2021-02-09 12:56:34 -0600 | [diff] [blame] | 142 | else | 
|  | 143 | echo "Using $TEMPEST_VENV_UPPER_CONSTRAINTS constraints in Tempest virtual env." | 
|  | 144 | cat $TEMPEST_VENV_UPPER_CONSTRAINTS > $tmp_c | 
|  | 145 | # NOTE: setting both tox env var and once Tempest start using new var | 
|  | 146 | # TOX_CONSTRAINTS_FILE then we can remove the old one. | 
|  | 147 | export UPPER_CONSTRAINTS_FILE=$TEMPEST_VENV_UPPER_CONSTRAINTS | 
|  | 148 | export TOX_CONSTRAINTS_FILE=$TEMPEST_VENV_UPPER_CONSTRAINTS | 
|  | 149 | fi | 
|  | 150 | } | 
|  | 151 |  | 
| Brian Rosmaita | 111a38b | 2022-05-13 20:53:26 -0400 | [diff] [blame] | 152 | # Makes a call to glance to get a list of active images, ignoring | 
|  | 153 | # ramdisk and kernel images.  Takes 3 arguments, an array and two | 
|  | 154 | # variables.  The array will contain the list of active image UUIDs; | 
|  | 155 | # if an image with ``DEFAULT_IMAGE_NAME`` is found, its UUID will be | 
| Ghanshyam Mann | e32715b | 2023-06-22 21:10:31 -0500 | [diff] [blame] | 156 | # set as the value img_id ($2) parameters. | 
| Brian Rosmaita | 111a38b | 2022-05-13 20:53:26 -0400 | [diff] [blame] | 157 | function get_active_images { | 
|  | 158 | declare -n img_array=$1 | 
|  | 159 | declare -n img_id=$2 | 
| Brian Rosmaita | 111a38b | 2022-05-13 20:53:26 -0400 | [diff] [blame] | 160 |  | 
|  | 161 | # start with a fresh array in case we are called multiple times | 
|  | 162 | img_array=() | 
|  | 163 |  | 
|  | 164 | while read -r IMAGE_NAME IMAGE_UUID; do | 
|  | 165 | if [ "$IMAGE_NAME" = "$DEFAULT_IMAGE_NAME" ]; then | 
|  | 166 | img_id="$IMAGE_UUID" | 
| Brian Rosmaita | 111a38b | 2022-05-13 20:53:26 -0400 | [diff] [blame] | 167 | fi | 
|  | 168 | img_array+=($IMAGE_UUID) | 
|  | 169 | done < <(openstack --os-cloud devstack-admin image list --property status=active | awk -F'|' '!/^(+--)|ID|aki|ari/ { print $3,$2 }') | 
|  | 170 | } | 
|  | 171 |  | 
|  | 172 | function poll_glance_images { | 
|  | 173 | declare -n image_array=$1 | 
|  | 174 | declare -n image_id=$2 | 
| Brian Rosmaita | 111a38b | 2022-05-13 20:53:26 -0400 | [diff] [blame] | 175 | local -i poll_count | 
|  | 176 |  | 
|  | 177 | poll_count=$TEMPEST_GLANCE_IMPORT_POLL_LIMIT | 
|  | 178 | while (( poll_count-- > 0 )) ; do | 
|  | 179 | sleep $TEMPEST_GLANCE_IMPORT_POLL_INTERVAL | 
| Ghanshyam Mann | e32715b | 2023-06-22 21:10:31 -0500 | [diff] [blame] | 180 | get_active_images image_array image_id | 
| Brian Rosmaita | 111a38b | 2022-05-13 20:53:26 -0400 | [diff] [blame] | 181 | if (( ${#image_array[*]} >= $TEMPEST_GLANCE_IMAGE_COUNT )) ; then | 
|  | 182 | return | 
|  | 183 | fi | 
|  | 184 | done | 
|  | 185 | local msg | 
|  | 186 | msg="Polling limit of $TEMPEST_GLANCE_IMPORT_POLL_LIMIT exceeded; " | 
|  | 187 | msg+="poll interval was $TEMPEST_GLANCE_IMPORT_POLL_INTERVAL sec" | 
|  | 188 | warn $LINENO "$msg" | 
|  | 189 | } | 
|  | 190 |  | 
| Sean Dague | d093121 | 2012-10-04 16:06:44 -0400 | [diff] [blame] | 191 | # configure_tempest() - Set config files, create data dirs, etc | 
| Ian Wienand | aee18c7 | 2014-02-21 15:35:08 +1100 | [diff] [blame] | 192 | function configure_tempest { | 
| Joe Gordon | c9b245b | 2015-02-10 14:32:39 -0800 | [diff] [blame] | 193 | if [[ "$INSTALL_TEMPEST" == "True" ]]; then | 
|  | 194 | setup_develop $TEMPEST_DIR | 
|  | 195 | else | 
|  | 196 | # install testr since its used to process tempest logs | 
| Sean Dague | 60996b1 | 2015-04-08 09:06:49 -0400 | [diff] [blame] | 197 | pip_install_gr testrepository | 
| Joe Gordon | c9b245b | 2015-02-10 14:32:39 -0800 | [diff] [blame] | 198 | fi | 
| Joe Gordon | d5ac785 | 2015-02-06 19:29:23 -0800 | [diff] [blame] | 199 |  | 
| Attila Fazekas | 65c0846 | 2012-12-07 14:20:51 +0100 | [diff] [blame] | 200 | local image_lines | 
|  | 201 | local images | 
|  | 202 | local num_images | 
|  | 203 | local image_uuid | 
|  | 204 | local image_uuid_alt | 
| Attila Fazekas | 65c0846 | 2012-12-07 14:20:51 +0100 | [diff] [blame] | 205 | local password | 
|  | 206 | local line | 
|  | 207 | local flavors | 
| Clark Boylan | 3b80bde | 2013-11-20 17:51:50 -0800 | [diff] [blame] | 208 | local available_flavors | 
| Attila Fazekas | 65c0846 | 2012-12-07 14:20:51 +0100 | [diff] [blame] | 209 | local flavors_ref | 
|  | 210 | local flavor_lines | 
| Szymon Datko | 28c4981 | 2019-08-22 15:39:53 +0200 | [diff] [blame] | 211 | local flavor_ref_size | 
|  | 212 | local flavor_ref_alt_size | 
| Maru Newby | a5c774e | 2012-12-10 10:40:01 +0000 | [diff] [blame] | 213 | local public_network_id | 
| Maru Newby | 31c94ab | 2012-12-19 03:59:20 +0000 | [diff] [blame] | 214 | local public_router_id | 
| Sean Dague | 5544c4a | 2016-01-25 08:27:06 -0500 | [diff] [blame] | 215 | local ssh_connect_method="floating" | 
| Matt Riedemann | 23d33a8 | 2018-11-21 12:10:32 -0500 | [diff] [blame] | 216 | local disk | 
| Attila Fazekas | 2aa3517 | 2012-12-05 20:03:40 +0100 | [diff] [blame] | 217 |  | 
| Dean Troyer | 6d04fd7 | 2012-12-21 11:03:37 -0600 | [diff] [blame] | 218 | # Save IFS | 
| Attila Fazekas | 2aa3517 | 2012-12-05 20:03:40 +0100 | [diff] [blame] | 219 | ifs=$IFS | 
|  | 220 |  | 
|  | 221 | # Glance should already contain images to be used in tempest | 
|  | 222 | # testing. Here we simply look for images stored in Glance | 
|  | 223 | # and set the appropriate variables for use in the tempest config | 
|  | 224 | # We ignore ramdisk and kernel images, look for the default image | 
| Attila Fazekas | 65c0846 | 2012-12-07 14:20:51 +0100 | [diff] [blame] | 225 | # ``DEFAULT_IMAGE_NAME``. If not found, we set the ``image_uuid`` to the | 
|  | 226 | # first image returned and set ``image_uuid_alt`` to the second, | 
| Attila Fazekas | 2aa3517 | 2012-12-05 20:03:40 +0100 | [diff] [blame] | 227 | # if there is more than one returned... | 
|  | 228 | # ... Also ensure we only take active images, so we don't get snapshots in process | 
| Cody A.W. Somerville | c24e23b | 2012-12-21 02:10:45 -0500 | [diff] [blame] | 229 | declare -a images | 
|  | 230 |  | 
| Attila Fazekas | c411fcf | 2014-08-19 16:48:14 +0200 | [diff] [blame] | 231 | if is_service_enabled glance; then | 
| Ghanshyam Mann | e32715b | 2023-06-22 21:10:31 -0500 | [diff] [blame] | 232 | get_active_images images image_uuid | 
| Brian Rosmaita | 111a38b | 2022-05-13 20:53:26 -0400 | [diff] [blame] | 233 |  | 
|  | 234 | if (( ${#images[*]} < $TEMPEST_GLANCE_IMAGE_COUNT )); then | 
|  | 235 | # Glance image import is asynchronous and may be configured | 
|  | 236 | # to do image conversion.  If image import is being used, | 
|  | 237 | # it's possible that this code is being executed before the | 
|  | 238 | # import has completed and there may be no active images yet. | 
|  | 239 | if [[ "$GLANCE_USE_IMPORT_WORKFLOW" == "True" ]]; then | 
| Ghanshyam Mann | e32715b | 2023-06-22 21:10:31 -0500 | [diff] [blame] | 240 | poll_glance_images images image_uuid | 
| Brian Rosmaita | 111a38b | 2022-05-13 20:53:26 -0400 | [diff] [blame] | 241 | if (( ${#images[*]} < $TEMPEST_GLANCE_IMAGE_COUNT )); then | 
|  | 242 | echo "Only found ${#images[*]} image(s), was looking for $TEMPEST_GLANCE_IMAGE_COUNT" | 
|  | 243 | exit 1 | 
|  | 244 | fi | 
| Attila Fazekas | c411fcf | 2014-08-19 16:48:14 +0200 | [diff] [blame] | 245 | fi | 
| Brian Rosmaita | 111a38b | 2022-05-13 20:53:26 -0400 | [diff] [blame] | 246 | fi | 
| Cody A.W. Somerville | c24e23b | 2012-12-21 02:10:45 -0500 | [diff] [blame] | 247 |  | 
| Attila Fazekas | c411fcf | 2014-08-19 16:48:14 +0200 | [diff] [blame] | 248 | case "${#images[*]}" in | 
|  | 249 | 0) | 
|  | 250 | echo "Found no valid images to use!" | 
|  | 251 | exit 1 | 
|  | 252 | ;; | 
|  | 253 | 1) | 
|  | 254 | if [ -z "$image_uuid" ]; then | 
|  | 255 | image_uuid=${images[0]} | 
| Attila Fazekas | c411fcf | 2014-08-19 16:48:14 +0200 | [diff] [blame] | 256 | fi | 
| Brian Haley | e261bd8 | 2023-07-19 16:04:12 -0400 | [diff] [blame] | 257 | image_uuid_alt=$image_uuid | 
| Attila Fazekas | c411fcf | 2014-08-19 16:48:14 +0200 | [diff] [blame] | 258 | ;; | 
|  | 259 | *) | 
|  | 260 | if [ -z "$image_uuid" ]; then | 
|  | 261 | image_uuid=${images[0]} | 
| Ghanshyam Mann | e32715b | 2023-06-22 21:10:31 -0500 | [diff] [blame] | 262 | if [ -z "$image_uuid_alt" ]; then | 
|  | 263 | image_uuid_alt=${images[1]} | 
|  | 264 | fi | 
|  | 265 | elif [ -z "$image_uuid_alt" ]; then | 
| yatinkarel | 931b45d | 2023-07-19 12:15:52 +0530 | [diff] [blame] | 266 | for image in ${images[@]}; do | 
| Ghanshyam Mann | e32715b | 2023-06-22 21:10:31 -0500 | [diff] [blame] | 267 | if [[ "$image" != "$image_uuid" ]]; then | 
|  | 268 | image_uuid_alt=$image | 
| yatinkarel | 931b45d | 2023-07-19 12:15:52 +0530 | [diff] [blame] | 269 | break | 
| Ghanshyam Mann | e32715b | 2023-06-22 21:10:31 -0500 | [diff] [blame] | 270 | fi | 
|  | 271 | done | 
| Attila Fazekas | c411fcf | 2014-08-19 16:48:14 +0200 | [diff] [blame] | 272 | fi | 
|  | 273 | ;; | 
|  | 274 | esac | 
|  | 275 | fi | 
| Attila Fazekas | 2aa3517 | 2012-12-05 20:03:40 +0100 | [diff] [blame] | 276 |  | 
| Matthew Treinish | 93c1057 | 2015-07-31 10:38:50 -0400 | [diff] [blame] | 277 | # (Re)create ``tempest.conf`` | 
|  | 278 | # Create every time because the image UUIDS are going to change | 
| Dean Troyer | 8421c2b | 2015-03-16 13:52:19 -0500 | [diff] [blame] | 279 | sudo install -d -o $STACK_USER $TEMPEST_CONFIG_DIR | 
| Matthew Treinish | 93c1057 | 2015-07-31 10:38:50 -0400 | [diff] [blame] | 280 | rm -f $TEMPEST_CONFIG | 
| Attila Fazekas | 2aa3517 | 2012-12-05 20:03:40 +0100 | [diff] [blame] | 281 |  | 
| Balagopal | 7ed812c | 2016-03-01 04:43:31 +0000 | [diff] [blame] | 282 | local password=${ADMIN_PASSWORD:-secret} | 
| Attila Fazekas | 2aa3517 | 2012-12-05 20:03:40 +0100 | [diff] [blame] | 283 |  | 
| Dean Troyer | dc97cb7 | 2015-03-28 08:20:50 -0500 | [diff] [blame] | 284 | # See ``lib/keystone`` where these users and tenants are set up | 
| Sean Dague | 0f76535 | 2016-02-18 06:53:08 -0500 | [diff] [blame] | 285 | local admin_username=${ADMIN_USERNAME:-admin} | 
| Sean Dague | 76392b5 | 2016-04-04 09:07:08 -0400 | [diff] [blame] | 286 | local admin_project_name=${ADMIN_TENANT_NAME:-admin} | 
| Sean Dague | 0f76535 | 2016-02-18 06:53:08 -0500 | [diff] [blame] | 287 | local admin_domain_name=${ADMIN_DOMAIN_NAME:-Default} | 
| Sean Dague | 0f76535 | 2016-02-18 06:53:08 -0500 | [diff] [blame] | 288 | local alt_username=${ALT_USERNAME:-alt_demo} | 
| Sean Dague | 76392b5 | 2016-04-04 09:07:08 -0400 | [diff] [blame] | 289 | local alt_project_name=${ALT_TENANT_NAME:-alt_demo} | 
|  | 290 | local admin_project_id | 
| Julia Kreger | 5c9affd | 2021-03-12 11:19:52 -0800 | [diff] [blame] | 291 | admin_project_id=$(openstack --os-cloud devstack-admin project list | awk "/ admin / { print \$2 }") | 
| Attila Fazekas | 2aa3517 | 2012-12-05 20:03:40 +0100 | [diff] [blame] | 292 |  | 
| Attila Fazekas | c411fcf | 2014-08-19 16:48:14 +0200 | [diff] [blame] | 293 | if is_service_enabled nova; then | 
| Dean Troyer | dc97cb7 | 2015-03-28 08:20:50 -0500 | [diff] [blame] | 294 | # If ``DEFAULT_INSTANCE_TYPE`` is not declared, use the new behavior | 
|  | 295 | # Tempest creates its own instance types | 
| Julia Kreger | 5c9affd | 2021-03-12 11:19:52 -0800 | [diff] [blame] | 296 | available_flavors=$(openstack --os-cloud devstack-admin flavor list) | 
| Attila Fazekas | c411fcf | 2014-08-19 16:48:14 +0200 | [diff] [blame] | 297 | if  [[ -z "$DEFAULT_INSTANCE_TYPE" ]]; then | 
| Attila Fazekas | c411fcf | 2014-08-19 16:48:14 +0200 | [diff] [blame] | 298 | if [[ ! ( $available_flavors =~ 'm1.nano' ) ]]; then | 
| Matt Riedemann | 23d33a8 | 2018-11-21 12:10:32 -0500 | [diff] [blame] | 299 | # Determine the flavor disk size based on the image size. | 
|  | 300 | disk=$(image_size_in_gib $image_uuid) | 
| Sean Mooney | 6df5371 | 2024-07-12 20:08:58 +0100 | [diff] [blame] | 301 | ram=${TEMPEST_FLAVOR_RAM} | 
|  | 302 | openstack --os-cloud devstack-admin flavor create --id 42 --ram ${ram} --disk $disk --vcpus 1 --property hw_rng:allowed=True m1.nano | 
| Rafael Folco | ba0f1d3 | 2013-12-06 17:56:24 -0200 | [diff] [blame] | 303 | fi | 
| Attila Fazekas | c411fcf | 2014-08-19 16:48:14 +0200 | [diff] [blame] | 304 | flavor_ref=42 | 
| Attila Fazekas | c411fcf | 2014-08-19 16:48:14 +0200 | [diff] [blame] | 305 | if [[ ! ( $available_flavors =~ 'm1.micro' ) ]]; then | 
| Matt Riedemann | 23d33a8 | 2018-11-21 12:10:32 -0500 | [diff] [blame] | 306 | # Determine the alt flavor disk size based on the alt image size. | 
|  | 307 | disk=$(image_size_in_gib $image_uuid_alt) | 
| Sean Mooney | 6df5371 | 2024-07-12 20:08:58 +0100 | [diff] [blame] | 308 | ram=${TEMPEST_FLAVOR_ALT_RAM} | 
|  | 309 | openstack --os-cloud devstack-admin flavor create --id 84 --ram ${ram} --disk $disk --vcpus 1 --property hw_rng:allowed=True m1.micro | 
| Rafael Folco | ba0f1d3 | 2013-12-06 17:56:24 -0200 | [diff] [blame] | 310 | fi | 
| Attila Fazekas | c411fcf | 2014-08-19 16:48:14 +0200 | [diff] [blame] | 311 | flavor_ref_alt=84 | 
|  | 312 | else | 
| Dean Troyer | dc97cb7 | 2015-03-28 08:20:50 -0500 | [diff] [blame] | 313 | # Check Nova for existing flavors, if ``DEFAULT_INSTANCE_TYPE`` is set use it. | 
| Attila Fazekas | c411fcf | 2014-08-19 16:48:14 +0200 | [diff] [blame] | 314 | IFS=$'\r\n' | 
|  | 315 | flavors="" | 
| Rafael Folco | 0b4c83a | 2015-11-26 10:08:36 -0600 | [diff] [blame] | 316 | for line in $available_flavors; do | 
| Attila Fazekas | c411fcf | 2014-08-19 16:48:14 +0200 | [diff] [blame] | 317 | f=$(echo $line | awk "/ $DEFAULT_INSTANCE_TYPE / { print \$2 }") | 
|  | 318 | flavors="$flavors $f" | 
|  | 319 | done | 
| Attila Fazekas | 2aa3517 | 2012-12-05 20:03:40 +0100 | [diff] [blame] | 320 |  | 
| Rafael Folco | 0b4c83a | 2015-11-26 10:08:36 -0600 | [diff] [blame] | 321 | for line in $available_flavors; do | 
| Attila Fazekas | c411fcf | 2014-08-19 16:48:14 +0200 | [diff] [blame] | 322 | flavors="$flavors `echo $line | grep -v "^\(|\s*ID\|+--\)" | cut -d' ' -f2`" | 
|  | 323 | done | 
| Attila Fazekas | 7bf1dd3 | 2013-01-12 17:31:26 +0100 | [diff] [blame] | 324 |  | 
| Attila Fazekas | c411fcf | 2014-08-19 16:48:14 +0200 | [diff] [blame] | 325 | IFS=" " | 
|  | 326 | flavors=($flavors) | 
|  | 327 | num_flavors=${#flavors[*]} | 
|  | 328 | echo "Found $num_flavors flavors" | 
|  | 329 | if [[ $num_flavors -eq 0 ]]; then | 
|  | 330 | echo "Found no valid flavors to use!" | 
|  | 331 | exit 1 | 
| Adalberto Medeiros | 63a71a2 | 2013-06-06 08:46:04 -0400 | [diff] [blame] | 332 | fi | 
| Attila Fazekas | c411fcf | 2014-08-19 16:48:14 +0200 | [diff] [blame] | 333 | flavor_ref=${flavors[0]} | 
|  | 334 | flavor_ref_alt=$flavor_ref | 
| Julia Kreger | 5c9affd | 2021-03-12 11:19:52 -0800 | [diff] [blame] | 335 | flavor_ref_size=$(openstack --os-cloud devstack-admin flavor show --format value --column disk "${flavor_ref}") | 
| Attila Fazekas | c411fcf | 2014-08-19 16:48:14 +0200 | [diff] [blame] | 336 |  | 
| Dean Troyer | dc97cb7 | 2015-03-28 08:20:50 -0500 | [diff] [blame] | 337 | # Ensure ``flavor_ref`` and ``flavor_ref_alt`` have different values. | 
|  | 338 | # Some resize instance in tempest tests depends on this. | 
| Attila Fazekas | c411fcf | 2014-08-19 16:48:14 +0200 | [diff] [blame] | 339 | for f in ${flavors[@]:1}; do | 
| John L. Villalovos | 3345a6d | 2017-03-13 13:47:34 -0700 | [diff] [blame] | 340 | if [[ "$f" != "$flavor_ref" ]]; then | 
| Szymon Datko | 28c4981 | 2019-08-22 15:39:53 +0200 | [diff] [blame] | 341 | # | 
|  | 342 | # NOTE(sdatko): Resize is only possible when target flavor | 
|  | 343 | #               is not smaller than the original one. For | 
|  | 344 | #               Tempest tests, in case there was a bigger | 
|  | 345 | #               flavor selected as default, e.g. m1.small, | 
|  | 346 | #               we need to perform additional check. | 
|  | 347 | # | 
| Julia Kreger | 5c9affd | 2021-03-12 11:19:52 -0800 | [diff] [blame] | 348 | flavor_ref_alt_size=$(openstack --os-cloud devstack-admin flavor show --format value --column disk "${f}") | 
| Szymon Datko | 28c4981 | 2019-08-22 15:39:53 +0200 | [diff] [blame] | 349 | if [[ "${flavor_ref_alt_size}" -lt "${flavor_ref_size}" ]]; then | 
|  | 350 | continue | 
|  | 351 | fi | 
|  | 352 |  | 
| Attila Fazekas | c411fcf | 2014-08-19 16:48:14 +0200 | [diff] [blame] | 353 | flavor_ref_alt=$f | 
|  | 354 | break | 
|  | 355 | fi | 
|  | 356 | done | 
|  | 357 | fi | 
| Attila Fazekas | 2aa3517 | 2012-12-05 20:03:40 +0100 | [diff] [blame] | 358 | fi | 
|  | 359 |  | 
| Dan Smith | 84ce198 | 2024-07-31 19:04:08 +0000 | [diff] [blame] | 360 | if is_service_enabled glance; then | 
|  | 361 | git_clone $OSTESTIMAGES_REPO $OSTESTIMAGES_DIR $OSTESTIMAGES_BRANCH | 
|  | 362 | pushd $OSTESTIMAGES_DIR | 
|  | 363 | tox -egenerate | 
|  | 364 | popd | 
|  | 365 | iniset $TEMPEST_CONFIG image images_manifest_file ${OSTESTIMAGES_DIR}/images/manifest.yaml | 
|  | 366 | local image_conversion | 
|  | 367 | image_conversion=$(iniget $GLANCE_IMAGE_IMPORT_CONF image_conversion output_format) | 
| Dan Smith | 1a336ef | 2024-08-12 11:34:02 -0700 | [diff] [blame] | 368 | if [[ -n "$image_conversion" ]]; then | 
| Dan Smith | 84ce198 | 2024-07-31 19:04:08 +0000 | [diff] [blame] | 369 | iniset $TEMPEST_CONFIG image-feature-enabled image_conversion True | 
|  | 370 | fi | 
|  | 371 | fi | 
|  | 372 |  | 
| Dan Smith | a2ec7fd | 2016-08-10 11:14:00 -0700 | [diff] [blame] | 373 | iniset $TEMPEST_CONFIG network project_network_cidr $FIXED_RANGE | 
|  | 374 |  | 
| Attila Fazekas | 386ae8c | 2013-10-21 09:27:18 +0200 | [diff] [blame] | 375 | ssh_connect_method=${TEMPEST_SSH_CONNECT_METHOD:-$ssh_connect_method} | 
|  | 376 |  | 
| Armando Migliaccio | 53f59d8 | 2016-05-17 15:12:24 -0700 | [diff] [blame] | 377 | # the public network (for floating ip access) is only available | 
|  | 378 | # if the extension is enabled. | 
| Eric Berglund | 8e14240 | 2016-11-29 17:33:28 -0600 | [diff] [blame] | 379 | # If NEUTRON_CREATE_INITIAL_NETWORKS is not true, there is no network created | 
|  | 380 | # and the public_network_id should not be set. | 
|  | 381 | if [[ "$NEUTRON_CREATE_INITIAL_NETWORKS" == "True" ]] && is_networking_extension_supported 'external-net'; then | 
| Julia Kreger | 5c9affd | 2021-03-12 11:19:52 -0800 | [diff] [blame] | 382 | public_network_id=$(openstack --os-cloud devstack-admin network show -f value -c id $PUBLIC_NETWORK_NAME) | 
| Attila Fazekas | 0d4c9c9 | 2018-09-10 15:52:46 -0600 | [diff] [blame] | 383 | # make sure shared network presence does not confuses the tempest tests | 
| Slawek Kaplonski | 14a0c09 | 2022-01-28 09:44:40 +0100 | [diff] [blame] | 384 | openstack --os-cloud devstack-admin --os-region "$REGION_NAME" network create --share shared | 
|  | 385 | openstack --os-cloud devstack-admin --os-region "$REGION_NAME" subnet create --description shared-subnet --subnet-range ${TEMPEST_SHARED_POOL:-192.168.233.0/24} --network shared shared-subnet | 
| Maru Newby | a5c774e | 2012-12-10 10:40:01 +0000 | [diff] [blame] | 386 | fi | 
|  | 387 |  | 
| Masayuki Igawa | 5a252d9 | 2014-11-21 21:55:09 +0900 | [diff] [blame] | 388 | iniset $TEMPEST_CONFIG DEFAULT use_syslog $SYSLOG | 
| Dean Troyer | dc97cb7 | 2015-03-28 08:20:50 -0500 | [diff] [blame] | 389 |  | 
| Matthew Treinish | 859cc68 | 2013-07-26 15:22:44 -0400 | [diff] [blame] | 390 | # Oslo | 
| Joe Gordon | 23d6d50 | 2015-03-06 15:24:22 -0800 | [diff] [blame] | 391 | iniset $TEMPEST_CONFIG oslo_concurrency lock_path $TEMPEST_STATE_PATH | 
| Matthew Treinish | 14ccba0 | 2013-07-29 16:15:53 -0400 | [diff] [blame] | 392 | mkdir -p $TEMPEST_STATE_PATH | 
| john-griffith | dc4dc7f | 2014-01-22 18:09:32 -0700 | [diff] [blame] | 393 | iniset $TEMPEST_CONFIG DEFAULT use_stderr False | 
|  | 394 | iniset $TEMPEST_CONFIG DEFAULT log_file tempest.log | 
|  | 395 | iniset $TEMPEST_CONFIG DEFAULT debug True | 
| Matthew Treinish | 859cc68 | 2013-07-26 15:22:44 -0400 | [diff] [blame] | 396 |  | 
| Attila Fazekas | 2aa3517 | 2012-12-05 20:03:40 +0100 | [diff] [blame] | 397 | # Timeouts | 
| john-griffith | dc4dc7f | 2014-01-22 18:09:32 -0700 | [diff] [blame] | 398 | iniset $TEMPEST_CONFIG compute build_timeout $BUILD_TIMEOUT | 
|  | 399 | iniset $TEMPEST_CONFIG volume build_timeout $BUILD_TIMEOUT | 
| Attila Fazekas | 2aa3517 | 2012-12-05 20:03:40 +0100 | [diff] [blame] | 400 |  | 
| Attila Fazekas | 97d3d20 | 2013-01-19 19:20:49 +0100 | [diff] [blame] | 401 | # Identity | 
| Steve Martinelli | b74e01c | 2014-12-18 01:35:35 -0500 | [diff] [blame] | 402 | iniset $TEMPEST_CONFIG identity uri_v3 "$KEYSTONE_SERVICE_URI_V3" | 
| Rodrigo Duarte | b51a886 | 2016-09-26 15:22:35 -0300 | [diff] [blame] | 403 | iniset $TEMPEST_CONFIG identity user_lockout_failure_attempts $KEYSTONE_LOCKOUT_FAILURE_ATTEMPTS | 
|  | 404 | iniset $TEMPEST_CONFIG identity user_lockout_duration $KEYSTONE_LOCKOUT_DURATION | 
|  | 405 | iniset $TEMPEST_CONFIG identity user_unique_last_password_count $KEYSTONE_UNIQUE_LAST_PASSWORD_COUNT | 
| Matthew Treinish | 7ced150 | 2015-03-23 15:51:54 -0400 | [diff] [blame] | 406 | if [[ "$TEMPEST_HAS_ADMIN" == "True" ]]; then | 
| Sean Dague | 0f76535 | 2016-02-18 06:53:08 -0500 | [diff] [blame] | 407 | iniset $TEMPEST_CONFIG auth admin_username $admin_username | 
| Matthew Treinish | fbe0a62 | 2015-12-10 19:36:50 -0500 | [diff] [blame] | 408 | iniset $TEMPEST_CONFIG auth admin_password "$password" | 
| Castulo J. Martinez | 2d9959c | 2016-11-01 13:34:20 -0700 | [diff] [blame] | 409 | iniset $TEMPEST_CONFIG auth admin_project_name $admin_project_name | 
| Sean Dague | 0f76535 | 2016-02-18 06:53:08 -0500 | [diff] [blame] | 410 | iniset $TEMPEST_CONFIG auth admin_domain_name $admin_domain_name | 
| Matthew Treinish | 7ced150 | 2015-03-23 15:51:54 -0400 | [diff] [blame] | 411 | fi | 
| Ken'ichi Ohmichi | dc6e550 | 2017-03-03 16:55:50 -0800 | [diff] [blame] | 412 | iniset $TEMPEST_CONFIG identity auth_version ${TEMPEST_AUTH_VERSION:-v3} | 
| Sean Dague | f3b2f4c | 2017-04-13 10:11:48 -0400 | [diff] [blame] | 413 | if is_service_enabled tls-proxy; then | 
| Rob Crittenden | e1d013f | 2015-02-10 14:15:35 -0500 | [diff] [blame] | 414 | iniset $TEMPEST_CONFIG identity ca_certificates_file $SSL_BUNDLE_FILE | 
|  | 415 | fi | 
| Attila Fazekas | 2aa3517 | 2012-12-05 20:03:40 +0100 | [diff] [blame] | 416 |  | 
| Rodrigo Duarte | 0578e42 | 2016-03-16 12:15:07 -0300 | [diff] [blame] | 417 | # Identity Features | 
| Rodrigo Duarte | b51a886 | 2016-09-26 15:22:35 -0300 | [diff] [blame] | 418 | if [[ "$KEYSTONE_SECURITY_COMPLIANCE_ENABLED" = True ]]; then | 
|  | 419 | iniset $TEMPEST_CONFIG identity-feature-enabled security_compliance True | 
|  | 420 | fi | 
| Rodrigo Duarte | 0578e42 | 2016-03-16 12:15:07 -0300 | [diff] [blame] | 421 |  | 
| Leticia Wanderley | 1d141da | 2017-08-04 00:42:59 -0300 | [diff] [blame] | 422 | # When LDAP is enabled domain specific drivers are also enabled and the users | 
|  | 423 | # and groups identity tests must adapt to this scenario | 
|  | 424 | if is_service_enabled ldap; then | 
|  | 425 | iniset $TEMPEST_CONFIG identity-feature-enabled domain_specific_drivers True | 
|  | 426 | fi | 
|  | 427 |  | 
| Felipe Monteiro | 1ab9a2d | 2018-03-16 02:02:12 +0000 | [diff] [blame] | 428 | # TODO(felipemonteiro): Remove this once Tempest no longer supports Pike | 
|  | 429 | # as this is supported in Queens and beyond. | 
|  | 430 | iniset $TEMPEST_CONFIG identity-feature-enabled project_tags True | 
|  | 431 |  | 
| Colleen Murphy | 931f82d | 2018-02-18 14:11:10 +0100 | [diff] [blame] | 432 | # In Queens and later, application credentials are enabled by default | 
|  | 433 | # so remove this once Tempest no longer supports Pike. | 
|  | 434 | iniset $TEMPEST_CONFIG identity-feature-enabled application_credentials True | 
|  | 435 |  | 
| Colleen Murphy | f8aa74b | 2019-12-27 09:30:57 -0800 | [diff] [blame] | 436 | # In Train and later, access rules for application credentials are enabled | 
|  | 437 | # by default so remove this once Tempest no longer supports Stein. | 
|  | 438 | iniset $TEMPEST_CONFIG identity-feature-enabled access_rules True | 
|  | 439 |  | 
| Sean Dague | c377145 | 2013-06-13 14:23:37 -0400 | [diff] [blame] | 440 | # Image | 
| Dean Troyer | dc97cb7 | 2015-03-28 08:20:50 -0500 | [diff] [blame] | 441 | # We want to be able to override this variable in the gate to avoid | 
|  | 442 | # doing an external HTTP fetch for this test. | 
| Sean Dague | c377145 | 2013-06-13 14:23:37 -0400 | [diff] [blame] | 443 | if [[ ! -z "$TEMPEST_HTTP_IMAGE" ]]; then | 
| john-griffith | dc4dc7f | 2014-01-22 18:09:32 -0700 | [diff] [blame] | 444 | iniset $TEMPEST_CONFIG image http_image $TEMPEST_HTTP_IMAGE | 
| Sean Dague | c377145 | 2013-06-13 14:23:37 -0400 | [diff] [blame] | 445 | fi | 
| Ghanshyam Mann | 32d5b1e | 2020-07-22 20:52:48 -0500 | [diff] [blame] | 446 | iniset $TEMPEST_CONFIG image-feature-enabled import_image $GLANCE_USE_IMPORT_WORKFLOW | 
| Dan Smith | ed16428 | 2021-01-18 09:57:00 -0800 | [diff] [blame] | 447 | iniset $TEMPEST_CONFIG image-feature-enabled os_glance_reserved True | 
| Dan Smith | 802259a | 2021-01-12 22:55:57 +0000 | [diff] [blame] | 448 | if is_service_enabled g-api-r; then | 
| Dan Smith | 61b4fbf | 2021-03-09 08:05:37 -0800 | [diff] [blame] | 449 | iniset $TEMPEST_CONFIG image alternate_image_endpoint image_remote | 
| Dan Smith | 802259a | 2021-01-12 22:55:57 +0000 | [diff] [blame] | 450 | fi | 
|  | 451 |  | 
| Attila Fazekas | 97d3d20 | 2013-01-19 19:20:49 +0100 | [diff] [blame] | 452 | # Compute | 
| john-griffith | dc4dc7f | 2014-01-22 18:09:32 -0700 | [diff] [blame] | 453 | iniset $TEMPEST_CONFIG compute image_ref $image_uuid | 
| john-griffith | dc4dc7f | 2014-01-22 18:09:32 -0700 | [diff] [blame] | 454 | iniset $TEMPEST_CONFIG compute image_ref_alt $image_uuid_alt | 
| john-griffith | dc4dc7f | 2014-01-22 18:09:32 -0700 | [diff] [blame] | 455 | iniset $TEMPEST_CONFIG compute flavor_ref $flavor_ref | 
|  | 456 | iniset $TEMPEST_CONFIG compute flavor_ref_alt $flavor_ref_alt | 
| Sean Dague | 563a7e7 | 2015-12-15 17:16:19 -0500 | [diff] [blame] | 457 | iniset $TEMPEST_CONFIG validation connect_method $ssh_connect_method | 
| Stephen Finucane | 4b8cba7 | 2019-05-21 14:17:11 +0100 | [diff] [blame] | 458 | if ! is_service_enabled neutron; then | 
| melanie witt | f5b550e | 2015-04-10 22:20:07 +0000 | [diff] [blame] | 459 | iniset $TEMPEST_CONFIG compute fixed_network_name $PRIVATE_NETWORK_NAME | 
|  | 460 | fi | 
| Attila Fazekas | 97d3d20 | 2013-01-19 19:20:49 +0100 | [diff] [blame] | 461 |  | 
| Sean Dague | 8349aff | 2015-09-01 12:45:28 -0400 | [diff] [blame] | 462 | # Set the service catalog entry for Tempest to run on. Typically | 
|  | 463 | # used to try different compute API version targets. The tempest | 
|  | 464 | # default if 'compute', which is typically valid, so only set this | 
|  | 465 | # if you want to change it. | 
|  | 466 | if [[ -n "$TEMPEST_COMPUTE_TYPE" ]]; then | 
|  | 467 | iniset $TEMPEST_CONFIG compute catalog_type $TEMPEST_COMPUTE_TYPE | 
|  | 468 | fi | 
|  | 469 |  | 
| Sean Dague | de19bf9 | 2014-03-20 16:54:58 -0400 | [diff] [blame] | 470 | # Compute Features | 
| ghanshyam | 642b07b | 2015-11-19 10:01:14 +0900 | [diff] [blame] | 471 | # Set the microversion range for compute tests. | 
|  | 472 | # This is used to run the Nova microversions tests. | 
|  | 473 | # Setting [None, latest] range of microversion which allow Tempest to run all microversions tests. | 
|  | 474 | # NOTE- To avoid microversion tests failure on stable branch, we need to change "tempest_compute_max_microversion" | 
|  | 475 | #       for stable branch on each release which should be changed from "latest" to max supported version of that release. | 
|  | 476 | local tempest_compute_min_microversion=${TEMPEST_COMPUTE_MIN_MICROVERSION:-None} | 
|  | 477 | local tempest_compute_max_microversion=${TEMPEST_COMPUTE_MAX_MICROVERSION:-"latest"} | 
|  | 478 | # Reset microversions to None where v2.0 is running which does not support microversion. | 
|  | 479 | # Both "None" means no microversion testing. | 
|  | 480 | if [[ "$TEMPEST_COMPUTE_TYPE" == "compute_legacy" ]]; then | 
|  | 481 | tempest_compute_min_microversion=None | 
|  | 482 | tempest_compute_max_microversion=None | 
|  | 483 | fi | 
|  | 484 | if [ "$tempest_compute_min_microversion" == "None" ]; then | 
| Jordan Pittier | f5a50a0 | 2016-05-10 14:56:12 +0200 | [diff] [blame] | 485 | inicomment $TEMPEST_CONFIG compute min_microversion | 
| ghanshyam | 642b07b | 2015-11-19 10:01:14 +0900 | [diff] [blame] | 486 | else | 
| Jordan Pittier | f5a50a0 | 2016-05-10 14:56:12 +0200 | [diff] [blame] | 487 | iniset $TEMPEST_CONFIG compute min_microversion $tempest_compute_min_microversion | 
| ghanshyam | 642b07b | 2015-11-19 10:01:14 +0900 | [diff] [blame] | 488 | fi | 
|  | 489 | if [ "$tempest_compute_max_microversion" == "None" ]; then | 
| Jordan Pittier | f5a50a0 | 2016-05-10 14:56:12 +0200 | [diff] [blame] | 490 | inicomment $TEMPEST_CONFIG compute max_microversion | 
| ghanshyam | 642b07b | 2015-11-19 10:01:14 +0900 | [diff] [blame] | 491 | else | 
| Jordan Pittier | f5a50a0 | 2016-05-10 14:56:12 +0200 | [diff] [blame] | 492 | iniset $TEMPEST_CONFIG compute max_microversion $tempest_compute_max_microversion | 
| ghanshyam | 642b07b | 2015-11-19 10:01:14 +0900 | [diff] [blame] | 493 | fi | 
|  | 494 |  | 
| Matt Riedemann | 6d3670a | 2016-07-03 19:40:25 -0400 | [diff] [blame] | 495 | iniset $TEMPEST_CONFIG compute-feature-enabled personality ${ENABLE_FILE_INJECTION:-False} | 
| Sean Dague | de19bf9 | 2014-03-20 16:54:58 -0400 | [diff] [blame] | 496 | iniset $TEMPEST_CONFIG compute-feature-enabled resize True | 
| Matthew Treinish | 270f93e | 2014-03-20 21:18:42 +0000 | [diff] [blame] | 497 | iniset $TEMPEST_CONFIG compute-feature-enabled live_migration ${LIVE_MIGRATION_AVAILABLE:-False} | 
|  | 498 | iniset $TEMPEST_CONFIG compute-feature-enabled change_password False | 
|  | 499 | iniset $TEMPEST_CONFIG compute-feature-enabled block_migration_for_live_migration ${USE_BLOCK_MIGRATION_FOR_LIVE_MIGRATION:-False} | 
| Pawel Koniszewski | 8a92b7f | 2016-10-05 16:14:19 +0200 | [diff] [blame] | 500 | iniset $TEMPEST_CONFIG compute-feature-enabled live_migrate_back_and_forth ${LIVE_MIGRATE_BACK_AND_FORTH:-False} | 
| Matt Riedemann | e57a332 | 2015-06-20 14:48:00 -0700 | [diff] [blame] | 501 | iniset $TEMPEST_CONFIG compute-feature-enabled attach_encrypted_volume ${ATTACH_ENCRYPTED_VOLUME_AVAILABLE:-True} | 
| Artom Lifshitz | 4705861 | 2018-05-23 10:08:56 -0400 | [diff] [blame] | 502 |  | 
| Pavan Kesava Rao | 71bd10e | 2021-07-19 13:33:42 -0400 | [diff] [blame] | 503 | # Starting Wallaby, nova sanitizes instance hostnames having freeform characters with dashes | 
|  | 504 | iniset $TEMPEST_CONFIG compute-feature-enabled hostname_fqdn_sanitization True | 
|  | 505 |  | 
| Artom Lifshitz | 4705861 | 2018-05-23 10:08:56 -0400 | [diff] [blame] | 506 | if [[ -n "$NOVA_FILTERS" ]]; then | 
|  | 507 | iniset $TEMPEST_CONFIG compute-feature-enabled scheduler_enabled_filters ${NOVA_FILTERS} | 
|  | 508 | fi | 
|  | 509 |  | 
| Matt Riedemann | ffe691e | 2016-01-12 17:58:44 -0800 | [diff] [blame] | 510 | if [[ $ENABLE_VOLUME_MULTIATTACH == "True" ]]; then | 
|  | 511 | iniset $TEMPEST_CONFIG compute-feature-enabled volume_multiattach True | 
|  | 512 | fi | 
|  | 513 |  | 
| melanie witt | 6645cf7 | 2017-12-13 23:59:09 +0000 | [diff] [blame] | 514 | if is_service_enabled n-novnc; then | 
| Michelle Mandel | 10db2b8 | 2016-07-20 11:39:42 -0400 | [diff] [blame] | 515 | iniset $TEMPEST_CONFIG compute-feature-enabled vnc_console True | 
|  | 516 | fi | 
|  | 517 |  | 
| Marian Horban | ea21eb4 | 2015-08-18 06:57:18 -0400 | [diff] [blame] | 518 | # Network | 
| Jordan Pittier | f5a50a0 | 2016-05-10 14:56:12 +0200 | [diff] [blame] | 519 | iniset $TEMPEST_CONFIG network project_networks_reachable false | 
| john-griffith | dc4dc7f | 2014-01-22 18:09:32 -0700 | [diff] [blame] | 520 | iniset $TEMPEST_CONFIG network public_network_id "$public_network_id" | 
|  | 521 | iniset $TEMPEST_CONFIG network public_router_id "$public_router_id" | 
|  | 522 | iniset $TEMPEST_CONFIG network default_network "$FIXED_RANGE" | 
| Matthew Treinish | ccf60f7 | 2014-03-03 22:48:31 -0500 | [diff] [blame] | 523 | iniset $TEMPEST_CONFIG network-feature-enabled ipv6 "$IPV6_ENABLED" | 
| Sean M. Collins | bb2908b | 2014-05-15 10:24:31 -0400 | [diff] [blame] | 524 | iniset $TEMPEST_CONFIG network-feature-enabled ipv6_subnet_attributes "$IPV6_SUBNET_ATTRIBUTES_ENABLED" | 
| Matt Riedemann | c9c9d31 | 2016-09-15 20:33:22 -0400 | [diff] [blame] | 525 | iniset $TEMPEST_CONFIG network-feature-enabled port_security $NEUTRON_PORT_SECURITY | 
| Salvatore | 33e8ee2 | 2014-10-05 01:36:34 +0200 | [diff] [blame] | 526 |  | 
| Slawek Kaplonski | 24b65ad | 2021-06-22 15:31:46 +0200 | [diff] [blame] | 527 | iniset $TEMPEST_CONFIG enforce_scope neutron "$NEUTRON_ENFORCE_SCOPE" | 
|  | 528 |  | 
| William Marshall | 24d866e | 2013-07-02 12:26:31 -0500 | [diff] [blame] | 529 | # Scenario | 
| Stephen Finucane | 970891a | 2021-03-02 16:45:39 +0000 | [diff] [blame] | 530 | SCENARIO_IMAGE_DIR=${SCENARIO_IMAGE_DIR:-$FILES} | 
|  | 531 | SCENARIO_IMAGE_FILE=$DEFAULT_IMAGE_FILE_NAME | 
| Martin Kopec | a294389 | 2023-04-25 21:50:31 +0200 | [diff] [blame] | 532 | SCENARIO_IMAGE_TYPE=${SCENARIO_IMAGE_TYPE:-cirros} | 
| Martin Kopec | 729546a | 2020-03-12 10:03:38 +0000 | [diff] [blame] | 533 | iniset $TEMPEST_CONFIG scenario img_file $SCENARIO_IMAGE_DIR/$SCENARIO_IMAGE_FILE | 
| William Marshall | 24d866e | 2013-07-02 12:26:31 -0500 | [diff] [blame] | 534 |  | 
| Martin Kopec | a294389 | 2023-04-25 21:50:31 +0200 | [diff] [blame] | 535 | # since version 0.6.0 cirros uses dhcpcd dhcp client by default, however, cirros, prior to the | 
|  | 536 | # version 0.6.0, used udhcpc (the only available client at that time) which is also tempest's default | 
|  | 537 | if [[ "$SCENARIO_IMAGE_TYPE" == "cirros" ]]; then | 
|  | 538 | # the image is a cirros image | 
|  | 539 | # use dhcpcd client when version greater or equal 0.6.0 | 
|  | 540 | if [[ $(echo $CIRROS_VERSION | tr -d '.') -ge 060 ]]; then | 
|  | 541 | iniset $TEMPEST_CONFIG scenario dhcp_client dhcpcd | 
|  | 542 | fi | 
|  | 543 | fi | 
|  | 544 |  | 
| Michael Turek | 7938d83 | 2016-04-12 14:55:21 -0400 | [diff] [blame] | 545 | # If using provider networking, use the physical network for validation rather than private | 
|  | 546 | TEMPEST_SSH_NETWORK_NAME=$PRIVATE_NETWORK_NAME | 
|  | 547 | if is_provider_network; then | 
|  | 548 | TEMPEST_SSH_NETWORK_NAME=$PHYSICAL_NETWORK | 
|  | 549 | fi | 
| lanoux | 994db61 | 2015-08-03 13:48:12 +0000 | [diff] [blame] | 550 | # Validation | 
| Andrea Frittoli | ef1e88e | 2017-04-20 23:37:32 +0100 | [diff] [blame] | 551 | iniset $TEMPEST_CONFIG validation run_validation ${TEMPEST_RUN_VALIDATION:-True} | 
| Matthew Treinish | fbe0a62 | 2015-12-10 19:36:50 -0500 | [diff] [blame] | 552 | iniset $TEMPEST_CONFIG validation ip_version_for_ssh 4 | 
|  | 553 | iniset $TEMPEST_CONFIG validation ssh_timeout $BUILD_TIMEOUT | 
| Weronika Sikora | d7d87b0 | 2019-09-18 13:45:53 +0000 | [diff] [blame] | 554 | iniset $TEMPEST_CONFIG validation image_ssh_user ${DEFAULT_INSTANCE_USER:=cirros} | 
|  | 555 | iniset $TEMPEST_CONFIG validation image_alt_ssh_user ${DEFAULT_INSTANCE_ALT_USER:-$DEFAULT_INSTANCE_USER} | 
| Michael Turek | 7938d83 | 2016-04-12 14:55:21 -0400 | [diff] [blame] | 556 | iniset $TEMPEST_CONFIG validation network_for_ssh $TEMPEST_SSH_NETWORK_NAME | 
| lanoux | 994db61 | 2015-08-03 13:48:12 +0000 | [diff] [blame] | 557 |  | 
| Giulio Fidente | 97e1bd0 | 2013-06-04 05:33:52 +0200 | [diff] [blame] | 558 | # Volume | 
| Patrick East | 3eb7c97 | 2017-01-13 11:44:54 -0800 | [diff] [blame] | 559 | # Only turn on TEMPEST_VOLUME_MANAGE_SNAPSHOT by default for "lvm" backends | 
|  | 560 | if [[ "$CINDER_ENABLED_BACKENDS" == *"lvm"* ]]; then | 
|  | 561 | TEMPEST_VOLUME_MANAGE_SNAPSHOT=${TEMPEST_VOLUME_MANAGE_SNAPSHOT:-True} | 
|  | 562 | fi | 
|  | 563 | iniset $TEMPEST_CONFIG volume-feature-enabled manage_snapshot $(trueorfalse False TEMPEST_VOLUME_MANAGE_SNAPSHOT) | 
| jeremy.zhang | d5919d0 | 2017-03-08 15:27:37 +0800 | [diff] [blame] | 564 | # Only turn on TEMPEST_VOLUME_MANAGE_VOLUME by default for "lvm" backends | 
|  | 565 | if [[ "$CINDER_ENABLED_BACKENDS" == *"lvm"* ]]; then | 
|  | 566 | TEMPEST_VOLUME_MANAGE_VOLUME=${TEMPEST_VOLUME_MANAGE_VOLUME:-True} | 
|  | 567 | fi | 
|  | 568 | iniset $TEMPEST_CONFIG volume-feature-enabled manage_volume $(trueorfalse False TEMPEST_VOLUME_MANAGE_VOLUME) | 
| Matt Riedemann | 17cdecc | 2017-07-05 20:25:02 -0400 | [diff] [blame] | 569 | # Only turn on TEMPEST_EXTEND_ATTACHED_VOLUME by default for "lvm" backends | 
|  | 570 | # in Cinder and the libvirt driver in Nova. | 
|  | 571 | if [[ "$CINDER_ENABLED_BACKENDS" == *"lvm"* ]] && [ "$VIRT_DRIVER" = "libvirt" ]; then | 
|  | 572 | TEMPEST_EXTEND_ATTACHED_VOLUME=${TEMPEST_EXTEND_ATTACHED_VOLUME:-True} | 
|  | 573 | fi | 
|  | 574 | iniset $TEMPEST_CONFIG volume-feature-enabled extend_attached_volume $(trueorfalse False TEMPEST_EXTEND_ATTACHED_VOLUME) | 
| Luigi Toscano | 8fd45de | 2020-05-12 12:00:20 +0200 | [diff] [blame] | 575 | # Only turn on TEMPEST_VOLUME_REVERT_TO_SNAPSHOT by default for "lvm" backends | 
|  | 576 | if [[ "$CINDER_ENABLED_BACKENDS" == *"lvm"* ]]; then | 
|  | 577 | TEMPEST_VOLUME_REVERT_TO_SNAPSHOT=${TEMPEST_VOLUME_REVERT_TO_SNAPSHOT:-True} | 
|  | 578 | fi | 
|  | 579 | iniset $TEMPEST_CONFIG volume-feature-enabled volume_revert $(trueorfalse False TEMPEST_VOLUME_REVERT_TO_SNAPSHOT) | 
| Lukas Piwowarski | 8c25a85 | 2023-10-05 08:11:05 +0000 | [diff] [blame] | 580 | if [[ "$CINDER_BACKUP_DRIVER" == *"swift"* ]]; then | 
|  | 581 | iniset $TEMPEST_CONFIG volume backup_driver swift | 
|  | 582 | fi | 
| Alex Meade | 0c0c09a | 2016-05-13 10:57:29 -0400 | [diff] [blame] | 583 | local tempest_volume_min_microversion=${TEMPEST_VOLUME_MIN_MICROVERSION:-None} | 
|  | 584 | local tempest_volume_max_microversion=${TEMPEST_VOLUME_MAX_MICROVERSION:-"latest"} | 
|  | 585 | if [ "$tempest_volume_min_microversion" == "None" ]; then | 
|  | 586 | inicomment $TEMPEST_CONFIG volume min_microversion | 
|  | 587 | else | 
|  | 588 | iniset $TEMPEST_CONFIG volume min_microversion $tempest_volume_min_microversion | 
|  | 589 | fi | 
|  | 590 |  | 
|  | 591 | if [ "$tempest_volume_max_microversion" == "None" ]; then | 
|  | 592 | inicomment $TEMPEST_CONFIG volume max_microversion | 
|  | 593 | else | 
|  | 594 | iniset $TEMPEST_CONFIG volume max_microversion $tempest_volume_max_microversion | 
|  | 595 | fi | 
| David Kranz | d1d6667 | 2015-06-11 13:09:37 -0400 | [diff] [blame] | 596 |  | 
| Giulio Fidente | 3d60f4d | 2014-02-20 16:43:49 +0100 | [diff] [blame] | 597 | if ! is_service_enabled c-bak; then | 
|  | 598 | iniset $TEMPEST_CONFIG volume-feature-enabled backup False | 
| Giulio Fidente | 3632ab1 | 2013-09-10 02:51:26 +0200 | [diff] [blame] | 599 | fi | 
| Swapnil Kulkarni | 09fb7ba | 2014-10-16 06:30:28 +0000 | [diff] [blame] | 600 |  | 
| Dean Troyer | dc97cb7 | 2015-03-28 08:20:50 -0500 | [diff] [blame] | 601 | # Using ``CINDER_ENABLED_BACKENDS`` | 
| bkopilov | 3ac1ea8 | 2016-06-06 16:00:48 +0300 | [diff] [blame] | 602 | # Cinder uses a comma separated list with "type:backend_name": | 
|  | 603 | #  CINDER_ENABLED_BACKENDS = ceph:cephBE1,lvm:lvmBE2,foo:my_foo | 
| Swapnil Kulkarni | 09fb7ba | 2014-10-16 06:30:28 +0000 | [diff] [blame] | 604 | if [[ -n "$CINDER_ENABLED_BACKENDS" ]] && [[ $CINDER_ENABLED_BACKENDS =~ .*,.* ]]; then | 
| bkopilov | 3ac1ea8 | 2016-06-06 16:00:48 +0300 | [diff] [blame] | 605 | # We have at least 2 backends | 
| Matthew Treinish | db1c384 | 2014-02-04 20:58:00 +0000 | [diff] [blame] | 606 | iniset $TEMPEST_CONFIG volume-feature-enabled multi_backend "True" | 
| bkopilov | 3ac1ea8 | 2016-06-06 16:00:48 +0300 | [diff] [blame] | 607 | local add_comma_seperator=0 | 
|  | 608 | local backends_list='' | 
| Swapnil Kulkarni | 09fb7ba | 2014-10-16 06:30:28 +0000 | [diff] [blame] | 609 | local be | 
| bkopilov | 3ac1ea8 | 2016-06-06 16:00:48 +0300 | [diff] [blame] | 610 | # Tempest uses a comma separated list of backend_names: | 
|  | 611 | #   backend_names = BACKEND_1,BACKEND_2 | 
| Swapnil Kulkarni | 09fb7ba | 2014-10-16 06:30:28 +0000 | [diff] [blame] | 612 | for be in ${CINDER_ENABLED_BACKENDS//,/ }; do | 
| bkopilov | 3ac1ea8 | 2016-06-06 16:00:48 +0300 | [diff] [blame] | 613 | if [ "$add_comma_seperator" -eq "1" ]; then | 
|  | 614 | backends_list+=,${be##*:} | 
|  | 615 | else | 
|  | 616 | # first element in the list | 
|  | 617 | backends_list+=${be##*:} | 
|  | 618 | add_comma_seperator=1 | 
|  | 619 | fi | 
| Swapnil Kulkarni | 09fb7ba | 2014-10-16 06:30:28 +0000 | [diff] [blame] | 620 | done | 
| bkopilov | 3ac1ea8 | 2016-06-06 16:00:48 +0300 | [diff] [blame] | 621 | iniset $TEMPEST_CONFIG volume "backend_names" "$backends_list" | 
| john-griffith | dc4dc7f | 2014-01-22 18:09:32 -0700 | [diff] [blame] | 622 | fi | 
|  | 623 |  | 
| Eric Harney | 0145648 | 2014-10-14 18:53:53 -0400 | [diff] [blame] | 624 | if [ $TEMPEST_VOLUME_DRIVER != "default" -o \ | 
| Patrick East | 1c0628f | 2014-10-22 16:22:47 -0700 | [diff] [blame] | 625 | "$TEMPEST_VOLUME_VENDOR" != "$TEMPEST_DEFAULT_VOLUME_VENDOR" ]; then | 
| Ed Balduf | 2f23d75 | 2014-07-29 14:42:27 -0600 | [diff] [blame] | 626 | iniset $TEMPEST_CONFIG volume vendor_name "$TEMPEST_VOLUME_VENDOR" | 
| Eric Harney | 0145648 | 2014-10-14 18:53:53 -0400 | [diff] [blame] | 627 | fi | 
|  | 628 | if [ $TEMPEST_VOLUME_DRIVER != "default" -o \ | 
| JordanP | 82a7d93 | 2014-12-04 14:09:16 +0100 | [diff] [blame] | 629 | "$TEMPEST_STORAGE_PROTOCOL" != "$TEMPEST_DEFAULT_STORAGE_PROTOCOL" ]; then | 
|  | 630 | iniset $TEMPEST_CONFIG volume storage_protocol "$TEMPEST_STORAGE_PROTOCOL" | 
| Giulio Fidente | 97e1bd0 | 2013-06-04 05:33:52 +0200 | [diff] [blame] | 631 | fi | 
|  | 632 |  | 
| Rajat Dhasmana | 1898a68 | 2023-03-14 05:35:33 +0000 | [diff] [blame] | 633 | if [[ $ENABLE_VOLUME_MULTIATTACH == "True" ]]; then | 
|  | 634 | iniset $TEMPEST_CONFIG volume volume_type_multiattach $VOLUME_TYPE_MULTIATTACH | 
|  | 635 | fi | 
|  | 636 |  | 
| Ghanshyam Mann | fc20705 | 2019-06-05 08:24:45 +0000 | [diff] [blame] | 637 | # Placement Features | 
|  | 638 | # Set the microversion range for placement. | 
|  | 639 | # Setting [None, latest] range of microversion which allow Tempest to run all microversions tests. | 
|  | 640 | # NOTE- To avoid microversion tests failure on stable branch, we need to change "tempest_placement_max_microversion" | 
|  | 641 | #       for stable branch on each release which should be changed from "latest" to max supported version of that release. | 
|  | 642 | local tempest_placement_min_microversion=${TEMPEST_PLACEMENT_MIN_MICROVERSION:-None} | 
|  | 643 | local tempest_placement_max_microversion=${TEMPEST_PLACEMENT_MAX_MICROVERSION:-"latest"} | 
|  | 644 | if [ "$tempest_placement_min_microversion" == "None" ]; then | 
|  | 645 | inicomment $TEMPEST_CONFIG placement min_microversion | 
|  | 646 | else | 
|  | 647 | iniset $TEMPEST_CONFIG placement min_microversion $tempest_placement_min_microversion | 
|  | 648 | fi | 
|  | 649 | if [ "$tempest_placement_max_microversion" == "None" ]; then | 
|  | 650 | inicomment $TEMPEST_CONFIG placement max_microversion | 
|  | 651 | else | 
|  | 652 | iniset $TEMPEST_CONFIG placement max_microversion $tempest_placement_max_microversion | 
|  | 653 | fi | 
|  | 654 |  | 
| Adam Gandelman | 43bd667 | 2014-04-03 11:13:13 -0700 | [diff] [blame] | 655 | # Baremetal | 
|  | 656 | if [ "$VIRT_DRIVER" = "ironic" ] ; then | 
| Adam Gandelman | fdfe7a0 | 2014-07-24 10:06:18 -0400 | [diff] [blame] | 657 | iniset $TEMPEST_CONFIG compute-feature-enabled change_password False | 
|  | 658 | iniset $TEMPEST_CONFIG compute-feature-enabled console_output False | 
|  | 659 | iniset $TEMPEST_CONFIG compute-feature-enabled interface_attach False | 
|  | 660 | iniset $TEMPEST_CONFIG compute-feature-enabled live_migration False | 
|  | 661 | iniset $TEMPEST_CONFIG compute-feature-enabled pause False | 
|  | 662 | iniset $TEMPEST_CONFIG compute-feature-enabled rescue False | 
|  | 663 | iniset $TEMPEST_CONFIG compute-feature-enabled resize False | 
|  | 664 | iniset $TEMPEST_CONFIG compute-feature-enabled shelve False | 
|  | 665 | iniset $TEMPEST_CONFIG compute-feature-enabled snapshot False | 
| David Shrewsbury | cf21b71 | 2014-08-13 07:03:58 -0400 | [diff] [blame] | 666 | iniset $TEMPEST_CONFIG compute-feature-enabled suspend False | 
| Adam Gandelman | 43bd667 | 2014-04-03 11:13:13 -0700 | [diff] [blame] | 667 | fi | 
|  | 668 |  | 
| Matt Riedemann | 92575ba | 2016-09-21 16:15:31 -0400 | [diff] [blame] | 669 | # Libvirt | 
|  | 670 | if [ "$VIRT_DRIVER" = "libvirt" ]; then | 
|  | 671 | # Libvirt-LXC | 
|  | 672 | if [ "$LIBVIRT_TYPE" = "lxc" ]; then | 
|  | 673 | iniset $TEMPEST_CONFIG compute-feature-enabled rescue False | 
|  | 674 | iniset $TEMPEST_CONFIG compute-feature-enabled resize False | 
|  | 675 | iniset $TEMPEST_CONFIG compute-feature-enabled shelve False | 
|  | 676 | iniset $TEMPEST_CONFIG compute-feature-enabled snapshot False | 
|  | 677 | iniset $TEMPEST_CONFIG compute-feature-enabled suspend False | 
| Stephen Finucane | 4b8cba7 | 2019-05-21 14:17:11 +0100 | [diff] [blame] | 678 | else | 
| Alexandre Arents | 4a1186a | 2020-09-17 12:50:53 +0000 | [diff] [blame] | 679 | iniset $TEMPEST_CONFIG compute-feature-enabled shelve_migrate True | 
| Lee Yarwood | 4361ef1 | 2019-12-11 17:53:44 +0000 | [diff] [blame] | 680 | iniset $TEMPEST_CONFIG compute-feature-enabled stable_rescue True | 
| Matt Riedemann | e9a9fbe | 2017-01-30 22:22:43 -0500 | [diff] [blame] | 681 | iniset $TEMPEST_CONFIG compute-feature-enabled swap_volume True | 
| Matt Riedemann | 92575ba | 2016-09-21 16:15:31 -0400 | [diff] [blame] | 682 | fi | 
| Nels Nelson | 7b47c47 | 2015-01-05 16:36:42 -0600 | [diff] [blame] | 683 | fi | 
|  | 684 |  | 
| Dean Troyer | dc97cb7 | 2015-03-28 08:20:50 -0500 | [diff] [blame] | 685 | # ``service_available`` | 
| Sean Dague | 346edcc | 2015-08-26 09:38:37 -0400 | [diff] [blame] | 686 | # | 
| ghanshyam | f0dd999 | 2018-11-26 07:38:54 +0000 | [diff] [blame] | 687 | # this tempest service list needs to be the services that | 
|  | 688 | # tempest own, otherwise we can have an erroneous set of | 
| Sean Dague | 346edcc | 2015-08-26 09:38:37 -0400 | [diff] [blame] | 689 | # defaults (something defaulting true in Tempest, but not listed here). | 
| ghanshyam | f0dd999 | 2018-11-26 07:38:54 +0000 | [diff] [blame] | 690 | # services tested by tempest plugins needs to be set on service devstack | 
|  | 691 | # plugin side as devstack cannot keep track of all the tempest plugins | 
|  | 692 | # services. Refer Bug#1743688 for more details. | 
|  | 693 | # 'horizon' is also kept here as no devtack plugin for horizon. | 
| Sean Dague | 0f76535 | 2016-02-18 06:53:08 -0500 | [diff] [blame] | 694 | local service | 
| ghanshyam | f0dd999 | 2018-11-26 07:38:54 +0000 | [diff] [blame] | 695 | local tempest_services="key,glance,nova,neutron,cinder,swift,horizon" | 
| Sean Dague | 0f76535 | 2016-02-18 06:53:08 -0500 | [diff] [blame] | 696 | for service in ${tempest_services//,/ }; do | 
| Matthew Treinish | b56d81d | 2013-07-23 17:25:39 -0400 | [diff] [blame] | 697 | if is_service_enabled $service ; then | 
| john-griffith | dc4dc7f | 2014-01-22 18:09:32 -0700 | [diff] [blame] | 698 | iniset $TEMPEST_CONFIG service_available $service "True" | 
| Matthew Treinish | b56d81d | 2013-07-23 17:25:39 -0400 | [diff] [blame] | 699 | else | 
| john-griffith | dc4dc7f | 2014-01-22 18:09:32 -0700 | [diff] [blame] | 700 | iniset $TEMPEST_CONFIG service_available $service "False" | 
| Matthew Treinish | b56d81d | 2013-07-23 17:25:39 -0400 | [diff] [blame] | 701 | fi | 
|  | 702 | done | 
|  | 703 |  | 
| Grzegorz Grasza | 5f5002a | 2021-10-26 10:50:37 +0200 | [diff] [blame] | 704 | # ``enforce_scope`` | 
|  | 705 | # If services enable the enforce_scope for their policy | 
|  | 706 | # we need to enable the same on Tempest side so that | 
|  | 707 | # test can be run with scoped token. | 
| Grzegorz Grasza | 8615563 | 2021-10-18 16:52:06 +0200 | [diff] [blame] | 708 | if [[ "$KEYSTONE_ENFORCE_SCOPE" == True || "$ENFORCE_SCOPE" == True ]] ; then | 
| Grzegorz Grasza | 5f5002a | 2021-10-26 10:50:37 +0200 | [diff] [blame] | 709 | iniset $TEMPEST_CONFIG enforce_scope keystone true | 
| Grzegorz Grasza | 5f5002a | 2021-10-26 10:50:37 +0200 | [diff] [blame] | 710 | fi | 
| Ghanshyam Mann | 9dc2b88 | 2021-03-05 09:32:19 -0600 | [diff] [blame] | 711 |  | 
| Ghanshyam Mann | 857f499 | 2022-10-19 20:15:42 -0500 | [diff] [blame] | 712 | if [[ "$NOVA_ENFORCE_SCOPE" == True || "$ENFORCE_SCOPE" == True ]] ; then | 
|  | 713 | iniset $TEMPEST_CONFIG enforce_scope nova true | 
|  | 714 | fi | 
|  | 715 |  | 
| Ghanshyam Mann | 16c2b38 | 2022-11-30 14:24:07 -0600 | [diff] [blame] | 716 | if [[ "$PLACEMENT_ENFORCE_SCOPE" == True || "$ENFORCE_SCOPE" == True ]] ; then | 
|  | 717 | iniset $TEMPEST_CONFIG enforce_scope placement true | 
|  | 718 | fi | 
|  | 719 |  | 
| Grzegorz Grasza | 8615563 | 2021-10-18 16:52:06 +0200 | [diff] [blame] | 720 | if [[ "$GLANCE_ENFORCE_SCOPE" == True || "$ENFORCE_SCOPE" == True ]] ; then | 
|  | 721 | iniset $TEMPEST_CONFIG enforce_scope glance true | 
|  | 722 | fi | 
|  | 723 |  | 
|  | 724 | if [[ "$CINDER_ENFORCE_SCOPE" == True || "$ENFORCE_SCOPE" == True ]] ; then | 
|  | 725 | iniset $TEMPEST_CONFIG enforce_scope cinder true | 
|  | 726 | fi | 
| Ghanshyam Mann | bd0d0fd | 2021-03-06 17:23:39 -0600 | [diff] [blame] | 727 |  | 
| Matt Riedemann | cf94edc | 2015-10-28 09:50:01 -0700 | [diff] [blame] | 728 | if [ "$VIRT_DRIVER" = "libvirt" ] && [ "$LIBVIRT_TYPE" = "lxc" ]; then | 
|  | 729 | # libvirt-lxc does not support boot from volume or attaching volumes | 
|  | 730 | # so basically anything with cinder is out of the question. | 
|  | 731 | iniset $TEMPEST_CONFIG service_available cinder "False" | 
|  | 732 | fi | 
|  | 733 |  | 
| Matthew Treinish | e8f3f7a | 2016-04-11 12:52:39 -0400 | [diff] [blame] | 734 | # Run tempest configuration utilities. This must be done last during configuration to | 
|  | 735 | # ensure as complete a config as possible already exists | 
|  | 736 |  | 
|  | 737 | # NOTE(mtreinish): Respect constraints on tempest verify-config venv | 
|  | 738 | local tmp_cfg_file | 
|  | 739 | tmp_cfg_file=$(mktemp) | 
|  | 740 | cd $TEMPEST_DIR | 
| Claudiu Belu | 34c1679 | 2017-06-12 09:32:21 -0700 | [diff] [blame] | 741 |  | 
| Rodolfo Alonso Hernandez | 8579f58 | 2019-11-04 11:37:54 +0000 | [diff] [blame] | 742 | local tmp_u_c_m | 
|  | 743 | tmp_u_c_m=$(mktemp -t tempest_u_c_m.XXXXXXXXXX) | 
| Ghanshyam Mann | 3bdc8f6 | 2021-02-09 12:56:34 -0600 | [diff] [blame] | 744 | set_tempest_venv_constraints $tmp_u_c_m | 
| June Yi | b9b6d6b | 2022-07-02 13:07:43 +0900 | [diff] [blame] | 745 | if [[ "$OFFLINE" != "True" ]]; then | 
|  | 746 | tox -revenv-tempest --notest | 
|  | 747 | fi | 
| Rodolfo Alonso Hernandez | 8579f58 | 2019-11-04 11:37:54 +0000 | [diff] [blame] | 748 | tox -evenv-tempest -- pip install -c $tmp_u_c_m -r requirements.txt | 
|  | 749 | rm -f $tmp_u_c_m | 
| Matthew Treinish | e8f3f7a | 2016-04-11 12:52:39 -0400 | [diff] [blame] | 750 |  | 
|  | 751 | # Auth: | 
| Matthew Treinish | e8f3f7a | 2016-04-11 12:52:39 -0400 | [diff] [blame] | 752 | if [[ $TEMPEST_USE_TEST_ACCOUNTS == "True" ]]; then | 
|  | 753 | if [[ $TEMPEST_HAS_ADMIN == "True" ]]; then | 
| Soniya Vyas | 7634c78 | 2019-12-26 16:59:56 +0530 | [diff] [blame] | 754 | tox -evenv-tempest -- tempest account-generator -c $TEMPEST_CONFIG --os-username $admin_username --os-password "$password" --os-project-name $admin_project_name -r $TEMPEST_CONCURRENCY --with-admin etc/accounts.yaml | 
| Matthew Treinish | e8f3f7a | 2016-04-11 12:52:39 -0400 | [diff] [blame] | 755 | else | 
| Soniya Vyas | 7634c78 | 2019-12-26 16:59:56 +0530 | [diff] [blame] | 756 | tox -evenv-tempest -- tempest account-generator -c $TEMPEST_CONFIG --os-username $admin_username --os-password "$password" --os-project-name $admin_project_name -r $TEMPEST_CONCURRENCY etc/accounts.yaml | 
| Matthew Treinish | e8f3f7a | 2016-04-11 12:52:39 -0400 | [diff] [blame] | 757 | fi | 
|  | 758 | iniset $TEMPEST_CONFIG auth use_dynamic_credentials False | 
|  | 759 | iniset $TEMPEST_CONFIG auth test_accounts_file "etc/accounts.yaml" | 
|  | 760 | elif [[ $TEMPEST_HAS_ADMIN == "False" ]]; then | 
|  | 761 | iniset $TEMPEST_CONFIG auth use_dynamic_credentials ${TEMPEST_ALLOW_TENANT_ISOLATION:-False} | 
|  | 762 |  | 
|  | 763 | else | 
|  | 764 | iniset $TEMPEST_CONFIG auth use_dynamic_credentials ${TEMPEST_ALLOW_TENANT_ISOLATION:-True} | 
|  | 765 | fi | 
|  | 766 |  | 
|  | 767 | # API Extensions | 
|  | 768 | # Run ``verify_tempest_config -ur`` to retrieve enabled extensions on API endpoints | 
|  | 769 | # NOTE(mtreinish): This must be done after auth settings are added to the tempest config | 
|  | 770 | tox -evenv -- tempest verify-config -uro $tmp_cfg_file | 
| Sean Dague | 7b22935 | 2016-08-09 13:29:11 -0400 | [diff] [blame] | 771 |  | 
| Matthew Treinish | e8f3f7a | 2016-04-11 12:52:39 -0400 | [diff] [blame] | 772 | # Neutron API Extensions | 
| Sean Dague | 894ccc9 | 2016-08-08 16:19:05 -0400 | [diff] [blame] | 773 |  | 
|  | 774 | # disable metering if we didn't enable the service | 
| Slawek Kaplonski | a52041c | 2022-11-18 11:39:56 +0100 | [diff] [blame] | 775 | if ! is_service_enabled q-metering neutron-metering; then | 
| Sean Dague | 894ccc9 | 2016-08-08 16:19:05 -0400 | [diff] [blame] | 776 | DISABLE_NETWORK_API_EXTENSIONS+=", metering" | 
|  | 777 | fi | 
|  | 778 |  | 
| Dima Kuznetsov | 787412c | 2017-08-28 09:09:38 +0300 | [diff] [blame] | 779 | # disable l3_agent_scheduler if we didn't enable L3 agent | 
| Slawek Kaplonski | a52041c | 2022-11-18 11:39:56 +0100 | [diff] [blame] | 780 | if ! is_service_enabled q-l3 neutron-l3; then | 
| Dima Kuznetsov | 787412c | 2017-08-28 09:09:38 +0300 | [diff] [blame] | 781 | DISABLE_NETWORK_API_EXTENSIONS+=", l3_agent_scheduler" | 
|  | 782 | fi | 
|  | 783 |  | 
| Matthew Treinish | e8f3f7a | 2016-04-11 12:52:39 -0400 | [diff] [blame] | 784 | local network_api_extensions=${NETWORK_API_EXTENSIONS:-"all"} | 
|  | 785 | if [[ ! -z "$DISABLE_NETWORK_API_EXTENSIONS" ]]; then | 
|  | 786 | # Enabled extensions are either the ones explicitly specified or those available on the API endpoint | 
|  | 787 | network_api_extensions=${NETWORK_API_EXTENSIONS:-$(iniget $tmp_cfg_file network-feature-enabled api_extensions | tr -d " ")} | 
|  | 788 | # Remove disabled extensions | 
|  | 789 | network_api_extensions=$(remove_disabled_extensions $network_api_extensions $DISABLE_NETWORK_API_EXTENSIONS) | 
|  | 790 | fi | 
| Ghanshyam Mann | 52c2886 | 2019-06-20 07:42:31 +0000 | [diff] [blame] | 791 | if [[ -n "$ADDITIONAL_NETWORK_API_EXTENSIONS" ]] && [[ "$network_api_extensions" != "all" ]]; then | 
|  | 792 | network_api_extensions+=",$ADDITIONAL_NETWORK_API_EXTENSIONS" | 
|  | 793 | fi | 
| Matthew Treinish | e8f3f7a | 2016-04-11 12:52:39 -0400 | [diff] [blame] | 794 | iniset $TEMPEST_CONFIG network-feature-enabled api_extensions $network_api_extensions | 
|  | 795 | # Swift API Extensions | 
|  | 796 | local object_storage_api_extensions=${OBJECT_STORAGE_API_EXTENSIONS:-"all"} | 
|  | 797 | if [[ ! -z "$DISABLE_OBJECT_STORAGE_API_EXTENSIONS" ]]; then | 
|  | 798 | # Enabled extensions are either the ones explicitly specified or those available on the API endpoint | 
|  | 799 | object_storage_api_extensions=${OBJECT_STORAGE_API_EXTENSIONS:-$(iniget $tmp_cfg_file object-storage-feature-enabled discoverable_apis | tr -d " ")} | 
|  | 800 | # Remove disabled extensions | 
|  | 801 | object_storage_api_extensions=$(remove_disabled_extensions $object_storage_api_extensions $DISABLE_STORAGE_API_EXTENSIONS) | 
|  | 802 | fi | 
|  | 803 | iniset $TEMPEST_CONFIG object-storage-feature-enabled discoverable_apis $object_storage_api_extensions | 
|  | 804 | # Cinder API Extensions | 
|  | 805 | local volume_api_extensions=${VOLUME_API_EXTENSIONS:-"all"} | 
|  | 806 | if [[ ! -z "$DISABLE_VOLUME_API_EXTENSIONS" ]]; then | 
|  | 807 | # Enabled extensions are either the ones explicitly specified or those available on the API endpoint | 
|  | 808 | volume_api_extensions=${VOLUME_API_EXTENSIONS:-$(iniget $tmp_cfg_file volume-feature-enabled api_extensions | tr -d " ")} | 
|  | 809 | # Remove disabled extensions | 
|  | 810 | volume_api_extensions=$(remove_disabled_extensions $volume_api_extensions $DISABLE_VOLUME_API_EXTENSIONS) | 
|  | 811 | fi | 
|  | 812 | iniset $TEMPEST_CONFIG volume-feature-enabled api_extensions $volume_api_extensions | 
|  | 813 |  | 
| Attila Fazekas | 2aa3517 | 2012-12-05 20:03:40 +0100 | [diff] [blame] | 814 | # Restore IFS | 
|  | 815 | IFS=$ifs | 
| Sean Dague | d093121 | 2012-10-04 16:06:44 -0400 | [diff] [blame] | 816 | } | 
|  | 817 |  | 
| Sean Dague | d093121 | 2012-10-04 16:06:44 -0400 | [diff] [blame] | 818 | # install_tempest() - Collect source and prepare | 
| Ian Wienand | aee18c7 | 2014-02-21 15:35:08 +1100 | [diff] [blame] | 819 | function install_tempest { | 
| Sean Dague | d093121 | 2012-10-04 16:06:44 -0400 | [diff] [blame] | 820 | git_clone $TEMPEST_REPO $TEMPEST_DIR $TEMPEST_BRANCH | 
| Ghanshyam Mann | 9a1be77 | 2022-12-08 20:24:46 -0600 | [diff] [blame] | 821 | # NOTE(gmann): Pinning tox<4.0.0 for stable/zed and lower. Tox 4.0.0 | 
|  | 822 | # released after zed was released and has some incompatible changes | 
|  | 823 | # and it is ok not to fix the issues caused by tox 4.0.0 in stable | 
|  | 824 | # beanches jobs. We can continue testing the stable/zed and lower | 
|  | 825 | # branches with tox<4.0.0 | 
|  | 826 | pip_install 'tox!=2.8.0,<4.0.0' | 
| Matthew Treinish | 83e166b | 2015-02-18 19:01:20 -0500 | [diff] [blame] | 827 | pushd $TEMPEST_DIR | 
| Ghanshyam | e1c0406 | 2020-01-29 15:39:17 -0600 | [diff] [blame] | 828 | # NOTE(gmann): checkout the TEMPEST_BRANCH in case TEMPEST_BRANCH | 
|  | 829 | # is tag name not master. git_clone would not checkout tag because | 
|  | 830 | # TEMPEST_DIR already exist until RECLONE is true. | 
|  | 831 | git checkout $TEMPEST_BRANCH | 
|  | 832 |  | 
| Ghanshyam Mann | 3bdc8f6 | 2021-02-09 12:56:34 -0600 | [diff] [blame] | 833 | local tmp_u_c_m | 
|  | 834 | tmp_u_c_m=$(mktemp -t tempest_u_c_m.XXXXXXXXXX) | 
|  | 835 | set_tempest_venv_constraints $tmp_u_c_m | 
|  | 836 |  | 
| Sean Dague | 583c520 | 2017-03-21 11:15:05 -0400 | [diff] [blame] | 837 | tox -r --notest -efull | 
| Matthew Treinish | 1e31e68 | 2016-02-09 23:50:54 -0500 | [diff] [blame] | 838 | # NOTE(mtreinish) Respect constraints in the tempest full venv, things that | 
|  | 839 | # are using a tox job other than full will not be respecting constraints but | 
|  | 840 | # running pip install -U on tempest requirements | 
| Ghanshyam Mann | 3bdc8f6 | 2021-02-09 12:56:34 -0600 | [diff] [blame] | 841 | $TEMPEST_DIR/.tox/tempest/bin/pip install -c $tmp_u_c_m -r requirements.txt | 
| Matthew Treinish | 440464c | 2016-05-04 11:55:12 -0400 | [diff] [blame] | 842 | PROJECT_VENV["tempest"]=${TEMPEST_DIR}/.tox/tempest | 
| Ghanshyam Mann | 3bdc8f6 | 2021-02-09 12:56:34 -0600 | [diff] [blame] | 843 | rm -f $tmp_u_c_m | 
| Matthew Treinish | 7e603d1 | 2016-06-01 18:16:14 -0400 | [diff] [blame] | 844 | popd | 
|  | 845 | } | 
|  | 846 |  | 
|  | 847 | # install_tempest_plugins() - Install any specified plugins into the tempest venv | 
|  | 848 | function install_tempest_plugins { | 
|  | 849 | pushd $TEMPEST_DIR | 
| Matthew Treinish | 440464c | 2016-05-04 11:55:12 -0400 | [diff] [blame] | 850 | if [[ $TEMPEST_PLUGINS != 0 ]] ; then | 
| Rodolfo Alonso Hernandez | 8579f58 | 2019-11-04 11:37:54 +0000 | [diff] [blame] | 851 | local tmp_u_c_m | 
|  | 852 | tmp_u_c_m=$(mktemp -t tempest_u_c_m.XXXXXXXXXX) | 
| Ghanshyam Mann | 3bdc8f6 | 2021-02-09 12:56:34 -0600 | [diff] [blame] | 853 | set_tempest_venv_constraints $tmp_u_c_m | 
| Rodolfo Alonso Hernandez | 8579f58 | 2019-11-04 11:37:54 +0000 | [diff] [blame] | 854 | tox -evenv-tempest -- pip install -c $tmp_u_c_m $TEMPEST_PLUGINS | 
|  | 855 | rm -f $tmp_u_c_m | 
| Matthew Treinish | b655867 | 2016-05-20 17:30:17 -0400 | [diff] [blame] | 856 | echo "Checking installed Tempest plugins:" | 
|  | 857 | tox -evenv-tempest -- tempest list-plugins | 
| Matthew Treinish | b31640a | 2016-05-02 16:33:29 -0400 | [diff] [blame] | 858 | fi | 
| Matthew Treinish | 83e166b | 2015-02-18 19:01:20 -0500 | [diff] [blame] | 859 | popd | 
| Sean Dague | d093121 | 2012-10-04 16:06:44 -0400 | [diff] [blame] | 860 | } | 
|  | 861 |  | 
| Sean Dague | d093121 | 2012-10-04 16:06:44 -0400 | [diff] [blame] | 862 | # Restore xtrace | 
| Ian Wienand | 523f488 | 2015-10-13 11:03:03 +1100 | [diff] [blame] | 863 | $_XTRACE_TEMPEST | 
| Sean Dague | 584d90e | 2013-03-29 14:34:53 -0400 | [diff] [blame] | 864 |  | 
| Adam Spiers | 6a5aa7c | 2013-10-24 11:27:02 +0100 | [diff] [blame] | 865 | # Tell emacs to use shell-script-mode | 
|  | 866 | ## Local variables: | 
|  | 867 | ## mode: shell-script | 
|  | 868 | ## End: |