| 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`` | 
 | 14 | #   - ``S3_SERVICE_PORT`` | 
 | 15 | #   - ``SERVICE_HOST`` | 
 | 16 | #   - ``BASE_SQL_CONN`` ``lib/database`` declares | 
 | 17 | #   - ``PUBLIC_NETWORK_NAME`` | 
| Adam Spiers | 6a5aa7c | 2013-10-24 11:27:02 +0100 | [diff] [blame] | 18 | #   - ``VIRT_DRIVER`` | 
 | 19 | #   - ``LIBVIRT_TYPE`` | 
 | 20 | #   - ``KEYSTONE_SERVICE_PROTOCOL``, ``KEYSTONE_SERVICE_HOST`` from lib/keystone | 
 | 21 | # | 
| Attila Fazekas | 2aa3517 | 2012-12-05 20:03:40 +0100 | [diff] [blame] | 22 | # Optional Dependencies: | 
| Adam Spiers | 6a5aa7c | 2013-10-24 11:27:02 +0100 | [diff] [blame] | 23 | # | 
| Einst Crazy | f54f60a | 2015-10-30 23:00:57 +0800 | [diff] [blame] | 24 | # - ``ALT_*`` | 
| Adam Spiers | 6a5aa7c | 2013-10-24 11:27:02 +0100 | [diff] [blame] | 25 | # - ``LIVE_MIGRATION_AVAILABLE`` | 
 | 26 | # - ``USE_BLOCK_MIGRATION_FOR_LIVE_MIGRATION`` | 
 | 27 | # - ``DEFAULT_INSTANCE_TYPE`` | 
 | 28 | # - ``DEFAULT_INSTANCE_USER`` | 
| Swapnil Kulkarni | 09fb7ba | 2014-10-16 06:30:28 +0000 | [diff] [blame] | 29 | # - ``CINDER_ENABLED_BACKENDS`` | 
| Matt Riedemann | 89ee585 | 2015-07-09 13:25:04 -0700 | [diff] [blame] | 30 | # - ``NOVA_ALLOW_DUPLICATE_NETWORKS`` | 
| Adam Spiers | 6a5aa7c | 2013-10-24 11:27:02 +0100 | [diff] [blame] | 31 | # | 
| Sean Dague | d093121 | 2012-10-04 16:06:44 -0400 | [diff] [blame] | 32 | # ``stack.sh`` calls the entry points in this order: | 
 | 33 | # | 
| Adam Spiers | 6a5aa7c | 2013-10-24 11:27:02 +0100 | [diff] [blame] | 34 | # - install_tempest | 
 | 35 | # - configure_tempest | 
| Sean Dague | d093121 | 2012-10-04 16:06:44 -0400 | [diff] [blame] | 36 |  | 
 | 37 | # Save trace setting | 
| Ian Wienand | 523f488 | 2015-10-13 11:03:03 +1100 | [diff] [blame] | 38 | _XTRACE_TEMPEST=$(set +o | grep xtrace) | 
| Sean Dague | d093121 | 2012-10-04 16:06:44 -0400 | [diff] [blame] | 39 | set +o xtrace | 
 | 40 |  | 
| Dean Troyer | 6d04fd7 | 2012-12-21 11:03:37 -0600 | [diff] [blame] | 41 |  | 
| Sean Dague | d093121 | 2012-10-04 16:06:44 -0400 | [diff] [blame] | 42 | # Defaults | 
 | 43 | # -------- | 
 | 44 |  | 
| Sean Dague | d093121 | 2012-10-04 16:06:44 -0400 | [diff] [blame] | 45 | # Set up default directories | 
 | 46 | TEMPEST_DIR=$DEST/tempest | 
| john-griffith | dc4dc7f | 2014-01-22 18:09:32 -0700 | [diff] [blame] | 47 | TEMPEST_CONFIG_DIR=${TEMPEST_CONFIG_DIR:-$TEMPEST_DIR/etc} | 
 | 48 | TEMPEST_CONFIG=$TEMPEST_CONFIG_DIR/tempest.conf | 
| Matthew Treinish | 14ccba0 | 2013-07-29 16:15:53 -0400 | [diff] [blame] | 49 | TEMPEST_STATE_PATH=${TEMPEST_STATE_PATH:=$DATA_DIR/tempest} | 
| Attila Fazekas | 2aa3517 | 2012-12-05 20:03:40 +0100 | [diff] [blame] | 50 |  | 
| Dean Troyer | 6d04fd7 | 2012-12-21 11:03:37 -0600 | [diff] [blame] | 51 | NOVA_SOURCE_DIR=$DEST/nova | 
 | 52 |  | 
| Attila Fazekas | bae0233 | 2013-05-09 09:24:49 +0200 | [diff] [blame] | 53 | BUILD_INTERVAL=1 | 
| Arx Cruz | 1bde9b4 | 2014-07-18 11:34:33 -0300 | [diff] [blame] | 54 |  | 
 | 55 | # This is the timeout that tempest will wait for a VM to change state, | 
 | 56 | # spawn, delete, etc. | 
 | 57 | # The default is set to 196 seconds. | 
 | 58 | BUILD_TIMEOUT=${BUILD_TIMEOUT:-196} | 
| Sean Dague | d093121 | 2012-10-04 16:06:44 -0400 | [diff] [blame] | 59 |  | 
| Joe Gordon | c9b245b | 2015-02-10 14:32:39 -0800 | [diff] [blame] | 60 | # This must be False on stable branches, as master tempest | 
 | 61 | # deps do not match stable branch deps. Set this to True to | 
| Dean Troyer | dc97cb7 | 2015-03-28 08:20:50 -0500 | [diff] [blame] | 62 | # have tempest installed in DevStack by default. | 
| Matthew Treinish | cb3cece | 2015-03-16 10:37:51 -0400 | [diff] [blame] | 63 | INSTALL_TEMPEST=${INSTALL_TEMPEST:-"True"} | 
| Joe Gordon | c9b245b | 2015-02-10 14:32:39 -0800 | [diff] [blame] | 64 |  | 
| Matthew Treinish | 440464c | 2016-05-04 11:55:12 -0400 | [diff] [blame] | 65 | # This variable is passed directly to pip install inside the common tox venv | 
 | 66 | # that is created | 
 | 67 | TEMPEST_PLUGINS=${TEMPEST_PLUGINS:-0} | 
 | 68 |  | 
| john-griffith | dc4dc7f | 2014-01-22 18:09:32 -0700 | [diff] [blame] | 69 | # Cinder/Volume variables | 
 | 70 | TEMPEST_VOLUME_DRIVER=${TEMPEST_VOLUME_DRIVER:-default} | 
| Eric Harney | 0145648 | 2014-10-14 18:53:53 -0400 | [diff] [blame] | 71 | TEMPEST_DEFAULT_VOLUME_VENDOR="Open Source" | 
 | 72 | TEMPEST_VOLUME_VENDOR=${TEMPEST_VOLUME_VENDOR:-$TEMPEST_DEFAULT_VOLUME_VENDOR} | 
 | 73 | TEMPEST_DEFAULT_STORAGE_PROTOCOL="iSCSI" | 
 | 74 | TEMPEST_STORAGE_PROTOCOL=${TEMPEST_STORAGE_PROTOCOL:-$TEMPEST_DEFAULT_STORAGE_PROTOCOL} | 
| Dean Troyer | cc6b443 | 2013-04-08 15:38:03 -0500 | [diff] [blame] | 75 |  | 
| armando-migliaccio | 71ef61a | 2014-02-19 22:19:24 -0800 | [diff] [blame] | 76 | # Neutron/Network variables | 
| Sean Dague | 5375329 | 2014-12-04 19:38:15 -0500 | [diff] [blame] | 77 | IPV6_ENABLED=$(trueorfalse True IPV6_ENABLED) | 
 | 78 | IPV6_SUBNET_ATTRIBUTES_ENABLED=$(trueorfalse True IPV6_SUBNET_ATTRIBUTES_ENABLED) | 
| armando-migliaccio | 71ef61a | 2014-02-19 22:19:24 -0800 | [diff] [blame] | 79 |  | 
| Matthew Treinish | df8f43b | 2015-08-09 20:30:39 -0400 | [diff] [blame] | 80 | # Do we want to make a configuration where Tempest has admin on | 
 | 81 | # the cloud. We don't always want to so that we can ensure Tempest | 
 | 82 | # would work on a public cloud. | 
 | 83 | TEMPEST_HAS_ADMIN=$(trueorfalse True TEMPEST_HAS_ADMIN) | 
 | 84 |  | 
 | 85 | # Credential provider configuration option variables | 
 | 86 | TEMPEST_ALLOW_TENANT_ISOLATION=${TEMPEST_ALLOW_TENANT_ISOLATION:-$TEMPEST_HAS_ADMIN} | 
| Matthew Treinish | 403fbb1 | 2015-08-24 21:17:37 -0400 | [diff] [blame] | 87 | TEMPEST_USE_TEST_ACCOUNTS=$(trueorfalse False TEMPEST_USE_TEST_ACCOUNTS) | 
| Matthew Treinish | df8f43b | 2015-08-09 20:30:39 -0400 | [diff] [blame] | 88 |  | 
 | 89 | # The number of workers tempest is expected to be run with. This is used for | 
 | 90 | # generating a accounts.yaml for running with test-accounts. This is also the | 
 | 91 | # same variable that devstack-gate uses to specify the number of workers that | 
 | 92 | # it will run tempest with | 
 | 93 | TEMPEST_CONCURRENCY=${TEMPEST_CONCURRENCY:-$(nproc)} | 
 | 94 |  | 
| Dean Troyer | dc97cb7 | 2015-03-28 08:20:50 -0500 | [diff] [blame] | 95 |  | 
| Dean Troyer | cc6b443 | 2013-04-08 15:38:03 -0500 | [diff] [blame] | 96 | # Functions | 
 | 97 | # --------- | 
| Sean Dague | d093121 | 2012-10-04 16:06:44 -0400 | [diff] [blame] | 98 |  | 
| Salvatore | 33e8ee2 | 2014-10-05 01:36:34 +0200 | [diff] [blame] | 99 | # remove_disabled_extension - removes disabled extensions from the list of extensions | 
 | 100 | # to test for a given service | 
 | 101 | function remove_disabled_extensions { | 
 | 102 |     local extensions_list=$1 | 
 | 103 |     shift | 
 | 104 |     local disabled_exts=$* | 
| fumihiko kakuma | 8606c98 | 2015-04-13 09:55:06 +0900 | [diff] [blame] | 105 |     remove_disabled_services "$extensions_list" "$disabled_exts" | 
| Salvatore | 33e8ee2 | 2014-10-05 01:36:34 +0200 | [diff] [blame] | 106 | } | 
 | 107 |  | 
| Sean Dague | d093121 | 2012-10-04 16:06:44 -0400 | [diff] [blame] | 108 | # configure_tempest() - Set config files, create data dirs, etc | 
| Ian Wienand | aee18c7 | 2014-02-21 15:35:08 +1100 | [diff] [blame] | 109 | function configure_tempest { | 
| Joe Gordon | c9b245b | 2015-02-10 14:32:39 -0800 | [diff] [blame] | 110 |     if [[ "$INSTALL_TEMPEST" == "True" ]]; then | 
 | 111 |         setup_develop $TEMPEST_DIR | 
 | 112 |     else | 
 | 113 |         # install testr since its used to process tempest logs | 
| Sean Dague | 60996b1 | 2015-04-08 09:06:49 -0400 | [diff] [blame] | 114 |         pip_install_gr testrepository | 
| Joe Gordon | c9b245b | 2015-02-10 14:32:39 -0800 | [diff] [blame] | 115 |     fi | 
| Joe Gordon | d5ac785 | 2015-02-06 19:29:23 -0800 | [diff] [blame] | 116 |  | 
| Attila Fazekas | 65c0846 | 2012-12-07 14:20:51 +0100 | [diff] [blame] | 117 |     local image_lines | 
 | 118 |     local images | 
 | 119 |     local num_images | 
 | 120 |     local image_uuid | 
 | 121 |     local image_uuid_alt | 
| Attila Fazekas | 65c0846 | 2012-12-07 14:20:51 +0100 | [diff] [blame] | 122 |     local password | 
 | 123 |     local line | 
 | 124 |     local flavors | 
| Clark Boylan | 3b80bde | 2013-11-20 17:51:50 -0800 | [diff] [blame] | 125 |     local available_flavors | 
| Attila Fazekas | 65c0846 | 2012-12-07 14:20:51 +0100 | [diff] [blame] | 126 |     local flavors_ref | 
 | 127 |     local flavor_lines | 
| Maru Newby | a5c774e | 2012-12-10 10:40:01 +0000 | [diff] [blame] | 128 |     local public_network_id | 
| Maru Newby | 31c94ab | 2012-12-19 03:59:20 +0000 | [diff] [blame] | 129 |     local public_router_id | 
| Sean Dague | 5544c4a | 2016-01-25 08:27:06 -0500 | [diff] [blame] | 130 |     local ssh_connect_method="floating" | 
| Attila Fazekas | 2aa3517 | 2012-12-05 20:03:40 +0100 | [diff] [blame] | 131 |  | 
| Dean Troyer | 6d04fd7 | 2012-12-21 11:03:37 -0600 | [diff] [blame] | 132 |     # Save IFS | 
| Attila Fazekas | 2aa3517 | 2012-12-05 20:03:40 +0100 | [diff] [blame] | 133 |     ifs=$IFS | 
 | 134 |  | 
 | 135 |     # Glance should already contain images to be used in tempest | 
 | 136 |     # testing. Here we simply look for images stored in Glance | 
 | 137 |     # and set the appropriate variables for use in the tempest config | 
 | 138 |     # We ignore ramdisk and kernel images, look for the default image | 
| Attila Fazekas | 65c0846 | 2012-12-07 14:20:51 +0100 | [diff] [blame] | 139 |     # ``DEFAULT_IMAGE_NAME``. If not found, we set the ``image_uuid`` to the | 
 | 140 |     # first image returned and set ``image_uuid_alt`` to the second, | 
| Attila Fazekas | 2aa3517 | 2012-12-05 20:03:40 +0100 | [diff] [blame] | 141 |     # if there is more than one returned... | 
 | 142 |     # ... 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] | 143 |     declare -a images | 
 | 144 |  | 
| Attila Fazekas | c411fcf | 2014-08-19 16:48:14 +0200 | [diff] [blame] | 145 |     if is_service_enabled glance; then | 
 | 146 |         while read -r IMAGE_NAME IMAGE_UUID; do | 
 | 147 |             if [ "$IMAGE_NAME" = "$DEFAULT_IMAGE_NAME" ]; then | 
 | 148 |                 image_uuid="$IMAGE_UUID" | 
 | 149 |                 image_uuid_alt="$IMAGE_UUID" | 
 | 150 |             fi | 
 | 151 |             images+=($IMAGE_UUID) | 
| Swapnil Kulkarni | a747cd2 | 2015-05-13 09:26:15 +0000 | [diff] [blame] | 152 |         done < <(openstack image list --property status=active | awk -F'|' '!/^(+--)|ID|aki|ari/ { print $3,$2 }') | 
| Cody A.W. Somerville | c24e23b | 2012-12-21 02:10:45 -0500 | [diff] [blame] | 153 |  | 
| Attila Fazekas | c411fcf | 2014-08-19 16:48:14 +0200 | [diff] [blame] | 154 |         case "${#images[*]}" in | 
 | 155 |             0) | 
 | 156 |                 echo "Found no valid images to use!" | 
 | 157 |                 exit 1 | 
 | 158 |                 ;; | 
 | 159 |             1) | 
 | 160 |                 if [ -z "$image_uuid" ]; then | 
 | 161 |                     image_uuid=${images[0]} | 
 | 162 |                     image_uuid_alt=${images[0]} | 
 | 163 |                 fi | 
 | 164 |                 ;; | 
 | 165 |             *) | 
 | 166 |                 if [ -z "$image_uuid" ]; then | 
 | 167 |                     image_uuid=${images[0]} | 
 | 168 |                     image_uuid_alt=${images[1]} | 
 | 169 |                 fi | 
 | 170 |                 ;; | 
 | 171 |         esac | 
 | 172 |     fi | 
| Attila Fazekas | 2aa3517 | 2012-12-05 20:03:40 +0100 | [diff] [blame] | 173 |  | 
| Matthew Treinish | 93c1057 | 2015-07-31 10:38:50 -0400 | [diff] [blame] | 174 |     # (Re)create ``tempest.conf`` | 
 | 175 |     # Create every time because the image UUIDS are going to change | 
| Dean Troyer | 8421c2b | 2015-03-16 13:52:19 -0500 | [diff] [blame] | 176 |     sudo install -d -o $STACK_USER $TEMPEST_CONFIG_DIR | 
| Matthew Treinish | 93c1057 | 2015-07-31 10:38:50 -0400 | [diff] [blame] | 177 |     rm -f $TEMPEST_CONFIG | 
| Attila Fazekas | 2aa3517 | 2012-12-05 20:03:40 +0100 | [diff] [blame] | 178 |  | 
| Balagopal | 7ed812c | 2016-03-01 04:43:31 +0000 | [diff] [blame] | 179 |     local password=${ADMIN_PASSWORD:-secret} | 
| Attila Fazekas | 2aa3517 | 2012-12-05 20:03:40 +0100 | [diff] [blame] | 180 |  | 
| Dean Troyer | dc97cb7 | 2015-03-28 08:20:50 -0500 | [diff] [blame] | 181 |     # See ``lib/keystone`` where these users and tenants are set up | 
| Sean Dague | 0f76535 | 2016-02-18 06:53:08 -0500 | [diff] [blame] | 182 |     local admin_username=${ADMIN_USERNAME:-admin} | 
| Sean Dague | 76392b5 | 2016-04-04 09:07:08 -0400 | [diff] [blame] | 183 |     local admin_project_name=${ADMIN_TENANT_NAME:-admin} | 
| Sean Dague | 0f76535 | 2016-02-18 06:53:08 -0500 | [diff] [blame] | 184 |     local admin_domain_name=${ADMIN_DOMAIN_NAME:-Default} | 
| Sean Dague | 0f76535 | 2016-02-18 06:53:08 -0500 | [diff] [blame] | 185 |     local alt_username=${ALT_USERNAME:-alt_demo} | 
| Sean Dague | 76392b5 | 2016-04-04 09:07:08 -0400 | [diff] [blame] | 186 |     local alt_project_name=${ALT_TENANT_NAME:-alt_demo} | 
 | 187 |     local admin_project_id | 
 | 188 |     admin_project_id=$(openstack project list | awk "/ admin / { print \$2 }") | 
| Attila Fazekas | 2aa3517 | 2012-12-05 20:03:40 +0100 | [diff] [blame] | 189 |  | 
| Attila Fazekas | c411fcf | 2014-08-19 16:48:14 +0200 | [diff] [blame] | 190 |     if is_service_enabled nova; then | 
| Dean Troyer | dc97cb7 | 2015-03-28 08:20:50 -0500 | [diff] [blame] | 191 |         # If ``DEFAULT_INSTANCE_TYPE`` is not declared, use the new behavior | 
 | 192 |         # Tempest creates its own instance types | 
| Rafael Folco | 0b4c83a | 2015-11-26 10:08:36 -0600 | [diff] [blame] | 193 |         available_flavors=$(nova flavor-list) | 
| Attila Fazekas | c411fcf | 2014-08-19 16:48:14 +0200 | [diff] [blame] | 194 |         if  [[ -z "$DEFAULT_INSTANCE_TYPE" ]]; then | 
| Attila Fazekas | c411fcf | 2014-08-19 16:48:14 +0200 | [diff] [blame] | 195 |             if [[ ! ( $available_flavors =~ 'm1.nano' ) ]]; then | 
| Rafael Folco | f0131e1 | 2015-09-23 12:55:02 -0500 | [diff] [blame] | 196 |                 nova flavor-create m1.nano 42 64 0 1 | 
| Rafael Folco | ba0f1d3 | 2013-12-06 17:56:24 -0200 | [diff] [blame] | 197 |             fi | 
| Attila Fazekas | c411fcf | 2014-08-19 16:48:14 +0200 | [diff] [blame] | 198 |             flavor_ref=42 | 
| Attila Fazekas | c411fcf | 2014-08-19 16:48:14 +0200 | [diff] [blame] | 199 |             if [[ ! ( $available_flavors =~ 'm1.micro' ) ]]; then | 
| Rafael Folco | f0131e1 | 2015-09-23 12:55:02 -0500 | [diff] [blame] | 200 |                 nova flavor-create m1.micro 84 128 0 1 | 
| Rafael Folco | ba0f1d3 | 2013-12-06 17:56:24 -0200 | [diff] [blame] | 201 |             fi | 
| Attila Fazekas | c411fcf | 2014-08-19 16:48:14 +0200 | [diff] [blame] | 202 |             flavor_ref_alt=84 | 
 | 203 |         else | 
| Dean Troyer | dc97cb7 | 2015-03-28 08:20:50 -0500 | [diff] [blame] | 204 |             # 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] | 205 |             IFS=$'\r\n' | 
 | 206 |             flavors="" | 
| Rafael Folco | 0b4c83a | 2015-11-26 10:08:36 -0600 | [diff] [blame] | 207 |             for line in $available_flavors; do | 
| Attila Fazekas | c411fcf | 2014-08-19 16:48:14 +0200 | [diff] [blame] | 208 |                 f=$(echo $line | awk "/ $DEFAULT_INSTANCE_TYPE / { print \$2 }") | 
 | 209 |                 flavors="$flavors $f" | 
 | 210 |             done | 
| Attila Fazekas | 2aa3517 | 2012-12-05 20:03:40 +0100 | [diff] [blame] | 211 |  | 
| Rafael Folco | 0b4c83a | 2015-11-26 10:08:36 -0600 | [diff] [blame] | 212 |             for line in $available_flavors; do | 
| Attila Fazekas | c411fcf | 2014-08-19 16:48:14 +0200 | [diff] [blame] | 213 |                 flavors="$flavors `echo $line | grep -v "^\(|\s*ID\|+--\)" | cut -d' ' -f2`" | 
 | 214 |             done | 
| Attila Fazekas | 7bf1dd3 | 2013-01-12 17:31:26 +0100 | [diff] [blame] | 215 |  | 
| Attila Fazekas | c411fcf | 2014-08-19 16:48:14 +0200 | [diff] [blame] | 216 |             IFS=" " | 
 | 217 |             flavors=($flavors) | 
 | 218 |             num_flavors=${#flavors[*]} | 
 | 219 |             echo "Found $num_flavors flavors" | 
 | 220 |             if [[ $num_flavors -eq 0 ]]; then | 
 | 221 |                 echo "Found no valid flavors to use!" | 
 | 222 |                 exit 1 | 
| Adalberto Medeiros | 63a71a2 | 2013-06-06 08:46:04 -0400 | [diff] [blame] | 223 |             fi | 
| Attila Fazekas | c411fcf | 2014-08-19 16:48:14 +0200 | [diff] [blame] | 224 |             flavor_ref=${flavors[0]} | 
 | 225 |             flavor_ref_alt=$flavor_ref | 
 | 226 |  | 
| Dean Troyer | dc97cb7 | 2015-03-28 08:20:50 -0500 | [diff] [blame] | 227 |             # Ensure ``flavor_ref`` and ``flavor_ref_alt`` have different values. | 
 | 228 |             # Some resize instance in tempest tests depends on this. | 
| Attila Fazekas | c411fcf | 2014-08-19 16:48:14 +0200 | [diff] [blame] | 229 |             for f in ${flavors[@]:1}; do | 
 | 230 |                 if [[ $f -ne $flavor_ref ]]; then | 
 | 231 |                     flavor_ref_alt=$f | 
 | 232 |                     break | 
 | 233 |                 fi | 
 | 234 |             done | 
 | 235 |         fi | 
| Attila Fazekas | 2aa3517 | 2012-12-05 20:03:40 +0100 | [diff] [blame] | 236 |     fi | 
 | 237 |  | 
| Dan Smith | a2ec7fd | 2016-08-10 11:14:00 -0700 | [diff] [blame] | 238 |     iniset $TEMPEST_CONFIG network project_network_cidr $FIXED_RANGE | 
 | 239 |  | 
| Attila Fazekas | 386ae8c | 2013-10-21 09:27:18 +0200 | [diff] [blame] | 240 |     ssh_connect_method=${TEMPEST_SSH_CONNECT_METHOD:-$ssh_connect_method} | 
 | 241 |  | 
| Armando Migliaccio | 53f59d8 | 2016-05-17 15:12:24 -0700 | [diff] [blame] | 242 |     # the public network (for floating ip access) is only available | 
 | 243 |     # if the extension is enabled. | 
| Sean M. Collins | c35110e | 2016-05-18 10:38:51 -0400 | [diff] [blame] | 244 |     if is_networking_extension_supported 'external-net'; then | 
| Mark McClain | b05c876 | 2013-07-06 23:29:39 -0400 | [diff] [blame] | 245 |         public_network_id=$(neutron net-list | grep $PUBLIC_NETWORK_NAME | \ | 
| Maru Newby | a5c774e | 2012-12-10 10:40:01 +0000 | [diff] [blame] | 246 |             awk '{print $2}') | 
 | 247 |     fi | 
 | 248 |  | 
| Masayuki Igawa | 5a252d9 | 2014-11-21 21:55:09 +0900 | [diff] [blame] | 249 |     iniset $TEMPEST_CONFIG DEFAULT use_syslog $SYSLOG | 
| Dean Troyer | dc97cb7 | 2015-03-28 08:20:50 -0500 | [diff] [blame] | 250 |  | 
| Matthew Treinish | 859cc68 | 2013-07-26 15:22:44 -0400 | [diff] [blame] | 251 |     # Oslo | 
| Joe Gordon | 23d6d50 | 2015-03-06 15:24:22 -0800 | [diff] [blame] | 252 |     iniset $TEMPEST_CONFIG oslo_concurrency lock_path $TEMPEST_STATE_PATH | 
| Matthew Treinish | 14ccba0 | 2013-07-29 16:15:53 -0400 | [diff] [blame] | 253 |     mkdir -p $TEMPEST_STATE_PATH | 
| john-griffith | dc4dc7f | 2014-01-22 18:09:32 -0700 | [diff] [blame] | 254 |     iniset $TEMPEST_CONFIG DEFAULT use_stderr False | 
 | 255 |     iniset $TEMPEST_CONFIG DEFAULT log_file tempest.log | 
 | 256 |     iniset $TEMPEST_CONFIG DEFAULT debug True | 
| Matthew Treinish | 859cc68 | 2013-07-26 15:22:44 -0400 | [diff] [blame] | 257 |  | 
| Attila Fazekas | 2aa3517 | 2012-12-05 20:03:40 +0100 | [diff] [blame] | 258 |     # Timeouts | 
| john-griffith | dc4dc7f | 2014-01-22 18:09:32 -0700 | [diff] [blame] | 259 |     iniset $TEMPEST_CONFIG compute build_timeout $BUILD_TIMEOUT | 
 | 260 |     iniset $TEMPEST_CONFIG volume build_timeout $BUILD_TIMEOUT | 
| Attila Fazekas | 2aa3517 | 2012-12-05 20:03:40 +0100 | [diff] [blame] | 261 |  | 
| Attila Fazekas | 97d3d20 | 2013-01-19 19:20:49 +0100 | [diff] [blame] | 262 |     # Identity | 
| john-griffith | dc4dc7f | 2014-01-22 18:09:32 -0700 | [diff] [blame] | 263 |     iniset $TEMPEST_CONFIG identity uri "$KEYSTONE_SERVICE_PROTOCOL://$KEYSTONE_SERVICE_HOST:5000/v2.0/" | 
| Steve Martinelli | b74e01c | 2014-12-18 01:35:35 -0500 | [diff] [blame] | 264 |     iniset $TEMPEST_CONFIG identity uri_v3 "$KEYSTONE_SERVICE_URI_V3" | 
| Andrea Frittoli (andreaf) | 5cda491 | 2016-06-09 00:33:30 +0100 | [diff] [blame] | 265 |     # Use domain scoped tokens for admin v3 tests, v3 dynamic credentials of v3 account generation | 
 | 266 |     iniset $TEMPEST_CONFIG identity admin_domain_scope True | 
| Matthew Treinish | 7ced150 | 2015-03-23 15:51:54 -0400 | [diff] [blame] | 267 |     if [[ "$TEMPEST_HAS_ADMIN" == "True" ]]; then | 
| Sean Dague | 0f76535 | 2016-02-18 06:53:08 -0500 | [diff] [blame] | 268 |         iniset $TEMPEST_CONFIG auth admin_username $admin_username | 
| Matthew Treinish | fbe0a62 | 2015-12-10 19:36:50 -0500 | [diff] [blame] | 269 |         iniset $TEMPEST_CONFIG auth admin_password "$password" | 
| Sean Dague | 76392b5 | 2016-04-04 09:07:08 -0400 | [diff] [blame] | 270 |         iniset $TEMPEST_CONFIG auth admin_tenant_name $admin_project_name | 
 | 271 |         iniset $TEMPEST_CONFIG auth admin_tenant_id $admin_project_id | 
| Sean Dague | 0f76535 | 2016-02-18 06:53:08 -0500 | [diff] [blame] | 272 |         iniset $TEMPEST_CONFIG auth admin_domain_name $admin_domain_name | 
| Matthew Treinish | 7ced150 | 2015-03-23 15:51:54 -0400 | [diff] [blame] | 273 |     fi | 
| Samuel de Medeiros Queiroz | 3fd71d6 | 2015-05-03 14:54:45 -0300 | [diff] [blame] | 274 |     if [ "$ENABLE_IDENTITY_V2" == "False" ]; then | 
 | 275 |         # Only Identity v3 is available; then skip Identity API v2 tests | 
| Jamie Lennox | 75c1dfe | 2015-08-13 10:40:57 +1000 | [diff] [blame] | 276 |         iniset $TEMPEST_CONFIG identity-feature-enabled api_v2 False | 
| Samuel de Medeiros Queiroz | 3fd71d6 | 2015-05-03 14:54:45 -0300 | [diff] [blame] | 277 |         # In addition, use v3 auth tokens for running all Tempest tests | 
 | 278 |         iniset $TEMPEST_CONFIG identity auth_version v3 | 
 | 279 |     else | 
 | 280 |         iniset $TEMPEST_CONFIG identity auth_version ${TEMPEST_AUTH_VERSION:-v2} | 
 | 281 |     fi | 
 | 282 |  | 
| Rob Crittenden | e1d013f | 2015-02-10 14:15:35 -0500 | [diff] [blame] | 283 |     if is_ssl_enabled_service "key" || is_service_enabled tls-proxy; then | 
 | 284 |         iniset $TEMPEST_CONFIG identity ca_certificates_file $SSL_BUNDLE_FILE | 
 | 285 |     fi | 
| Attila Fazekas | 2aa3517 | 2012-12-05 20:03:40 +0100 | [diff] [blame] | 286 |  | 
| Rodrigo Duarte | 0578e42 | 2016-03-16 12:15:07 -0300 | [diff] [blame] | 287 |     # Identity Features | 
 | 288 |     # TODO(rodrigods): Remove the reseller flag when Kilo and Liberty are end of life. | 
 | 289 |     iniset $TEMPEST_CONFIG identity-feature-enabled reseller True | 
 | 290 |  | 
| Sean Dague | c377145 | 2013-06-13 14:23:37 -0400 | [diff] [blame] | 291 |     # Image | 
| Dean Troyer | dc97cb7 | 2015-03-28 08:20:50 -0500 | [diff] [blame] | 292 |     # We want to be able to override this variable in the gate to avoid | 
 | 293 |     # doing an external HTTP fetch for this test. | 
| Sean Dague | c377145 | 2013-06-13 14:23:37 -0400 | [diff] [blame] | 294 |     if [[ ! -z "$TEMPEST_HTTP_IMAGE" ]]; then | 
| john-griffith | dc4dc7f | 2014-01-22 18:09:32 -0700 | [diff] [blame] | 295 |         iniset $TEMPEST_CONFIG image http_image $TEMPEST_HTTP_IMAGE | 
| Sean Dague | c377145 | 2013-06-13 14:23:37 -0400 | [diff] [blame] | 296 |     fi | 
| Bob Ball | 2dd761b | 2016-01-15 13:56:37 +0000 | [diff] [blame] | 297 |     if [ "$VIRT_DRIVER" = "xenserver" ]; then | 
 | 298 |         iniset $TEMPEST_CONFIG image disk_formats "ami,ari,aki,vhd,raw,iso" | 
| Huan Xie | 36afed4 | 2016-06-06 20:17:48 -0700 | [diff] [blame] | 299 |         iniset $TEMPEST_CONFIG scenario img_disk_format vhd | 
| Bob Ball | 2dd761b | 2016-01-15 13:56:37 +0000 | [diff] [blame] | 300 |     fi | 
| Sean Dague | c377145 | 2013-06-13 14:23:37 -0400 | [diff] [blame] | 301 |  | 
| David Kranz | f100e1c | 2015-06-01 10:29:59 -0400 | [diff] [blame] | 302 |     # Image Features | 
 | 303 |     iniset $TEMPEST_CONFIG image-feature-enabled deactivate_image True | 
| Flavio Percoco | 22c695f | 2016-05-11 12:49:07 -0500 | [diff] [blame] | 304 |     if [ "$GLANCE_V1_ENABLED" != "True" ]; then | 
 | 305 |         iniset $TEMPEST_CONFIG image-feature-enabled api_v1 False | 
 | 306 |     fi | 
| David Kranz | f100e1c | 2015-06-01 10:29:59 -0400 | [diff] [blame] | 307 |  | 
| Attila Fazekas | 97d3d20 | 2013-01-19 19:20:49 +0100 | [diff] [blame] | 308 |     # Compute | 
| john-griffith | dc4dc7f | 2014-01-22 18:09:32 -0700 | [diff] [blame] | 309 |     iniset $TEMPEST_CONFIG compute ssh_user ${DEFAULT_INSTANCE_USER:-cirros} # DEPRECATED | 
| john-griffith | dc4dc7f | 2014-01-22 18:09:32 -0700 | [diff] [blame] | 310 |     iniset $TEMPEST_CONFIG compute image_ref $image_uuid | 
| john-griffith | dc4dc7f | 2014-01-22 18:09:32 -0700 | [diff] [blame] | 311 |     iniset $TEMPEST_CONFIG compute image_ref_alt $image_uuid_alt | 
| Kirill Shileev | 608f884 | 2014-10-03 22:48:58 +0400 | [diff] [blame] | 312 |     iniset $TEMPEST_CONFIG compute image_alt_ssh_user ${ALT_INSTANCE_USER:-cirros} | 
| john-griffith | dc4dc7f | 2014-01-22 18:09:32 -0700 | [diff] [blame] | 313 |     iniset $TEMPEST_CONFIG compute flavor_ref $flavor_ref | 
 | 314 |     iniset $TEMPEST_CONFIG compute flavor_ref_alt $flavor_ref_alt | 
| john-griffith | dc4dc7f | 2014-01-22 18:09:32 -0700 | [diff] [blame] | 315 |     iniset $TEMPEST_CONFIG compute ssh_connect_method $ssh_connect_method | 
| Sean Dague | 563a7e7 | 2015-12-15 17:16:19 -0500 | [diff] [blame] | 316 |     # set the equiv validation option here as well to ensure they are | 
 | 317 |     # in sync. They shouldn't be separate options. | 
 | 318 |     iniset $TEMPEST_CONFIG validation connect_method $ssh_connect_method | 
| Luigi Toscano | 4c813ac | 2016-09-21 19:39:36 +0200 | [diff] [blame] | 319 |     if ! is_service_enabled n-cell && ! is_service_enabled neutron; then | 
| melanie witt | f5b550e | 2015-04-10 22:20:07 +0000 | [diff] [blame] | 320 |         iniset $TEMPEST_CONFIG compute fixed_network_name $PRIVATE_NETWORK_NAME | 
 | 321 |     fi | 
| Attila Fazekas | 97d3d20 | 2013-01-19 19:20:49 +0100 | [diff] [blame] | 322 |  | 
| Sean Dague | 8349aff | 2015-09-01 12:45:28 -0400 | [diff] [blame] | 323 |     # Set the service catalog entry for Tempest to run on. Typically | 
 | 324 |     # used to try different compute API version targets. The tempest | 
 | 325 |     # default if 'compute', which is typically valid, so only set this | 
 | 326 |     # if you want to change it. | 
 | 327 |     if [[ -n "$TEMPEST_COMPUTE_TYPE" ]]; then | 
 | 328 |         iniset $TEMPEST_CONFIG compute catalog_type $TEMPEST_COMPUTE_TYPE | 
 | 329 |     fi | 
 | 330 |  | 
| Sean Dague | de19bf9 | 2014-03-20 16:54:58 -0400 | [diff] [blame] | 331 |     # Compute Features | 
| ghanshyam | 642b07b | 2015-11-19 10:01:14 +0900 | [diff] [blame] | 332 |     # Set the microversion range for compute tests. | 
 | 333 |     # This is used to run the Nova microversions tests. | 
 | 334 |     # Setting [None, latest] range of microversion which allow Tempest to run all microversions tests. | 
 | 335 |     # NOTE- To avoid microversion tests failure on stable branch, we need to change "tempest_compute_max_microversion" | 
 | 336 |     #       for stable branch on each release which should be changed from "latest" to max supported version of that release. | 
 | 337 |     local tempest_compute_min_microversion=${TEMPEST_COMPUTE_MIN_MICROVERSION:-None} | 
 | 338 |     local tempest_compute_max_microversion=${TEMPEST_COMPUTE_MAX_MICROVERSION:-"latest"} | 
 | 339 |     # Reset microversions to None where v2.0 is running which does not support microversion. | 
 | 340 |     # Both "None" means no microversion testing. | 
 | 341 |     if [[ "$TEMPEST_COMPUTE_TYPE" == "compute_legacy" ]]; then | 
 | 342 |         tempest_compute_min_microversion=None | 
 | 343 |         tempest_compute_max_microversion=None | 
 | 344 |     fi | 
 | 345 |     if [ "$tempest_compute_min_microversion" == "None" ]; then | 
| Jordan Pittier | f5a50a0 | 2016-05-10 14:56:12 +0200 | [diff] [blame] | 346 |         inicomment $TEMPEST_CONFIG compute min_microversion | 
| ghanshyam | 642b07b | 2015-11-19 10:01:14 +0900 | [diff] [blame] | 347 |     else | 
| Jordan Pittier | f5a50a0 | 2016-05-10 14:56:12 +0200 | [diff] [blame] | 348 |         iniset $TEMPEST_CONFIG compute min_microversion $tempest_compute_min_microversion | 
| ghanshyam | 642b07b | 2015-11-19 10:01:14 +0900 | [diff] [blame] | 349 |     fi | 
 | 350 |     if [ "$tempest_compute_max_microversion" == "None" ]; then | 
| Jordan Pittier | f5a50a0 | 2016-05-10 14:56:12 +0200 | [diff] [blame] | 351 |         inicomment $TEMPEST_CONFIG compute max_microversion | 
| ghanshyam | 642b07b | 2015-11-19 10:01:14 +0900 | [diff] [blame] | 352 |     else | 
| Jordan Pittier | f5a50a0 | 2016-05-10 14:56:12 +0200 | [diff] [blame] | 353 |         iniset $TEMPEST_CONFIG compute max_microversion $tempest_compute_max_microversion | 
| ghanshyam | 642b07b | 2015-11-19 10:01:14 +0900 | [diff] [blame] | 354 |     fi | 
 | 355 |  | 
| Matt Riedemann | 5068b29 | 2016-08-09 14:52:57 -0400 | [diff] [blame] | 356 |     # TODO(mriedem): Remove allow_port_security_disabled after liberty-eol. | 
 | 357 |     iniset $TEMPEST_CONFIG compute-feature-enabled allow_port_security_disabled True | 
| Matt Riedemann | 6d3670a | 2016-07-03 19:40:25 -0400 | [diff] [blame] | 358 |     iniset $TEMPEST_CONFIG compute-feature-enabled personality ${ENABLE_FILE_INJECTION:-False} | 
| Sean Dague | de19bf9 | 2014-03-20 16:54:58 -0400 | [diff] [blame] | 359 |     iniset $TEMPEST_CONFIG compute-feature-enabled resize True | 
| Matthew Treinish | 270f93e | 2014-03-20 21:18:42 +0000 | [diff] [blame] | 360 |     iniset $TEMPEST_CONFIG compute-feature-enabled live_migration ${LIVE_MIGRATION_AVAILABLE:-False} | 
 | 361 |     iniset $TEMPEST_CONFIG compute-feature-enabled change_password False | 
 | 362 |     iniset $TEMPEST_CONFIG compute-feature-enabled block_migration_for_live_migration ${USE_BLOCK_MIGRATION_FOR_LIVE_MIGRATION:-False} | 
| Matt Riedemann | e57a332 | 2015-06-20 14:48:00 -0700 | [diff] [blame] | 363 |     iniset $TEMPEST_CONFIG compute-feature-enabled attach_encrypted_volume ${ATTACH_ENCRYPTED_VOLUME_AVAILABLE:-True} | 
| Chuck Carmack | 09b431d | 2015-09-02 14:27:58 +0000 | [diff] [blame] | 364 |     if is_service_enabled n-cell; then | 
 | 365 |         # Cells doesn't support shelving/unshelving | 
 | 366 |         iniset $TEMPEST_CONFIG compute-feature-enabled shelve False | 
| Matt Riedemann | c94403d | 2015-10-15 12:51:13 -0700 | [diff] [blame] | 367 |         # Cells doesn't support hot-plugging virtual interfaces. | 
 | 368 |         iniset $TEMPEST_CONFIG compute-feature-enabled interface_attach False | 
| Matt Riedemann | 2bebf2d | 2016-04-05 10:34:42 -0400 | [diff] [blame] | 369 |         # Cells v1 doesn't support the rescue/unrescue tests in Tempest | 
 | 370 |         iniset $TEMPEST_CONFIG compute-feature-enabled rescue False | 
| Matt Riedemann | 6cd616a | 2015-11-06 10:26:14 -0800 | [diff] [blame] | 371 |  | 
 | 372 |         if  [[ -z "$DEFAULT_INSTANCE_TYPE" ]]; then | 
 | 373 |             # Cells supports resize but does not currently work with devstack | 
 | 374 |             # because of the custom flavors created for Tempest runs which are | 
 | 375 |             # not in the cells database. | 
 | 376 |             # TODO(mriedem): work on adding a nova-manage command to sync | 
 | 377 |             # flavors into the cells database. | 
 | 378 |             iniset $TEMPEST_CONFIG compute-feature-enabled resize False | 
 | 379 |         fi | 
| Chuck Carmack | 09b431d | 2015-09-02 14:27:58 +0000 | [diff] [blame] | 380 |     fi | 
| Sean Dague | de19bf9 | 2014-03-20 16:54:58 -0400 | [diff] [blame] | 381 |  | 
| Marian Horban | ea21eb4 | 2015-08-18 06:57:18 -0400 | [diff] [blame] | 382 |     # Network | 
| john-griffith | dc4dc7f | 2014-01-22 18:09:32 -0700 | [diff] [blame] | 383 |     iniset $TEMPEST_CONFIG network api_version 2.0 | 
| Jordan Pittier | f5a50a0 | 2016-05-10 14:56:12 +0200 | [diff] [blame] | 384 |     iniset $TEMPEST_CONFIG network project_networks_reachable false | 
| john-griffith | dc4dc7f | 2014-01-22 18:09:32 -0700 | [diff] [blame] | 385 |     iniset $TEMPEST_CONFIG network public_network_id "$public_network_id" | 
 | 386 |     iniset $TEMPEST_CONFIG network public_router_id "$public_router_id" | 
 | 387 |     iniset $TEMPEST_CONFIG network default_network "$FIXED_RANGE" | 
| Matthew Treinish | ccf60f7 | 2014-03-03 22:48:31 -0500 | [diff] [blame] | 388 |     iniset $TEMPEST_CONFIG network-feature-enabled ipv6 "$IPV6_ENABLED" | 
| Sean M. Collins | bb2908b | 2014-05-15 10:24:31 -0400 | [diff] [blame] | 389 |     iniset $TEMPEST_CONFIG network-feature-enabled ipv6_subnet_attributes "$IPV6_SUBNET_ATTRIBUTES_ENABLED" | 
| Salvatore | 33e8ee2 | 2014-10-05 01:36:34 +0200 | [diff] [blame] | 390 |  | 
| Sean Dague | 669c4fc | 2014-04-03 11:28:01 -0400 | [diff] [blame] | 391 |     # Orchestration Tests | 
 | 392 |     if is_service_enabled heat; then | 
| Rabi Mishra | 9556093 | 2016-02-01 13:20:18 +0530 | [diff] [blame] | 393 |         # Though this is not needed by heat, some tempest tests explicitly | 
 | 394 |         # try to set this role. Removing them from the tempest tests breaks | 
 | 395 |         # some non-devstack CIs. | 
 | 396 |         get_or_create_role "heat_stack_owner" | 
 | 397 |  | 
| Sean Dague | 669c4fc | 2014-04-03 11:28:01 -0400 | [diff] [blame] | 398 |         if [[ ! -z "$HEAT_CFN_IMAGE_URL" ]]; then | 
| Alessandro Pilotti | f3e75bf | 2014-12-15 20:02:08 +0200 | [diff] [blame] | 399 |             iniset $TEMPEST_CONFIG orchestration image_ref $(basename "${HEAT_CFN_IMAGE_URL%.*}") | 
| Sean Dague | 669c4fc | 2014-04-03 11:28:01 -0400 | [diff] [blame] | 400 |         fi | 
| Mathieu Rohon | 0c985c8 | 2016-02-25 10:00:36 +0000 | [diff] [blame] | 401 |         # Nova might not be enabled, especially when we want to test tempest scenario/API that only create Neutron resources | 
 | 402 |         if is_service_enabled nova; then | 
 | 403 |             # build a specialized heat flavor | 
 | 404 |             available_flavors=$(nova flavor-list) | 
 | 405 |             if [[ ! ( $available_flavors =~ 'm1.heat' ) ]]; then | 
 | 406 |                 nova flavor-create m1.heat 451 512 0 1 | 
 | 407 |             fi | 
 | 408 |             iniset $TEMPEST_CONFIG orchestration instance_type "m1.heat" | 
| Sean Dague | 669c4fc | 2014-04-03 11:28:01 -0400 | [diff] [blame] | 409 |         fi | 
| Sean Dague | 669c4fc | 2014-04-03 11:28:01 -0400 | [diff] [blame] | 410 |         iniset $TEMPEST_CONFIG orchestration build_timeout 900 | 
| Rabi Mishra | 9556093 | 2016-02-01 13:20:18 +0530 | [diff] [blame] | 411 |         iniset $TEMPEST_CONFIG orchestration stack_owner_role "heat_stack_owner" | 
| Steve Baker | d5cccad | 2013-07-19 10:34:24 +1200 | [diff] [blame] | 412 |     fi | 
 | 413 |  | 
| William Marshall | 24d866e | 2013-07-02 12:26:31 -0500 | [diff] [blame] | 414 |     # Scenario | 
| Matthew Treinish | d2cb234 | 2015-04-02 11:08:24 -0400 | [diff] [blame] | 415 |     SCENARIO_IMAGE_DIR=${SCENARIO_IMAGE_DIR:-$FILES/images/cirros-${CIRROS_VERSION}-${CIRROS_ARCH}-uec} | 
 | 416 |     iniset $TEMPEST_CONFIG scenario img_dir $SCENARIO_IMAGE_DIR | 
| Adalberto Medeiros | 5397153 | 2014-07-10 16:55:49 -0300 | [diff] [blame] | 417 |     iniset $TEMPEST_CONFIG scenario ami_img_file "cirros-${CIRROS_VERSION}-${CIRROS_ARCH}-blank.img" | 
 | 418 |     iniset $TEMPEST_CONFIG scenario ari_img_file "cirros-${CIRROS_VERSION}-${CIRROS_ARCH}-initrd" | 
 | 419 |     iniset $TEMPEST_CONFIG scenario aki_img_file "cirros-${CIRROS_VERSION}-${CIRROS_ARCH}-vmlinuz" | 
| Matthew Treinish | d2cb234 | 2015-04-02 11:08:24 -0400 | [diff] [blame] | 420 |     iniset $TEMPEST_CONFIG scenario img_file "cirros-${CIRROS_VERSION}-${CIRROS_ARCH}-disk.img" | 
| William Marshall | 24d866e | 2013-07-02 12:26:31 -0500 | [diff] [blame] | 421 |  | 
| Vadim Rovachev | 2541d61 | 2014-05-29 18:48:10 +0400 | [diff] [blame] | 422 |     # Telemetry | 
| gordon chung | 71e4e6f | 2015-03-16 16:33:01 -0400 | [diff] [blame] | 423 |     iniset $TEMPEST_CONFIG telemetry-feature-enabled events "True" | 
| Vadim Rovachev | 2541d61 | 2014-05-29 18:48:10 +0400 | [diff] [blame] | 424 |  | 
| lanoux | 994db61 | 2015-08-03 13:48:12 +0000 | [diff] [blame] | 425 |     # Validation | 
 | 426 |     iniset $TEMPEST_CONFIG validation run_validation ${TEMPEST_RUN_VALIDATION:-False} | 
| Matthew Treinish | fbe0a62 | 2015-12-10 19:36:50 -0500 | [diff] [blame] | 427 |     iniset $TEMPEST_CONFIG validation ip_version_for_ssh 4 | 
 | 428 |     iniset $TEMPEST_CONFIG validation ssh_timeout $BUILD_TIMEOUT | 
 | 429 |     iniset $TEMPEST_CONFIG validation image_ssh_user ${DEFAULT_INSTANCE_USER:-cirros} | 
 | 430 |     iniset $TEMPEST_CONFIG validation network_for_ssh $PRIVATE_NETWORK_NAME | 
| lanoux | 994db61 | 2015-08-03 13:48:12 +0000 | [diff] [blame] | 431 |  | 
| Giulio Fidente | 97e1bd0 | 2013-06-04 05:33:52 +0200 | [diff] [blame] | 432 |     # Volume | 
| Oleksii Butenko | 881373c | 2016-06-21 17:29:54 +0300 | [diff] [blame] | 433 |     # TODO(obutenko): Remove snapshot_backup when liberty-eol happens. | 
 | 434 |     iniset $TEMPEST_CONFIG volume-feature-enabled snapshot_backup True | 
| Yuriy Nesenenko | af8b6e1 | 2016-01-06 17:14:45 +0200 | [diff] [blame] | 435 |     # TODO(ynesenenko): Remove the volume_services flag when Liberty and Kilo will correct work with host info. | 
 | 436 |     iniset $TEMPEST_CONFIG volume-feature-enabled volume_services True | 
| Alex Meade | 06c7a44 | 2016-04-01 13:18:32 -0400 | [diff] [blame] | 437 |     # TODO(ameade): Remove the api_v3 flag when Mitaka and Liberty are end of life. | 
 | 438 |     iniset $TEMPEST_CONFIG volume-feature-enabled api_v3 True | 
| Alex Meade | 0c0c09a | 2016-05-13 10:57:29 -0400 | [diff] [blame] | 439 |     local tempest_volume_min_microversion=${TEMPEST_VOLUME_MIN_MICROVERSION:-None} | 
 | 440 |     local tempest_volume_max_microversion=${TEMPEST_VOLUME_MAX_MICROVERSION:-"latest"} | 
 | 441 |     if [ "$tempest_volume_min_microversion" == "None" ]; then | 
 | 442 |         inicomment $TEMPEST_CONFIG volume min_microversion | 
 | 443 |     else | 
 | 444 |         iniset $TEMPEST_CONFIG volume min_microversion $tempest_volume_min_microversion | 
 | 445 |     fi | 
 | 446 |  | 
 | 447 |     if [ "$tempest_volume_max_microversion" == "None" ]; then | 
 | 448 |         inicomment $TEMPEST_CONFIG volume max_microversion | 
 | 449 |     else | 
 | 450 |         iniset $TEMPEST_CONFIG volume max_microversion $tempest_volume_max_microversion | 
 | 451 |     fi | 
| David Kranz | d1d6667 | 2015-06-11 13:09:37 -0400 | [diff] [blame] | 452 |  | 
| Giulio Fidente | 3d60f4d | 2014-02-20 16:43:49 +0100 | [diff] [blame] | 453 |     if ! is_service_enabled c-bak; then | 
 | 454 |         iniset $TEMPEST_CONFIG volume-feature-enabled backup False | 
| Giulio Fidente | 3632ab1 | 2013-09-10 02:51:26 +0200 | [diff] [blame] | 455 |     fi | 
| Swapnil Kulkarni | 09fb7ba | 2014-10-16 06:30:28 +0000 | [diff] [blame] | 456 |  | 
| Dean Troyer | dc97cb7 | 2015-03-28 08:20:50 -0500 | [diff] [blame] | 457 |     # Using ``CINDER_ENABLED_BACKENDS`` | 
| bkopilov | 3ac1ea8 | 2016-06-06 16:00:48 +0300 | [diff] [blame] | 458 |     # Cinder uses a comma separated list with "type:backend_name": | 
 | 459 |     #  CINDER_ENABLED_BACKENDS = ceph:cephBE1,lvm:lvmBE2,foo:my_foo | 
| Swapnil Kulkarni | 09fb7ba | 2014-10-16 06:30:28 +0000 | [diff] [blame] | 460 |     if [[ -n "$CINDER_ENABLED_BACKENDS" ]] && [[ $CINDER_ENABLED_BACKENDS =~ .*,.* ]]; then | 
| bkopilov | 3ac1ea8 | 2016-06-06 16:00:48 +0300 | [diff] [blame] | 461 |         # We have at least 2 backends | 
| Matthew Treinish | db1c384 | 2014-02-04 20:58:00 +0000 | [diff] [blame] | 462 |         iniset $TEMPEST_CONFIG volume-feature-enabled multi_backend "True" | 
| bkopilov | 3ac1ea8 | 2016-06-06 16:00:48 +0300 | [diff] [blame] | 463 |         local add_comma_seperator=0 | 
 | 464 |         local backends_list='' | 
| Swapnil Kulkarni | 09fb7ba | 2014-10-16 06:30:28 +0000 | [diff] [blame] | 465 |         local be | 
| bkopilov | 3ac1ea8 | 2016-06-06 16:00:48 +0300 | [diff] [blame] | 466 |         # Tempest uses a comma separated list of backend_names: | 
 | 467 |         #   backend_names = BACKEND_1,BACKEND_2 | 
| Swapnil Kulkarni | 09fb7ba | 2014-10-16 06:30:28 +0000 | [diff] [blame] | 468 |         for be in ${CINDER_ENABLED_BACKENDS//,/ }; do | 
| bkopilov | 3ac1ea8 | 2016-06-06 16:00:48 +0300 | [diff] [blame] | 469 |             if [ "$add_comma_seperator" -eq "1" ]; then | 
 | 470 |                 backends_list+=,${be##*:} | 
 | 471 |             else | 
 | 472 |             # first element in the list | 
 | 473 |                 backends_list+=${be##*:} | 
 | 474 |                 add_comma_seperator=1 | 
 | 475 |             fi | 
| Swapnil Kulkarni | 09fb7ba | 2014-10-16 06:30:28 +0000 | [diff] [blame] | 476 |         done | 
| bkopilov | 3ac1ea8 | 2016-06-06 16:00:48 +0300 | [diff] [blame] | 477 |         iniset $TEMPEST_CONFIG volume "backend_names" "$backends_list" | 
| john-griffith | dc4dc7f | 2014-01-22 18:09:32 -0700 | [diff] [blame] | 478 |     fi | 
 | 479 |  | 
| Eric Harney | 0145648 | 2014-10-14 18:53:53 -0400 | [diff] [blame] | 480 |     if [ $TEMPEST_VOLUME_DRIVER != "default" -o \ | 
| Patrick East | 1c0628f | 2014-10-22 16:22:47 -0700 | [diff] [blame] | 481 |         "$TEMPEST_VOLUME_VENDOR" != "$TEMPEST_DEFAULT_VOLUME_VENDOR" ]; then | 
| Ed Balduf | 2f23d75 | 2014-07-29 14:42:27 -0600 | [diff] [blame] | 482 |         iniset $TEMPEST_CONFIG volume vendor_name "$TEMPEST_VOLUME_VENDOR" | 
| Eric Harney | 0145648 | 2014-10-14 18:53:53 -0400 | [diff] [blame] | 483 |     fi | 
 | 484 |     if [ $TEMPEST_VOLUME_DRIVER != "default" -o \ | 
| JordanP | 82a7d93 | 2014-12-04 14:09:16 +0100 | [diff] [blame] | 485 |         "$TEMPEST_STORAGE_PROTOCOL" != "$TEMPEST_DEFAULT_STORAGE_PROTOCOL" ]; then | 
 | 486 |         iniset $TEMPEST_CONFIG volume storage_protocol "$TEMPEST_STORAGE_PROTOCOL" | 
| Giulio Fidente | 97e1bd0 | 2013-06-04 05:33:52 +0200 | [diff] [blame] | 487 |     fi | 
 | 488 |  | 
| Julie Pichon | fea70f8 | 2013-07-29 11:22:08 +0100 | [diff] [blame] | 489 |     # Dashboard | 
| john-griffith | dc4dc7f | 2014-01-22 18:09:32 -0700 | [diff] [blame] | 490 |     iniset $TEMPEST_CONFIG dashboard dashboard_url "http://$SERVICE_HOST/" | 
| Julie Pichon | fea70f8 | 2013-07-29 11:22:08 +0100 | [diff] [blame] | 491 |  | 
| Dean Troyer | dc97cb7 | 2015-03-28 08:20:50 -0500 | [diff] [blame] | 492 |     # CLI | 
| john-griffith | dc4dc7f | 2014-01-22 18:09:32 -0700 | [diff] [blame] | 493 |     iniset $TEMPEST_CONFIG cli cli_dir $NOVA_BIN_DIR | 
| Ian Wienand | 7fa1902 | 2013-06-25 14:11:48 +1000 | [diff] [blame] | 494 |  | 
| Adam Gandelman | 43bd667 | 2014-04-03 11:13:13 -0700 | [diff] [blame] | 495 |     # Baremetal | 
 | 496 |     if [ "$VIRT_DRIVER" = "ironic" ] ; then | 
 | 497 |         iniset $TEMPEST_CONFIG baremetal driver_enabled True | 
| Michael Turek | d091a2d | 2016-01-11 18:17:50 +0000 | [diff] [blame] | 498 |         iniset $TEMPEST_CONFIG baremetal unprovision_timeout $BUILD_TIMEOUT | 
 | 499 |         iniset $TEMPEST_CONFIG baremetal active_timeout $BUILD_TIMEOUT | 
| Mike Turek | f90c8e1 | 2016-01-19 19:28:51 +0000 | [diff] [blame] | 500 |         iniset $TEMPEST_CONFIG baremetal deploywait_timeout $BUILD_TIMEOUT | 
| Vladyslav Drok | 4130900 | 2015-04-29 13:36:52 +0300 | [diff] [blame] | 501 |         iniset $TEMPEST_CONFIG baremetal deploy_img_dir $FILES | 
 | 502 |         iniset $TEMPEST_CONFIG baremetal node_uuid $IRONIC_NODE_UUID | 
| Adam Gandelman | fdfe7a0 | 2014-07-24 10:06:18 -0400 | [diff] [blame] | 503 |         iniset $TEMPEST_CONFIG compute-feature-enabled change_password False | 
 | 504 |         iniset $TEMPEST_CONFIG compute-feature-enabled console_output False | 
 | 505 |         iniset $TEMPEST_CONFIG compute-feature-enabled interface_attach False | 
 | 506 |         iniset $TEMPEST_CONFIG compute-feature-enabled live_migration False | 
 | 507 |         iniset $TEMPEST_CONFIG compute-feature-enabled pause False | 
 | 508 |         iniset $TEMPEST_CONFIG compute-feature-enabled rescue False | 
 | 509 |         iniset $TEMPEST_CONFIG compute-feature-enabled resize False | 
 | 510 |         iniset $TEMPEST_CONFIG compute-feature-enabled shelve False | 
 | 511 |         iniset $TEMPEST_CONFIG compute-feature-enabled snapshot False | 
| David Shrewsbury | cf21b71 | 2014-08-13 07:03:58 -0400 | [diff] [blame] | 512 |         iniset $TEMPEST_CONFIG compute-feature-enabled suspend False | 
| Adam Gandelman | 43bd667 | 2014-04-03 11:13:13 -0700 | [diff] [blame] | 513 |     fi | 
 | 514 |  | 
| Nels Nelson | 7b47c47 | 2015-01-05 16:36:42 -0600 | [diff] [blame] | 515 |     # Libvirt-LXC | 
 | 516 |     if [ "$VIRT_DRIVER" = "libvirt" ] && [ "$LIBVIRT_TYPE" = "lxc" ]; then | 
 | 517 |         iniset $TEMPEST_CONFIG compute-feature-enabled rescue False | 
 | 518 |         iniset $TEMPEST_CONFIG compute-feature-enabled resize False | 
| Matt Riedemann | cf94edc | 2015-10-28 09:50:01 -0700 | [diff] [blame] | 519 |         iniset $TEMPEST_CONFIG compute-feature-enabled shelve False | 
 | 520 |         iniset $TEMPEST_CONFIG compute-feature-enabled snapshot False | 
| Nels Nelson | 7b47c47 | 2015-01-05 16:36:42 -0600 | [diff] [blame] | 521 |         iniset $TEMPEST_CONFIG compute-feature-enabled suspend False | 
 | 522 |     fi | 
 | 523 |  | 
| Dean Troyer | dc97cb7 | 2015-03-28 08:20:50 -0500 | [diff] [blame] | 524 |     # ``service_available`` | 
| Sean Dague | 346edcc | 2015-08-26 09:38:37 -0400 | [diff] [blame] | 525 |     # | 
 | 526 |     # this tempest service list needs to be all the services that | 
 | 527 |     # tempest supports, otherwise we can have an erroneous set of | 
 | 528 |     # defaults (something defaulting true in Tempest, but not listed here). | 
| Sean Dague | 0f76535 | 2016-02-18 06:53:08 -0500 | [diff] [blame] | 529 |     local service | 
 | 530 |     local tempest_services="key,glance,nova,neutron,cinder,swift,heat,ceilometer,horizon,sahara,ironic,trove" | 
 | 531 |     for service in ${tempest_services//,/ }; do | 
| Matthew Treinish | b56d81d | 2013-07-23 17:25:39 -0400 | [diff] [blame] | 532 |         if is_service_enabled $service ; then | 
| john-griffith | dc4dc7f | 2014-01-22 18:09:32 -0700 | [diff] [blame] | 533 |             iniset $TEMPEST_CONFIG service_available $service "True" | 
| Matthew Treinish | b56d81d | 2013-07-23 17:25:39 -0400 | [diff] [blame] | 534 |         else | 
| john-griffith | dc4dc7f | 2014-01-22 18:09:32 -0700 | [diff] [blame] | 535 |             iniset $TEMPEST_CONFIG service_available $service "False" | 
| Matthew Treinish | b56d81d | 2013-07-23 17:25:39 -0400 | [diff] [blame] | 536 |         fi | 
 | 537 |     done | 
 | 538 |  | 
| Matt Riedemann | cf94edc | 2015-10-28 09:50:01 -0700 | [diff] [blame] | 539 |     if [ "$VIRT_DRIVER" = "libvirt" ] && [ "$LIBVIRT_TYPE" = "lxc" ]; then | 
 | 540 |         # libvirt-lxc does not support boot from volume or attaching volumes | 
 | 541 |         # so basically anything with cinder is out of the question. | 
 | 542 |         iniset $TEMPEST_CONFIG service_available cinder "False" | 
 | 543 |     fi | 
 | 544 |  | 
| Matthew Treinish | e8f3f7a | 2016-04-11 12:52:39 -0400 | [diff] [blame] | 545 |     # Run tempest configuration utilities. This must be done last during configuration to | 
 | 546 |     # ensure as complete a config as possible already exists | 
 | 547 |  | 
 | 548 |     # NOTE(mtreinish): Respect constraints on tempest verify-config venv | 
 | 549 |     local tmp_cfg_file | 
 | 550 |     tmp_cfg_file=$(mktemp) | 
 | 551 |     cd $TEMPEST_DIR | 
 | 552 |     if [[ "$OFFLINE" != "True" ]]; then | 
| Matthew Treinish | 440464c | 2016-05-04 11:55:12 -0400 | [diff] [blame] | 553 |         tox -revenv-tempest --notest | 
| Matthew Treinish | e8f3f7a | 2016-04-11 12:52:39 -0400 | [diff] [blame] | 554 |     fi | 
| Matthew Treinish | 440464c | 2016-05-04 11:55:12 -0400 | [diff] [blame] | 555 |     tox -evenv-tempest -- pip install -c $REQUIREMENTS_DIR/upper-constraints.txt -r requirements.txt | 
| Matthew Treinish | e8f3f7a | 2016-04-11 12:52:39 -0400 | [diff] [blame] | 556 |  | 
 | 557 |     # Auth: | 
 | 558 |     iniset $TEMPEST_CONFIG auth tempest_roles "Member" | 
 | 559 |     if [[ $TEMPEST_USE_TEST_ACCOUNTS == "True" ]]; then | 
 | 560 |         if [[ $TEMPEST_HAS_ADMIN == "True" ]]; then | 
| Matthew Treinish | 440464c | 2016-05-04 11:55:12 -0400 | [diff] [blame] | 561 |             tox -evenv-tempest -- tempest-account-generator -c $TEMPEST_CONFIG --os-username $admin_username --os-password "$password" --os-tenant-name $admin_project_name -r $TEMPEST_CONCURRENCY --with-admin etc/accounts.yaml | 
| Matthew Treinish | e8f3f7a | 2016-04-11 12:52:39 -0400 | [diff] [blame] | 562 |         else | 
| Matthew Treinish | 440464c | 2016-05-04 11:55:12 -0400 | [diff] [blame] | 563 |             tox -evenv-tempest -- tempest-account-generator -c $TEMPEST_CONFIG --os-username $admin_username --os-password "$password" --os-tenant-name $admin_project_name -r $TEMPEST_CONCURRENCY etc/accounts.yaml | 
| Matthew Treinish | e8f3f7a | 2016-04-11 12:52:39 -0400 | [diff] [blame] | 564 |         fi | 
 | 565 |         iniset $TEMPEST_CONFIG auth use_dynamic_credentials False | 
 | 566 |         iniset $TEMPEST_CONFIG auth test_accounts_file "etc/accounts.yaml" | 
 | 567 |     elif [[ $TEMPEST_HAS_ADMIN == "False" ]]; then | 
 | 568 |         iniset $TEMPEST_CONFIG auth use_dynamic_credentials ${TEMPEST_ALLOW_TENANT_ISOLATION:-False} | 
 | 569 |  | 
 | 570 |     else | 
 | 571 |         iniset $TEMPEST_CONFIG auth use_dynamic_credentials ${TEMPEST_ALLOW_TENANT_ISOLATION:-True} | 
 | 572 |     fi | 
 | 573 |  | 
 | 574 |     # API Extensions | 
 | 575 |     # Run ``verify_tempest_config -ur`` to retrieve enabled extensions on API endpoints | 
 | 576 |     # NOTE(mtreinish): This must be done after auth settings are added to the tempest config | 
 | 577 |     tox -evenv -- tempest verify-config -uro $tmp_cfg_file | 
| Sean Dague | 7b22935 | 2016-08-09 13:29:11 -0400 | [diff] [blame] | 578 |  | 
| Matthew Treinish | e8f3f7a | 2016-04-11 12:52:39 -0400 | [diff] [blame] | 579 |     # Neutron API Extensions | 
| Sean Dague | 894ccc9 | 2016-08-08 16:19:05 -0400 | [diff] [blame] | 580 |  | 
 | 581 |     # disable metering if we didn't enable the service | 
 | 582 |     if ! is_service_enabled q-metering; then | 
 | 583 |         DISABLE_NETWORK_API_EXTENSIONS+=", metering" | 
 | 584 |     fi | 
 | 585 |  | 
| Matthew Treinish | e8f3f7a | 2016-04-11 12:52:39 -0400 | [diff] [blame] | 586 |     local network_api_extensions=${NETWORK_API_EXTENSIONS:-"all"} | 
 | 587 |     if [[ ! -z "$DISABLE_NETWORK_API_EXTENSIONS" ]]; then | 
 | 588 |         # Enabled extensions are either the ones explicitly specified or those available on the API endpoint | 
 | 589 |         network_api_extensions=${NETWORK_API_EXTENSIONS:-$(iniget $tmp_cfg_file network-feature-enabled api_extensions | tr -d " ")} | 
 | 590 |         # Remove disabled extensions | 
 | 591 |         network_api_extensions=$(remove_disabled_extensions $network_api_extensions $DISABLE_NETWORK_API_EXTENSIONS) | 
 | 592 |     fi | 
 | 593 |     iniset $TEMPEST_CONFIG network-feature-enabled api_extensions $network_api_extensions | 
 | 594 |     # Swift API Extensions | 
 | 595 |     local object_storage_api_extensions=${OBJECT_STORAGE_API_EXTENSIONS:-"all"} | 
 | 596 |     if [[ ! -z "$DISABLE_OBJECT_STORAGE_API_EXTENSIONS" ]]; then | 
 | 597 |         # Enabled extensions are either the ones explicitly specified or those available on the API endpoint | 
 | 598 |         object_storage_api_extensions=${OBJECT_STORAGE_API_EXTENSIONS:-$(iniget $tmp_cfg_file object-storage-feature-enabled discoverable_apis | tr -d " ")} | 
 | 599 |         # Remove disabled extensions | 
 | 600 |         object_storage_api_extensions=$(remove_disabled_extensions $object_storage_api_extensions $DISABLE_STORAGE_API_EXTENSIONS) | 
 | 601 |     fi | 
 | 602 |     iniset $TEMPEST_CONFIG object-storage-feature-enabled discoverable_apis $object_storage_api_extensions | 
 | 603 |     # Cinder API Extensions | 
 | 604 |     local volume_api_extensions=${VOLUME_API_EXTENSIONS:-"all"} | 
 | 605 |     if [[ ! -z "$DISABLE_VOLUME_API_EXTENSIONS" ]]; then | 
 | 606 |         # Enabled extensions are either the ones explicitly specified or those available on the API endpoint | 
 | 607 |         volume_api_extensions=${VOLUME_API_EXTENSIONS:-$(iniget $tmp_cfg_file volume-feature-enabled api_extensions | tr -d " ")} | 
 | 608 |         # Remove disabled extensions | 
 | 609 |         volume_api_extensions=$(remove_disabled_extensions $volume_api_extensions $DISABLE_VOLUME_API_EXTENSIONS) | 
 | 610 |     fi | 
 | 611 |     iniset $TEMPEST_CONFIG volume-feature-enabled api_extensions $volume_api_extensions | 
 | 612 |  | 
| Attila Fazekas | 2aa3517 | 2012-12-05 20:03:40 +0100 | [diff] [blame] | 613 |     # Restore IFS | 
 | 614 |     IFS=$ifs | 
| Sean Dague | d093121 | 2012-10-04 16:06:44 -0400 | [diff] [blame] | 615 | } | 
 | 616 |  | 
| Sean Dague | d093121 | 2012-10-04 16:06:44 -0400 | [diff] [blame] | 617 | # install_tempest() - Collect source and prepare | 
| Ian Wienand | aee18c7 | 2014-02-21 15:35:08 +1100 | [diff] [blame] | 618 | function install_tempest { | 
| Sean Dague | d093121 | 2012-10-04 16:06:44 -0400 | [diff] [blame] | 619 |     git_clone $TEMPEST_REPO $TEMPEST_DIR $TEMPEST_BRANCH | 
| Clark Boylan | 33dc869 | 2014-08-19 22:37:10 -0700 | [diff] [blame] | 620 |     pip_install tox | 
| Matthew Treinish | 83e166b | 2015-02-18 19:01:20 -0500 | [diff] [blame] | 621 |     pushd $TEMPEST_DIR | 
 | 622 |     tox --notest -efull | 
| Matthew Treinish | 1e31e68 | 2016-02-09 23:50:54 -0500 | [diff] [blame] | 623 |     # NOTE(mtreinish) Respect constraints in the tempest full venv, things that | 
 | 624 |     # are using a tox job other than full will not be respecting constraints but | 
 | 625 |     # running pip install -U on tempest requirements | 
| Matthew Treinish | 440464c | 2016-05-04 11:55:12 -0400 | [diff] [blame] | 626 |     $TEMPEST_DIR/.tox/tempest/bin/pip install -c $REQUIREMENTS_DIR/upper-constraints.txt -r requirements.txt | 
 | 627 |     PROJECT_VENV["tempest"]=${TEMPEST_DIR}/.tox/tempest | 
| Matthew Treinish | 7e603d1 | 2016-06-01 18:16:14 -0400 | [diff] [blame] | 628 |     popd | 
 | 629 | } | 
 | 630 |  | 
 | 631 | # install_tempest_plugins() - Install any specified plugins into the tempest venv | 
 | 632 | function install_tempest_plugins { | 
 | 633 |     pushd $TEMPEST_DIR | 
| Matthew Treinish | 440464c | 2016-05-04 11:55:12 -0400 | [diff] [blame] | 634 |     if [[ $TEMPEST_PLUGINS != 0 ]] ; then | 
 | 635 |         tox -evenv-tempest -- pip install $TEMPEST_PLUGINS | 
| Matthew Treinish | b655867 | 2016-05-20 17:30:17 -0400 | [diff] [blame] | 636 |         echo "Checking installed Tempest plugins:" | 
 | 637 |         tox -evenv-tempest -- tempest list-plugins | 
| Matthew Treinish | b31640a | 2016-05-02 16:33:29 -0400 | [diff] [blame] | 638 |     fi | 
| Matthew Treinish | 83e166b | 2015-02-18 19:01:20 -0500 | [diff] [blame] | 639 |     popd | 
| Sean Dague | d093121 | 2012-10-04 16:06:44 -0400 | [diff] [blame] | 640 | } | 
 | 641 |  | 
| Sean Dague | d093121 | 2012-10-04 16:06:44 -0400 | [diff] [blame] | 642 | # Restore xtrace | 
| Ian Wienand | 523f488 | 2015-10-13 11:03:03 +1100 | [diff] [blame] | 643 | $_XTRACE_TEMPEST | 
| Sean Dague | 584d90e | 2013-03-29 14:34:53 -0400 | [diff] [blame] | 644 |  | 
| Adam Spiers | 6a5aa7c | 2013-10-24 11:27:02 +0100 | [diff] [blame] | 645 | # Tell emacs to use shell-script-mode | 
 | 646 | ## Local variables: | 
 | 647 | ## mode: shell-script | 
 | 648 | ## End: |