From 7c72a374a22b11ea869ea5fbd983c4e8a52452b8 Mon Sep 17 00:00:00 2001 From: Dmitriy Uvarenkov Date: Mon, 21 Mar 2016 17:17:05 +0200 Subject: [PATCH] Add configuration for Heat caching during validation With this configuration you can test heat caching. Already was in heat repo, just added it to rally. Change-Id: I8bd35a0f96a9f73a33f434ad7e3412db6f1d95ad --- ...source_group_with_constraint.yaml.template | 21 +++++++++++++++++++ rally-jobs/heat.yaml | 15 +++++++++++++ .../create-and-delete-stack_with_delay.json | 20 ++++++++++++++++++ .../create-and-delete-stack_with_delay.yaml | 13 ++++++++++++ ...source_group_with_constraint.yaml.template | 21 +++++++++++++++++++ 5 files changed, 90 insertions(+) create mode 100644 rally-jobs/extra/resource_group_with_constraint.yaml.template create mode 100644 samples/tasks/scenarios/heat/create-and-delete-stack_with_delay.json create mode 100644 samples/tasks/scenarios/heat/create-and-delete-stack_with_delay.yaml create mode 100644 samples/tasks/scenarios/heat/templates/resource_group_with_constraint.yaml.template diff --git a/rally-jobs/extra/resource_group_with_constraint.yaml.template b/rally-jobs/extra/resource_group_with_constraint.yaml.template new file mode 100644 index 0000000000..6eca4bb44a --- /dev/null +++ b/rally-jobs/extra/resource_group_with_constraint.yaml.template @@ -0,0 +1,21 @@ +heat_template_version: 2013-05-23 + +description: Template for testing caching. + +parameters: + count: + type: number + default: 40 + delay: + type: number + default: 0.3 + +resources: + rg: + type: OS::Heat::ResourceGroup + properties: + count: {get_param: count} + resource_def: + type: OS::Heat::TestResource + properties: + constraint_prop_secs: {get_param: delay} diff --git a/rally-jobs/heat.yaml b/rally-jobs/heat.yaml index 0f3eee0283..367a9a3559 100644 --- a/rally-jobs/heat.yaml +++ b/rally-jobs/heat.yaml @@ -64,6 +64,21 @@ failure_rate: max: 0 + - + args: + template_path: "~/.rally/extra/resource_group_with_constraint.yaml.template" + runner: + type: "constant" + times: 6 + concurrency: 2 + context: + users: + tenants: 2 + users_per_tenant: 2 + sla: + failure_rate: + max: 0 + HeatStacks.create_check_delete_stack: - args: diff --git a/samples/tasks/scenarios/heat/create-and-delete-stack_with_delay.json b/samples/tasks/scenarios/heat/create-and-delete-stack_with_delay.json new file mode 100644 index 0000000000..29d3a16761 --- /dev/null +++ b/samples/tasks/scenarios/heat/create-and-delete-stack_with_delay.json @@ -0,0 +1,20 @@ +{ + "HeatStacks.create_and_delete_stack": [ + { + "args": { + "template_path": "templates/resource_group_with_constraint.yaml.template" + }, + "runner": { + "type": "constant", + "times": 10, + "concurrency": 2 + }, + "context": { + "users": { + "tenants": 2, + "users_per_tenant": 2 + } + } + } + ] +} diff --git a/samples/tasks/scenarios/heat/create-and-delete-stack_with_delay.yaml b/samples/tasks/scenarios/heat/create-and-delete-stack_with_delay.yaml new file mode 100644 index 0000000000..300ef1829d --- /dev/null +++ b/samples/tasks/scenarios/heat/create-and-delete-stack_with_delay.yaml @@ -0,0 +1,13 @@ +--- + HeatStacks.create_and_delete_stack: + - + args: + template_path: "templates/resource_group_with_constraint.yaml.template" + runner: + type: "constant" + times: 10 + concurrency: 2 + context: + users: + tenants: 2 + users_per_tenant: 2 \ No newline at end of file diff --git a/samples/tasks/scenarios/heat/templates/resource_group_with_constraint.yaml.template b/samples/tasks/scenarios/heat/templates/resource_group_with_constraint.yaml.template new file mode 100644 index 0000000000..234e4237ff --- /dev/null +++ b/samples/tasks/scenarios/heat/templates/resource_group_with_constraint.yaml.template @@ -0,0 +1,21 @@ +heat_template_version: 2013-05-23 + +description: Template for testing caching. + +parameters: + count: + type: number + default: 40 + delay: + type: number + default: 0.1 + +resources: + rg: + type: OS::Heat::ResourceGroup + properties: + count: {get_param: count} + resource_def: + type: OS::Heat::TestResource + properties: + constraint_prop_secs: {get_param: delay}