diff --git a/defaults/main.yml b/defaults/main.yml index 5644f037..d33fb107 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -87,6 +87,7 @@ cinder_service_admin_username: "cinder" ## Cinder API's enabled cinder_enable_v1_api: true cinder_enable_v2_api: true +cinder_enable_v3_api: true ## Cinder api service type and data cinder_service_name: cinder @@ -122,6 +123,18 @@ cinder_service_v2_adminurl: "{{ cinder_service_adminuri }}/v2/%(tenant_id)s" cinder_service_v2_internaluri: "{{ cinder_service_internaluri_proto }}://{{ internal_lb_vip_address }}:{{ cinder_service_port }}" cinder_service_v2_internalurl: "{{ cinder_service_internaluri }}/v2/%(tenant_id)s" +cinder_service_v3_name: cinderv3 +cinder_service_v3_port: 8776 +cinder_service_v3_proto: http +cinder_service_v3_type: volumev3 +cinder_service_v3_description: "Cinder Volume Service V3" +cinder_service_v3_publicuri: "{{ cinder_service_publicuri_proto }}://{{ external_lb_vip_address }}:{{ cinder_service_port }}" +cinder_service_v3_publicurl: "{{ cinder_service_publicuri }}/v3/%(tenant_id)s" +cinder_service_v3_adminuri: "{{ cinder_service_adminuri_proto }}://{{ internal_lb_vip_address }}:{{ cinder_service_port }}" +cinder_service_v3_adminurl: "{{ cinder_service_adminuri }}/v3/%(tenant_id)s" +cinder_service_v3_internaluri: "{{ cinder_service_internaluri_proto }}://{{ internal_lb_vip_address }}:{{ cinder_service_port }}" +cinder_service_v3_internalurl: "{{ cinder_service_internaluri }}/v3/%(tenant_id)s" + ## Keystone authentication middleware cinder_keystone_auth_plugin: password diff --git a/releasenotes/notes/cinder_api_v3-cc53677ce77d97c3.yaml b/releasenotes/notes/cinder_api_v3-cc53677ce77d97c3.yaml new file mode 100644 index 00000000..3422fdfe --- /dev/null +++ b/releasenotes/notes/cinder_api_v3-cc53677ce77d97c3.yaml @@ -0,0 +1,5 @@ +--- +features: + - Add support for the cinder v3 api. This is enabled + by default, but can be disabled by setting the + ``cinder_enable_v3_api`` variable to ``false``. diff --git a/tasks/cinder_service_setup.yml b/tasks/cinder_service_setup.yml index f352f7ee..492f540b 100644 --- a/tasks/cinder_service_setup.yml +++ b/tasks/cinder_service_setup.yml @@ -30,3 +30,12 @@ service_publicurl: "{{ cinder_service_v2_publicurl }}" service_internalurl: "{{ cinder_service_v2_internalurl }}" service_adminurl: "{{ cinder_service_v2_adminurl }}" + +- include: cinder_service_add.yml + vars: + service_name: "{{ cinder_service_v3_name }}" + service_type: "{{ cinder_service_v3_type }}" + service_description: "{{ cinder_service_v3_description }}" + service_publicurl: "{{ cinder_service_v3_publicurl }}" + service_internalurl: "{{ cinder_service_v3_internalurl }}" + service_adminurl: "{{ cinder_service_v3_adminurl }}" diff --git a/templates/cinder.conf.j2 b/templates/cinder.conf.j2 index 51521402..edc9abd7 100644 --- a/templates/cinder.conf.j2 +++ b/templates/cinder.conf.j2 @@ -16,6 +16,7 @@ auth_strategy = keystone ## Cinder API's enabled enable_v1_api = {{ cinder_enable_v1_api }} enable_v2_api = {{ cinder_enable_v2_api }} +enable_v3_api = {{ cinder_enable_v3_api }} {% if inventory_hostname in groups['cinder_volume'] %} {% if cinder_service_backup_program_enabled == true %}