Repo structure modification
[functest.git] / functest / opnfv_tests / OpenStack / rally / macro / macro.yaml
1 {%- macro user_context(tenants,users_per_tenant, use_existing_users) -%}
2 {%- if use_existing_users and caller is not defined -%} {}
3 {%- else %}
4   {%- if not use_existing_users %}
5         users:
6           tenants: {{ tenants }}
7           users_per_tenant: {{ users_per_tenant }}
8   {%- endif %}
9   {%- if caller is defined %}
10     {{ caller() }}
11   {%- endif %}
12 {%- endif %}
13 {%- endmacro %}
14
15 {%- macro vm_params(image=none, flavor=none, size=none) %}
16 {%- if flavor is not none %}
17         flavor:
18           name: {{ flavor }}
19 {%- endif %}
20 {%- if image is not none %}
21         image:
22           name: {{ image }}
23 {%- endif %}
24 {%- if size is not none %}
25         size: {{ size }}
26 {%- endif %}
27 {%- endmacro %}
28
29 {%- macro unlimited_volumes() %}
30           cinder:
31             gigabytes: -1
32             snapshots: -1
33             volumes: -1
34 {%- endmacro %}
35
36 {%- macro constant_runner(concurrency=1, times=1, is_smoke=True) %}
37         type: "constant"
38   {%- if is_smoke %}
39         concurrency: 1
40         times: 1
41   {%- else %}
42         concurrency: {{ concurrency }}
43         times: {{ times }}
44   {%- endif %}
45 {%- endmacro %}
46
47 {%- macro rps_runner(rps=1, times=1, is_smoke=True) %}
48         type: rps
49   {%- if is_smoke %}
50         rps: 1
51         times: 1
52   {%- else %}
53         rps: {{ rps }}
54         times: {{ times }}
55   {%- endif %}
56 {%- endmacro %}
57
58 {%- macro no_failures_sla() %}
59         failure_rate:
60           max: 0
61 {%- endmacro %}
62
63 {%- macro volumes(size=1, volumes_per_tenant=1) %}
64         volumes:
65           size: {{ size }}
66           volumes_per_tenant: {{ volumes_per_tenant }}
67 {%- endmacro %}
68
69 {%- macro unlimited_nova(keypairs=false) %}
70           nova:
71             cores: -1
72             floating_ips: -1
73             instances: -1
74             {%- if keypairs %}
75             key_pairs: -1
76             {%- endif %}
77             ram: -1
78             security_group_rules: -1
79             security_groups: -1
80 {%- endmacro %}
81
82 {%- macro unlimited_neutron(secgroups=false) %}
83           neutron:
84             network: -1
85             port: -1
86             subnet: -1
87             {%- if secgroups %}
88             security_group: -1
89             security_group_rule: -1
90             {%- endif %}
91 {%- endmacro %}
92
93 {%- macro glance_args(location, container="bare", type="qcow2") %}
94         container_format: {{ container }}
95         disk_format: {{ type }}
96         image_location: {{ location }}
97 {%- endmacro %}