With config option NOVA_USE_MOD_WSGI=True nova-api handles
requests on /compute URL.
Depends on I83bc4731507fa028377ae6701ed4d32adefa9251
Change-Id: Ic84b5c0dc0726662470ef9c076a0cadca55a3917
| ... | ... |
@@ -14,3 +14,12 @@ Listen %PUBLICPORT% |
| 14 | 14 |
%SSLCERTFILE% |
| 15 | 15 |
%SSLKEYFILE% |
| 16 | 16 |
</VirtualHost> |
| 17 |
+ |
|
| 18 |
+Alias /compute %PUBLICWSGI% |
|
| 19 |
+<Location /compute> |
|
| 20 |
+ SetHandler wsgi-script |
|
| 21 |
+ Options +ExecCGI |
|
| 22 |
+ WSGIProcessGroup nova-api |
|
| 23 |
+ WSGIApplicationGroup %{GLOBAL}
|
|
| 24 |
+ WSGIPassAuthorization On |
|
| 25 |
+</Location> |
| ... | ... |
@@ -405,19 +405,25 @@ function create_nova_accounts {
|
| 405 | 405 |
|
| 406 | 406 |
local nova_service=$(get_or_create_service "nova" \ |
| 407 | 407 |
"compute" "Nova Compute Service") |
| 408 |
+ local nova_api_url |
|
| 409 |
+ if [[ "$NOVA_USE_MOD_WSGI" == "False" ]]; then |
|
| 410 |
+ nova_api_url="$NOVA_SERVICE_PROTOCOL://$NOVA_SERVICE_HOST:$NOVA_SERVICE_PORT" |
|
| 411 |
+ else |
|
| 412 |
+ nova_api_url="$NOVA_SERVICE_PROTOCOL://$NOVA_SERVICE_HOST/compute" |
|
| 413 |
+ fi |
|
| 408 | 414 |
get_or_create_endpoint $nova_service \ |
| 409 | 415 |
"$REGION_NAME" \ |
| 410 |
- "$NOVA_SERVICE_PROTOCOL://$NOVA_SERVICE_HOST:$NOVA_SERVICE_PORT/v2/\$(tenant_id)s" \ |
|
| 411 |
- "$NOVA_SERVICE_PROTOCOL://$NOVA_SERVICE_HOST:$NOVA_SERVICE_PORT/v2/\$(tenant_id)s" \ |
|
| 412 |
- "$NOVA_SERVICE_PROTOCOL://$NOVA_SERVICE_HOST:$NOVA_SERVICE_PORT/v2/\$(tenant_id)s" |
|
| 416 |
+ "$nova_api_url/v2/\$(tenant_id)s" \ |
|
| 417 |
+ "$nova_api_url/v2/\$(tenant_id)s" \ |
|
| 418 |
+ "$nova_api_url/v2/\$(tenant_id)s" |
|
| 413 | 419 |
|
| 414 | 420 |
local nova_v21_service=$(get_or_create_service "novav21" \ |
| 415 | 421 |
"computev21" "Nova Compute Service V2.1") |
| 416 | 422 |
get_or_create_endpoint $nova_v21_service \ |
| 417 | 423 |
"$REGION_NAME" \ |
| 418 |
- "$NOVA_SERVICE_PROTOCOL://$NOVA_SERVICE_HOST:$NOVA_SERVICE_PORT/v2.1/\$(tenant_id)s" \ |
|
| 419 |
- "$NOVA_SERVICE_PROTOCOL://$NOVA_SERVICE_HOST:$NOVA_SERVICE_PORT/v2.1/\$(tenant_id)s" \ |
|
| 420 |
- "$NOVA_SERVICE_PROTOCOL://$NOVA_SERVICE_HOST:$NOVA_SERVICE_PORT/v2.1/\$(tenant_id)s" |
|
| 424 |
+ "$nova_api_url/v2.1/\$(tenant_id)s" \ |
|
| 425 |
+ "$nova_api_url/v2.1/\$(tenant_id)s" \ |
|
| 426 |
+ "$nova_api_url/v2.1/\$(tenant_id)s" |
|
| 421 | 427 |
fi |
| 422 | 428 |
fi |
| 423 | 429 |
|