From 723d76c7830c13ec6b425ce1ab88d5b7cfba7eb8 Mon Sep 17 00:00:00 2001 From: ravikumar-venkatesan Date: Wed, 18 Feb 2015 13:32:36 +0000 Subject: [PATCH] Adds Nova keypair tests This submission adds three methods to rally/benchmark/scenarios/nova/utils.py 1) def create_keypair 2) def list_keypairs 3) def delete_keypair Adds new file test_keypairs.py for nova keypair scenarios Added configuration files for keypair operations under samples/tasks/scenarios/nova 1) create-and-list-keypairs.json 2) create-and-list-keypairs.yaml 3) create-and-delete-keypair.json 4) create-and-delete-keypair.yaml 5) boot-and-delete-server-with-keypairs.json 6) boot-and-delete-server-with-keypairs.yaml Added unittests to test_utils.py and test_keypairs.py under tests/unit/benchmark/scenarios/nova Change-Id: Ic90d94d3dc925a9f225f760bfc550bf3e82e80b8 --- rally-jobs/rally.yaml | 52 +++++++++++++++++++ .../boot-and-delete-server-with-keypairs.json | 28 ++++++++++ .../boot-and-delete-server-with-keypairs.yaml | 18 +++++++ .../nova/create-and-delete-keypair.json | 17 ++++++ .../nova/create-and-delete-keypair.yaml | 11 ++++ .../nova/create-and-list-keypairs.json | 17 ++++++ .../nova/create-and-list-keypairs.yaml | 11 ++++ 7 files changed, 154 insertions(+) create mode 100644 samples/tasks/scenarios/nova/boot-and-delete-server-with-keypairs.json create mode 100644 samples/tasks/scenarios/nova/boot-and-delete-server-with-keypairs.yaml create mode 100644 samples/tasks/scenarios/nova/create-and-delete-keypair.json create mode 100644 samples/tasks/scenarios/nova/create-and-delete-keypair.yaml create mode 100644 samples/tasks/scenarios/nova/create-and-list-keypairs.json create mode 100644 samples/tasks/scenarios/nova/create-and-list-keypairs.yaml diff --git a/rally-jobs/rally.yaml b/rally-jobs/rally.yaml index 922b3b18..9c6aef53 100755 --- a/rally-jobs/rally.yaml +++ b/rally-jobs/rally.yaml @@ -1271,3 +1271,55 @@ nova: security_groups: -1 security_group_rules: -1 + + + NovaKeypair.create_and_delete_keypair: + - + runner: + type: "constant" + times: 4 + concurrency: 4 + context: + users: + tenants: 3 + users_per_tenant: 2 + sla: + failure_rate: + max: 0 + + + NovaKeypair.create_and_list_keypairs: + - + runner: + type: "constant" + times: 4 + concurrency: 4 + context: + users: + tenants: 3 + users_per_tenant: 2 + sla: + failure_rate: + max: 0 + + + NovaKeypair.boot_and_delete_server_with_keypair: + - + args: + flavor: + name: "m1.tiny" + image: + name: {{image_name}} + runner: + type: "constant" + times: 4 + concurrency: 4 + context: + users: + tenants: 3 + users_per_tenant: 2 + network: + start_cidr: "10.2.0.0/24" + sla: + failure_rate: + max: 0 diff --git a/samples/tasks/scenarios/nova/boot-and-delete-server-with-keypairs.json b/samples/tasks/scenarios/nova/boot-and-delete-server-with-keypairs.json new file mode 100644 index 00000000..4a409fed --- /dev/null +++ b/samples/tasks/scenarios/nova/boot-and-delete-server-with-keypairs.json @@ -0,0 +1,28 @@ +{ + "NovaKeypair.boot_and_delete_server_with_keypair": [ + { + "args": { + "flavor": { + "name": "m1.nano" + }, + "image": { + "name": "^cirros.*uec$" + } + }, + "runner": { + "type": "constant", + "times": 5, + "concurrency": 2 + }, + "context": { + "users": { + "tenants": 2, + "users_per_tenant": 1 + }, + "network": { + "start_cidr": "100.1.0.0/26" + } + } + } + ] +} diff --git a/samples/tasks/scenarios/nova/boot-and-delete-server-with-keypairs.yaml b/samples/tasks/scenarios/nova/boot-and-delete-server-with-keypairs.yaml new file mode 100644 index 00000000..d790c45f --- /dev/null +++ b/samples/tasks/scenarios/nova/boot-and-delete-server-with-keypairs.yaml @@ -0,0 +1,18 @@ +--- + NovaKeypair.boot_and_delete_server_with_keypair: + - + args: + flavor: + name: "m1.nano" + image: + name: "^cirros.*uec$" + runner: + type: "constant" + times: 5 + concurrency: 2 + context: + users: + tenants: 2 + users_per_tenant: 1 + network: + start_cidr: "100.1.0.0/26" diff --git a/samples/tasks/scenarios/nova/create-and-delete-keypair.json b/samples/tasks/scenarios/nova/create-and-delete-keypair.json new file mode 100644 index 00000000..26391438 --- /dev/null +++ b/samples/tasks/scenarios/nova/create-and-delete-keypair.json @@ -0,0 +1,17 @@ +{ + "NovaKeypair.create_and_delete_keypair": [ + { + "runner": { + "type": "constant", + "times": 10, + "concurrency": 2 + }, + "context": { + "users": { + "tenants": 3, + "users_per_tenant": 2 + } + } + } + ] +} diff --git a/samples/tasks/scenarios/nova/create-and-delete-keypair.yaml b/samples/tasks/scenarios/nova/create-and-delete-keypair.yaml new file mode 100644 index 00000000..eabd4b0e --- /dev/null +++ b/samples/tasks/scenarios/nova/create-and-delete-keypair.yaml @@ -0,0 +1,11 @@ +--- + NovaKeypair.create_and_delete_keypair: + - + runner: + type: "constant" + times: 10 + concurrency: 2 + context: + users: + tenants: 3 + users_per_tenant: 2 diff --git a/samples/tasks/scenarios/nova/create-and-list-keypairs.json b/samples/tasks/scenarios/nova/create-and-list-keypairs.json new file mode 100644 index 00000000..878fcdbe --- /dev/null +++ b/samples/tasks/scenarios/nova/create-and-list-keypairs.json @@ -0,0 +1,17 @@ +{ + "NovaKeypair.create_and_list_keypairs": [ + { + "runner": { + "type": "constant", + "times": 10, + "concurrency": 2 + }, + "context": { + "users": { + "tenants": 3, + "users_per_tenant": 2 + } + } + } + ] +} diff --git a/samples/tasks/scenarios/nova/create-and-list-keypairs.yaml b/samples/tasks/scenarios/nova/create-and-list-keypairs.yaml new file mode 100644 index 00000000..edc04eee --- /dev/null +++ b/samples/tasks/scenarios/nova/create-and-list-keypairs.yaml @@ -0,0 +1,11 @@ +--- + NovaKeypair.create_and_list_keypairs: + - + runner: + type: "constant" + times: 10 + concurrency: 2 + context: + users: + tenants: 3 + users_per_tenant: 2