| ... | ... |
@@ -64,6 +64,11 @@ NOVA_API_PASTE_INI=${NOVA_API_PASTE_INI:-$NOVA_CONF_DIR/api-paste.ini}
|
| 64 | 64 |
# Expect to remove in L or M. |
| 65 | 65 |
NOVA_API_VERSION=${NOVA_API_VERSION-default}
|
| 66 | 66 |
|
| 67 |
+# NOVA_V2_LEGACY defines whether we force the Nova v2.0 enpoint onto |
|
| 68 |
+# the Nova v2.0 legacy code base. Remove this option once the Nova |
|
| 69 |
+# v2.0 legacy codebase is removed. |
|
| 70 |
+NOVA_V2_LEGACY=$(trueorfalse False NOVA_V2_LEGACY) |
|
| 71 |
+ |
|
| 67 | 72 |
if is_suse; then |
| 68 | 73 |
NOVA_WSGI_DIR=${NOVA_WSGI_DIR:-/srv/www/htdocs/nova}
|
| 69 | 74 |
else |
| ... | ... |
@@ -313,6 +318,13 @@ function configure_nova {
|
| 313 | 313 |
if [[ "$NOVA_API_VERSION" == "v21default" ]]; then |
| 314 | 314 |
sed -i s/": openstack_compute_api_v2$"/": openstack_compute_api_v21"/ "$NOVA_API_PASTE_INI" |
| 315 | 315 |
fi |
| 316 |
+ |
|
| 317 |
+ # For setting up an environment where v2.0 is running on the |
|
| 318 |
+ # v2.0 legacy code base. |
|
| 319 |
+ if [[ "$NOVA_V2_LEGACY" == "True" ]]; then |
|
| 320 |
+ sed -i s@"^/v2: openstack_compute_api_v21_legacy_v2_compatible$"@"/v2: openstack_compute_api_legacy_v2"@ \ |
|
| 321 |
+ "$NOVA_API_PASTE_INI" |
|
| 322 |
+ fi |
|
| 316 | 323 |
fi |
| 317 | 324 |
|
| 318 | 325 |
if is_service_enabled n-cpu; then |
| ... | ... |
@@ -413,15 +425,16 @@ function create_nova_accounts {
|
| 413 | 413 |
nova_api_url="$NOVA_SERVICE_PROTOCOL://$NOVA_SERVICE_HOST/compute" |
| 414 | 414 |
fi |
| 415 | 415 |
|
| 416 |
- get_or_create_service "nova" "compute" "Nova Compute Service" |
|
| 417 |
- get_or_create_endpoint "compute" \ |
|
| 416 |
+ get_or_create_service "nova_legacy" "compute_legacy" \ |
|
| 417 |
+ "Nova Compute Service (Legacy 2.0)" |
|
| 418 |
+ get_or_create_endpoint "compute_legacy" \ |
|
| 418 | 419 |
"$REGION_NAME" \ |
| 419 | 420 |
"$nova_api_url/v2/\$(tenant_id)s" \ |
| 420 | 421 |
"$nova_api_url/v2/\$(tenant_id)s" \ |
| 421 | 422 |
"$nova_api_url/v2/\$(tenant_id)s" |
| 422 | 423 |
|
| 423 |
- get_or_create_service "novav21" "computev21" "Nova Compute Service V2.1" |
|
| 424 |
- get_or_create_endpoint "computev21" \ |
|
| 424 |
+ get_or_create_service "nova" "compute" "Nova Compute Service" |
|
| 425 |
+ get_or_create_endpoint "compute" \ |
|
| 425 | 426 |
"$REGION_NAME" \ |
| 426 | 427 |
"$nova_api_url/v2.1/\$(tenant_id)s" \ |
| 427 | 428 |
"$nova_api_url/v2.1/\$(tenant_id)s" \ |
| ... | ... |
@@ -361,6 +361,14 @@ function configure_tempest {
|
| 361 | 361 |
iniset $TEMPEST_CONFIG compute fixed_network_name $PRIVATE_NETWORK_NAME |
| 362 | 362 |
fi |
| 363 | 363 |
|
| 364 |
+ # Set the service catalog entry for Tempest to run on. Typically |
|
| 365 |
+ # used to try different compute API version targets. The tempest |
|
| 366 |
+ # default if 'compute', which is typically valid, so only set this |
|
| 367 |
+ # if you want to change it. |
|
| 368 |
+ if [[ -n "$TEMPEST_COMPUTE_TYPE" ]]; then |
|
| 369 |
+ iniset $TEMPEST_CONFIG compute catalog_type $TEMPEST_COMPUTE_TYPE |
|
| 370 |
+ fi |
|
| 371 |
+ |
|
| 364 | 372 |
# Compute Features |
| 365 | 373 |
# Run ``verify_tempest_config -ur`` to retrieve enabled extensions on API endpoints |
| 366 | 374 |
# NOTE(mtreinish): This must be done after auth settings are added to the tempest config |