Simplify argument parsing and add usage info
[joid.git] / ci / config_tpl / juju2 / bundle_tpl / nova-compute.yaml
1     nova-compute:
2       charm: "./{{ ubuntu.release }}/nova-compute"
3 {% if os.hyperconverged %}
4       num_units: {{ opnfv.units - 1 }}
5 {% else %}
6 {% if os.ha.mode == 'ha' %}
7       num_units: {{ opnfv.units - 3 }}
8 {% else %}
9       num_units: {{ opnfv.units - 1 }}
10 {% endif %}
11 {% endif %}
12       options:
13         openstack-origin: "cloud:{{ ubuntu.release }}-{{ os.release }}"
14 {% if os.git_repo.origin_git %}
15         openstack-origin-git: "{{ os.git_repo.branch }}"
16 {% endif %}
17         enable-live-migration: true
18         enable-resize: true
19         migration-auth-type: ssh
20 {% if os.beta.public_api %}
21         use-internal-endpoints: true
22 {% endif %}
23 {% if os.network.ipv6 %}
24         prefer-ipv6: {{ os.network.ipv6 }}
25 {% endif %}
26 {% if opnfv.storage_dict.ceph is defined %}
27         ceph-osd-replication-count: {{ unit_ceph_qty() }}
28 {% endif %}
29 {% if os.beta.huge_pages %}
30         hugepages: "2048"
31 {% endif %}
32 {% if os.beta.cpu_pin %}
33         vcpu-pin-set: "{{ os.beta.cpu_pin_set }}"
34 {% endif %}
35 {% if os.lxd %}
36         virt-type: lxd
37 {% endif %}
38       to:
39 {% if os.hyperconverged %}
40 {% for unit_id in range(1, opnfv.units) %}
41         - "nodes/{{ unit_id }}"
42 {% endfor %}
43 {% else %}
44 {% if os.ha.mode == 'ha' %}
45 {% for unit_id in range(0, opnfv.units - 3) %}
46         - "nodes-compute/{{ unit_id }}"
47 {% endfor %}
48 {% else %}
49 {% for unit_id in range(0, opnfv.units - 1) %}
50         - "nodes-compute/{{ unit_id }}"
51 {% endfor %}
52 {% endif %}
53 {% endif %}