This provides a mechanism for overriding v2 endpoint with v2.1 so that
tests can be run against a devstack to provide equivalency between the
APIs.
Change-Id: Iaaa530bda6bcdae75e86be8dbe572abe4396e8e9
| ... | ... |
@@ -45,6 +45,12 @@ NOVA_FAKE_CONF=$NOVA_CONF_DIR/nova-fake.conf |
| 45 | 45 |
NOVA_CELLS_DB=${NOVA_CELLS_DB:-nova_cell}
|
| 46 | 46 |
|
| 47 | 47 |
NOVA_API_PASTE_INI=${NOVA_API_PASTE_INI:-$NOVA_CONF_DIR/api-paste.ini}
|
| 48 |
+# NOVA_API_VERSIONS valid options |
|
| 49 |
+# - default - setup API end points as nova does out of the box |
|
| 50 |
+# - v21default - make v21 the default on /v2 |
|
| 51 |
+# NOTE(sdague): this is for transitional testing of the Nova v21 API. |
|
| 52 |
+# Expect to remove in L or M. |
|
| 53 |
+NOVA_API_VERSIONS=${NOVA_API_VERSIONS:-default}
|
|
| 48 | 54 |
|
| 49 | 55 |
if is_ssl_enabled_service "nova" || is_service_enabled tls-proxy; then |
| 50 | 56 |
NOVA_SERVICE_PROTOCOL="https" |
| ... | ... |
@@ -263,6 +269,11 @@ function configure_nova {
|
| 263 | 263 |
|
| 264 | 264 |
# Get the sample configuration file in place |
| 265 | 265 |
cp $NOVA_DIR/etc/nova/api-paste.ini $NOVA_CONF_DIR |
| 266 |
+ |
|
| 267 |
+ # For testing v21 is equivalent to v2 |
|
| 268 |
+ if [[ "$NOVA_API_VERSION" == "v21default" ]]; then |
|
| 269 |
+ sed -i s/": openstack_compute_api_v2$"/": openstack_compute_api_v21"/ "$NOVA_API_PASTE_INI" |
|
| 270 |
+ fi |
|
| 266 | 271 |
fi |
| 267 | 272 |
|
| 268 | 273 |
if is_service_enabled n-cpu; then |