Add option to enable/disable the nova v2.1 API

In the kilo release the nova v2.1 API is tied to the v3 API, so v3 needs
to be enabled for v2.1 to be enabled as well. This change adds a setting
to control whether the v2.1 API should be enabled or disabled. If v2.1
is enabled then v3 will be enabled as well, but without registering it
with the keystone catalog.

Change-Id: I1e80189bbcbef1dd712cd6a527b5b59aa939e9e1
Closes-Bug: #1445524
This commit is contained in:
Miguel Grinberg 2015-04-17 10:42:26 -07:00
parent f13d8cb8a9
commit fcc4144692
3 changed files with 9 additions and 1 deletions

View File

@ -93,6 +93,7 @@ nova_v21_service_adminuri: "{{ nova_v21_service_proto }}://{{ internal_lb_vip_ad
nova_v21_service_adminurl: "{{ nova_v21_service_adminuri }}/v2.1"
nova_v21_service_internaluri: "{{ nova_v21_service_proto }}://{{ internal_lb_vip_address }}:{{ nova_v21_service_port }}"
nova_v21_service_internalurl: "{{ nova_v21_service_internaluri }}/v2.1"
nova_v21_enabled: true
## Nova v2
nova_service_name: nova

View File

@ -44,6 +44,8 @@
service_internalurl: "{{ nova_v21_service_internalurl }}"
service_adminurl: "{{ nova_v21_service_adminurl }}"
role_name: "{{ nova_service_role_name }}"
when: >
nova_v21_enabled == true or nova_v21_enabled == 'True'
tags:
- nova-api
- nova-api-v21

View File

@ -142,7 +142,12 @@ workers = {{ nova_conductor_workers | default(api_threads) }}
[osapi_v3]
enabled = {{ nova_v3_deprecated_but_enabled }}
# note that this setting enables both the v3 and v2.1 APIs in kilo
{% if nova_v3_deprecated_but_enabled == true or nova_v3_deprecated_but_enabled == 'True' or nova_v21_enabled == true or nova_v21_enabled == 'True' %}
enabled = true
{% else %}
enabled = false
{% endif %}
[keystone_authtoken]