modfiied to not to expose api on admin network if public is not
[joid.git] / ci / config_tpl / juju2 / bundle_tpl / neutron-api.yaml
1     neutron-api:
2       charm: "./{{ ubuntu.release }}/neutron-api"
3       num_units: {{ unit_qty() }}
4 {% if os.service.bindings %}
5       bindings:
6         internal: internal-api
7         shared-db: internal-api
8 {% if opnfv.spaces_dict.public is defined %}
9         public: public-api
10 {% if opnfv.spaces_dict.data is defined %}
11         admin: admin-api
12 {% else %}
13         admin: internal-api
14 {% endif %}
15 {% else %}
16         public: internal-api
17         admin: internal-api
18 {% endif %}
19 {% endif %}
20       options:
21         openstack-origin: "cloud:{{ ubuntu.release }}-{{ os.release }}"
22         region: {{ os.region }}
23         neutron-security-groups: true
24 {% if os.beta.public_api %}
25         #use-internal-endpoints: true
26 {% endif %}
27 {% if os.network.ipv6 %}
28         prefer-ipv6: {{ os.network.ipv6 }}
29 {% endif %}
30 {% if os.api.worker_multiplier %}
31         worker-multiplier: {{ os.api.worker_multiplier }}
32 {% endif %}
33 {% if os.ha.mode == 'ha' %}
34         vip: {{ opnfv.vip.neutron }}
35 {% endif %}
36 {% if os.network.controller == 'nosdn' %}
37         flat-network-providers: physnet1
38 {% if os.network.dvr %}
39         overlay-network-type: vxlan
40 {% endif %}
41 {% elif os.network.controller == 'odl' %}
42         manage-neutron-plugin-legacy-mode: False
43         flat-network-providers: physnet1
44 {% elif os.network.controller == 'onos' %}
45         flat-network-providers: physnet1
46         manage-neutron-plugin-legacy-mode: False
47 {% endif %}
48 {% if os.beta.public_api %}
49         os-public-hostname: api.{{ opnfv.domain }}
50 {% endif %}
51 {% if os.network.dvr %}
52         enable-dvr: true
53 {% endif %}
54 {% if os.network.l2_population %}
55         l2-population: true
56 {% endif %}
57       to:
58 {% for unit_id in to_select() %}
59         - "lxd:nodes/{{ unit_id }}"
60 {% endfor %}