diff options
author | Juha Kosonen <juha.kosonen@nokia.com> | 2015-12-18 15:47:53 +0000 |
---|---|---|
committer | Juha Kosonen <juha.kosonen@nokia.com> | 2015-12-18 15:47:53 +0000 |
commit | 955b592a7d4aab0a9685bd19bf77f959f59ffd22 (patch) | |
tree | 2fe22740835659ce64e634fd655d7672f3216ca2 /testcases/VIM/OpenStack/CI/rally_cert/macro | |
parent | ba5f3f4d94bf91824655eef49d1900e015859288 (diff) |
Parameterize Rally scenarios
Applied argument manipulation approach from rally/certification.
JIRA: FUNCTEST-109
Change-Id: Ia6f08f1a7e7566c883cf7c616d32b7e0ca26b1f9
Signed-off-by: Juha Kosonen <juha.kosonen@nokia.com>
Diffstat (limited to 'testcases/VIM/OpenStack/CI/rally_cert/macro')
-rw-r--r-- | testcases/VIM/OpenStack/CI/rally_cert/macro/macro.yaml | 95 |
1 files changed, 95 insertions, 0 deletions
diff --git a/testcases/VIM/OpenStack/CI/rally_cert/macro/macro.yaml b/testcases/VIM/OpenStack/CI/rally_cert/macro/macro.yaml new file mode 100644 index 00000000..e6542f37 --- /dev/null +++ b/testcases/VIM/OpenStack/CI/rally_cert/macro/macro.yaml @@ -0,0 +1,95 @@ +{%- 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() %} +{% if "neutron" in service_list %} + neutron: + network: -1 + port: -1 + subnet: -1 +{% endif %} +{%- endmacro %} + +{%- macro glance_args(location, container="bare", type="qcow2") %} + container_format: {{ container }} + disk_format: {{ type }} + image_location: {{ location }} +{%- endmacro %} |