modfiied to not to expose api on admin network if public is not
[joid.git] / ci / config_tpl / juju2 / bundle_tpl / cinder.yaml
1     cinder:
2       charm: "./{{ ubuntu.release }}/cinder"
3 {% if opnfv.storage_dict.scaleio is defined %}
4       num_units: 1
5 {% else %}
6       num_units: {{ unit_qty() }}
7 {% endif %}
8 {% if os.service.bindings %}
9       bindings:
10         internal: internal-api
11         shared-db: internal-api
12 {% if opnfv.spaces_dict.public is defined %}
13         public: public-api
14 {% if opnfv.spaces_dict.data is defined %}
15         admin: admin-api
16 {% else %}
17         admin: internal-api
18 {% endif %}
19 {% else %}
20         public: internal-api
21         admin: internal-api
22 {% endif %}
23 {% endif %}
24       options:
25         openstack-origin: "cloud:{{ ubuntu.release }}-{{ os.release }}"
26         region: {{ os.region }}
27         block-device: None
28         glance-api-version: 2
29 {% if os.beta.public_api %}
30         use-internal-endpoints: true
31 {% endif %}
32 {% if os.network.ipv6 %}
33         prefer-ipv6: {{ os.network.ipv6 }}
34 {% endif %}
35 {% if os.api.worker_multiplier %}
36         worker-multiplier: {{ os.api.worker_multiplier }}
37 {% endif %}
38 {% if opnfv.storage_dict.ceph is defined %}
39         ceph-osd-replication-count: {{ unit_ceph_qty() }}
40 {% endif %}
41 {% if os.ha.mode == 'ha' %}
42         vip: {{ opnfv.vip.cinder }}
43 {% endif %}
44 {% if os.beta.public_api %}
45         os-public-hostname: api.{{ opnfv.domain }}
46 {% endif %}
47       to:
48 {% if opnfv.storage_dict.scaleio is defined %}
49         - "nodes/0"
50 {% else %}
51 {% for unit_id in to_select() %}
52         - "lxd:nodes/{{ unit_id }}"
53 {% endfor %}
54 {% endif %}