aboutsummaryrefslogtreecommitdiffstats
path: root/functest/opnfv_tests/openstack/rally/macro/macro.yaml
blob: 48c0333e93728a28ca2f3e7b95c9c924c53f308b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
{%- macro user_context(tenants,users_per_tenant, use_existing_users) -%}
{%- if use_existing_users and caller is not defined -%} {}
{%- else %}
  {%- if not use_existing_users %}
        users:
          tenants: {{ tenants }}
          users_per_tenant: {{ users_per_tenant }}
  {%- endif %}
  {%- if caller is defined %}
    {{ caller() }}
  {%- endif %}
{%- endif %}
{%- endmacro %}

{%- macro vm_params(image=none, flavor=none, size=none) %}
{%- if flavor is not none %}
        flavor:
          name: {{ flavor }}
{%- endif %}
{%- if image is not none %}
        image:
          name: {{ image }}
{%- endif %}
{%- if size is not none %}
        size: {{ size }}
{%- endif %}
{%- endmacro %}

{%- macro unlimited_volumes() %}
          cinder:
            gigabytes: -1
            snapshots: -1
            volumes: -1
{%- endmacro %}

{%- macro constant_runner(concurrency=1, times=1, is_smoke=True) %}
        type: "constant"
  {%- if is_smoke %}
        concurrency: 1
        times: 1
  {%- else %}
        concurrency: {{ concurrency }}
        times: {{ times }}
  {%- endif %}
{%- endmacro %}

{%- macro rps_runner(rps=1, times=1, is_smoke=True) %}
        type: rps
  {%- if is_smoke %}
        rps: 1
        times: 1
  {%- else %}
        rps: {{ rps }}
        times: {{ times }}
  {%- endif %}
{%- endmacro %}

{%- macro no_failures_sla() %}
        failure_rate:
          max: 0
{%- endmacro %}

{%- macro volumes(size=1, volumes_per_tenant=1) %}
        volumes:
          size: {{ size }}
          volumes_per_tenant: {{ volumes_per_tenant }}
{%- endmacro %}

{%- macro unlimited_nova(keypairs=false) %}
          nova:
            cores: -1
            floating_ips: -1
            instances: -1
            {%- if keypairs %}
            key_pairs: -1
            {%- endif %}
            ram: -1
            security_group_rules: -1
            security_groups: -1
{%- endmacro %}

{%- macro unlimited_neutron(secgroups=false) %}
          neutron:
            network: -1
            port: -1
            subnet: -1
            {%- if secgroups %}
            security_group: -1
            security_group_rule: -1
            {%- endif %}
{%- endmacro %}

{%- macro glance_args(location, container="bare", type="qcow2") %}
        container_format: {{ container }}
        disk_format: {{ type }}
        image_location: {{ location }}
{%- endmacro %}