Merge "Add possibility to have private cinder volume types"

This commit is contained in:
Zuul 2019-01-09 22:00:22 +00:00 committed by Gerrit Code Review
commit 495e79de79
3 changed files with 21 additions and 2 deletions

View File

@ -628,6 +628,20 @@ the desired qos spec dictionary.
consumer: front-end
write_iops_sec: 100
Configure cinder to create a private volume type
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
By default, a define cinder-backend will create a public volume type.
In order to create a private volume type, add the variable ``public``
and set it to ``false``. If it is set to ``true`` or not set at all
the volume type created will be public.
.. code-block:: yaml
cinder_backends:
private_type:
public: false
Shared storage and synchronized UID/GID
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

View File

@ -0,0 +1,5 @@
---
features:
- Deployers can now define a cinder-backend volume type
explicitly private or public with option ``public``
set to true or false.

View File

@ -41,7 +41,7 @@
. {{ ansible_env.HOME }}/openrc
CLI_OPTIONS="{{ ((keystone_service_adminuri_insecure | bool) or (cinder_service_internaluri_insecure | bool)) | ternary('--insecure','') }}"
if ! {{ cinder_bin }}/openstack ${CLI_OPTIONS} volume type show "{{ item.key }}"; then
{{ cinder_bin }}/openstack ${CLI_OPTIONS} volume type create --property volume_backend_name="{{ item.value.volume_backend_name }}" "{{ item.key }}"
{{ cinder_bin }}/openstack ${CLI_OPTIONS} volume type create --property volume_backend_name="{{ item.value.volume_backend_name }}" {% if not item.value.public|default(True) %} --private {% endif %} "{{ item.key }}"
fi
args:
executable: /bin/bash
@ -54,7 +54,7 @@
CLI_OPTIONS="{{ ((keystone_service_adminuri_insecure | bool) or (cinder_service_internaluri_insecure | bool)) | ternary('--insecure','') }}"
{% for evtype in item.value.extra_volume_types %}
if ! {{ cinder_bin }}/openstack ${CLI_OPTIONS} volume type show "{{ evtype }}"; then
{{ cinder_bin }}/openstack ${CLI_OPTIONS} volume type create --property volume_backend_name="{{ item.value.volume_backend_name }}" "{{ evtype }}"
{{ cinder_bin }}/openstack ${CLI_OPTIONS} volume type create --property volume_backend_name="{{ item.value.volume_backend_name }}" {% if not item.value.public|default(True) %} --private {% endif %} "{{ evtype }}"
fi
{% endfor %}
args: