From d7911e7a5d4648916fe0ca9d7daddaac847af337 Mon Sep 17 00:00:00 2001 From: chenhb-zte Date: Thu, 16 Mar 2017 17:53:45 +0800 Subject: [PATCH] Add samples to context directory Change-Id: I1cd4e7473bbb86e73114ee9a6ed78bbb6e824317 --- samples/tasks/contexts/allow-ssh.json | 21 +++++ samples/tasks/contexts/allow-ssh.yaml | 14 +++ samples/tasks/contexts/api-versions.json | 29 +++++++ samples/tasks/contexts/api-versions.yaml | 19 ++++ samples/tasks/contexts/audit-templates.json | 38 ++++++++ samples/tasks/contexts/audit-templates.yaml | 22 +++++ samples/tasks/contexts/ceilometer.json | 38 ++++++++ samples/tasks/contexts/ceilometer.yaml | 31 +++++++ samples/tasks/contexts/cluster-templates.json | 78 +++++++++++++++++ samples/tasks/contexts/cluster-templates.yaml | 58 +++++++++++++ samples/tasks/contexts/clusters.json | 87 +++++++++++++++++++ samples/tasks/contexts/clusters.yaml | 64 ++++++++++++++ samples/tasks/contexts/dummy-context.json | 24 +++++ samples/tasks/contexts/dummy-context.yaml | 16 ++++ samples/tasks/contexts/ec2-servers.json | 29 +++++++ samples/tasks/contexts/ec2-servers.yaml | 19 ++++ samples/tasks/contexts/existing-network.json | 21 +++++ samples/tasks/contexts/existing-network.yaml | 14 +++ samples/tasks/contexts/flavors.json | 26 ++++++ samples/tasks/contexts/flavors.yaml | 17 ++++ samples/tasks/contexts/heat-dataplane.json | 40 +++++++++ samples/tasks/contexts/heat-dataplane.yaml | 30 +++++++ .../contexts/image-command-customizer.json | 32 +++++++ .../contexts/image-command-customizer.yaml | 25 ++++++ samples/tasks/contexts/images.json | 26 ++++++ samples/tasks/contexts/images.yaml | 18 ++++ samples/tasks/contexts/keypair.json | 21 +++++ samples/tasks/contexts/keypair.yaml | 14 +++ samples/tasks/contexts/lbaas.json | 45 ++++++++++ samples/tasks/contexts/lbaas.yaml | 30 +++++++ .../contexts/manila-security-services.json | 60 +++++++++++++ .../contexts/manila-security-services.yaml | 42 +++++++++ .../tasks/contexts/manila-share-networks.json | 41 +++++++++ .../tasks/contexts/manila-share-networks.yaml | 27 ++++++ samples/tasks/contexts/manila-shares.json | 41 +++++++++ samples/tasks/contexts/manila-shares.yaml | 27 ++++++ samples/tasks/contexts/monasca-metrics.json | 32 +++++++ samples/tasks/contexts/monasca-metrics.yaml | 22 +++++ .../tasks/contexts/murano-environments.json | 23 +++++ .../tasks/contexts/murano-environments.yaml | 15 ++++ samples/tasks/contexts/murano-packages.json | 44 ++++++++++ samples/tasks/contexts/murano-packages.yaml | 32 +++++++ samples/tasks/contexts/network.json | 44 ++++++++++ samples/tasks/contexts/network.yaml | 32 +++++++ samples/tasks/contexts/profiles.json | 32 +++++++ samples/tasks/contexts/profiles.yaml | 22 +++++ samples/tasks/contexts/quotas.json | 46 ++++++++++ samples/tasks/contexts/quotas.yaml | 30 +++++++ samples/tasks/contexts/roles.json | 21 +++++ samples/tasks/contexts/roles.yaml | 15 ++++ samples/tasks/contexts/sahara-cluster.json | 29 +++++++ samples/tasks/contexts/sahara-cluster.yaml | 21 +++++ samples/tasks/contexts/sahara-image.json | 27 ++++++ samples/tasks/contexts/sahara-image.yaml | 19 ++++ .../contexts/sahara-input-data-sources.json | 29 +++++++ .../contexts/sahara-input-data-sources.yaml | 20 +++++ .../tasks/contexts/sahara-job-binaries.json | 54 ++++++++++++ .../tasks/contexts/sahara-job-binaries.yaml | 40 +++++++++ .../contexts/sahara-output-data-sources.json | 29 +++++++ .../contexts/sahara-output-data-sources.yaml | 20 +++++ samples/tasks/contexts/servers.json | 30 +++++++ samples/tasks/contexts/servers.yaml | 20 +++++ samples/tasks/contexts/stacks.json | 24 +++++ samples/tasks/contexts/stacks.yaml | 16 ++++ samples/tasks/contexts/swift-objects.json | 28 ++++++ samples/tasks/contexts/swift-objects.yaml | 19 ++++ samples/tasks/contexts/users.json | 40 +++++++++ samples/tasks/contexts/users.yaml | 28 ++++++ samples/tasks/contexts/volume-types.json | 21 +++++ samples/tasks/contexts/volume-types.yaml | 15 ++++ samples/tasks/contexts/volumes.json | 24 +++++ samples/tasks/contexts/volumes.yaml | 16 ++++ samples/tasks/contexts/zones.json | 23 +++++ samples/tasks/contexts/zones.yaml | 15 ++++ tests/unit/doc/test_task_samples.py | 25 +++++- 75 files changed, 2222 insertions(+), 4 deletions(-) create mode 100644 samples/tasks/contexts/allow-ssh.json create mode 100644 samples/tasks/contexts/allow-ssh.yaml create mode 100644 samples/tasks/contexts/api-versions.json create mode 100644 samples/tasks/contexts/api-versions.yaml create mode 100644 samples/tasks/contexts/audit-templates.json create mode 100644 samples/tasks/contexts/audit-templates.yaml create mode 100644 samples/tasks/contexts/ceilometer.json create mode 100644 samples/tasks/contexts/ceilometer.yaml create mode 100644 samples/tasks/contexts/cluster-templates.json create mode 100644 samples/tasks/contexts/cluster-templates.yaml create mode 100644 samples/tasks/contexts/clusters.json create mode 100644 samples/tasks/contexts/clusters.yaml create mode 100644 samples/tasks/contexts/dummy-context.json create mode 100644 samples/tasks/contexts/dummy-context.yaml create mode 100644 samples/tasks/contexts/ec2-servers.json create mode 100644 samples/tasks/contexts/ec2-servers.yaml create mode 100644 samples/tasks/contexts/existing-network.json create mode 100644 samples/tasks/contexts/existing-network.yaml create mode 100644 samples/tasks/contexts/flavors.json create mode 100644 samples/tasks/contexts/flavors.yaml create mode 100644 samples/tasks/contexts/heat-dataplane.json create mode 100644 samples/tasks/contexts/heat-dataplane.yaml create mode 100644 samples/tasks/contexts/image-command-customizer.json create mode 100644 samples/tasks/contexts/image-command-customizer.yaml create mode 100644 samples/tasks/contexts/images.json create mode 100644 samples/tasks/contexts/images.yaml create mode 100644 samples/tasks/contexts/keypair.json create mode 100644 samples/tasks/contexts/keypair.yaml create mode 100644 samples/tasks/contexts/lbaas.json create mode 100644 samples/tasks/contexts/lbaas.yaml create mode 100644 samples/tasks/contexts/manila-security-services.json create mode 100644 samples/tasks/contexts/manila-security-services.yaml create mode 100644 samples/tasks/contexts/manila-share-networks.json create mode 100644 samples/tasks/contexts/manila-share-networks.yaml create mode 100644 samples/tasks/contexts/manila-shares.json create mode 100644 samples/tasks/contexts/manila-shares.yaml create mode 100644 samples/tasks/contexts/monasca-metrics.json create mode 100644 samples/tasks/contexts/monasca-metrics.yaml create mode 100644 samples/tasks/contexts/murano-environments.json create mode 100644 samples/tasks/contexts/murano-environments.yaml create mode 100644 samples/tasks/contexts/murano-packages.json create mode 100644 samples/tasks/contexts/murano-packages.yaml create mode 100644 samples/tasks/contexts/network.json create mode 100644 samples/tasks/contexts/network.yaml create mode 100644 samples/tasks/contexts/profiles.json create mode 100644 samples/tasks/contexts/profiles.yaml create mode 100644 samples/tasks/contexts/quotas.json create mode 100644 samples/tasks/contexts/quotas.yaml create mode 100644 samples/tasks/contexts/roles.json create mode 100644 samples/tasks/contexts/roles.yaml create mode 100644 samples/tasks/contexts/sahara-cluster.json create mode 100644 samples/tasks/contexts/sahara-cluster.yaml create mode 100644 samples/tasks/contexts/sahara-image.json create mode 100644 samples/tasks/contexts/sahara-image.yaml create mode 100644 samples/tasks/contexts/sahara-input-data-sources.json create mode 100644 samples/tasks/contexts/sahara-input-data-sources.yaml create mode 100644 samples/tasks/contexts/sahara-job-binaries.json create mode 100644 samples/tasks/contexts/sahara-job-binaries.yaml create mode 100644 samples/tasks/contexts/sahara-output-data-sources.json create mode 100644 samples/tasks/contexts/sahara-output-data-sources.yaml create mode 100644 samples/tasks/contexts/servers.json create mode 100644 samples/tasks/contexts/servers.yaml create mode 100644 samples/tasks/contexts/stacks.json create mode 100644 samples/tasks/contexts/stacks.yaml create mode 100644 samples/tasks/contexts/swift-objects.json create mode 100644 samples/tasks/contexts/swift-objects.yaml create mode 100644 samples/tasks/contexts/users.json create mode 100644 samples/tasks/contexts/users.yaml create mode 100644 samples/tasks/contexts/volume-types.json create mode 100644 samples/tasks/contexts/volume-types.yaml create mode 100644 samples/tasks/contexts/volumes.json create mode 100644 samples/tasks/contexts/volumes.yaml create mode 100644 samples/tasks/contexts/zones.json create mode 100644 samples/tasks/contexts/zones.yaml diff --git a/samples/tasks/contexts/allow-ssh.json b/samples/tasks/contexts/allow-ssh.json new file mode 100644 index 00000000..e5a24de2 --- /dev/null +++ b/samples/tasks/contexts/allow-ssh.json @@ -0,0 +1,21 @@ +{ + "Dummy.openstack": [ + { + "args": { + "sleep": 0.1 + }, + "runner": { + "type": "constant", + "times": 4, + "concurrency": 2 + }, + "context": { + "users": { + "tenants": 1, + "users_per_tenant": 2 + }, + "allow_ssh": null + } + } + ] +} diff --git a/samples/tasks/contexts/allow-ssh.yaml b/samples/tasks/contexts/allow-ssh.yaml new file mode 100644 index 00000000..8b190cd8 --- /dev/null +++ b/samples/tasks/contexts/allow-ssh.yaml @@ -0,0 +1,14 @@ +--- + Dummy.openstack: + - + args: + sleep: 0.1 + runner: + type: "constant" + times: 4 + concurrency: 2 + context: + users: + tenants: 1 + users_per_tenant: 2 + allow_ssh: null diff --git a/samples/tasks/contexts/api-versions.json b/samples/tasks/contexts/api-versions.json new file mode 100644 index 00000000..095681ca --- /dev/null +++ b/samples/tasks/contexts/api-versions.json @@ -0,0 +1,29 @@ +{ + "Dummy.openstack": [ + { + "args": { + "sleep": 0.1 + }, + "runner": { + "type": "constant", + "times": 4, + "concurrency": 2 + }, + "context": { + "users": { + "tenants": 1, + "users_per_tenant": 2 + }, + "api_versions": { + "nova": { + "version": 2.2 + }, + "cinder": { + "version": 2, + "service_type": "volumev2" + } + } + } + } + ] +} diff --git a/samples/tasks/contexts/api-versions.yaml b/samples/tasks/contexts/api-versions.yaml new file mode 100644 index 00000000..b68c403a --- /dev/null +++ b/samples/tasks/contexts/api-versions.yaml @@ -0,0 +1,19 @@ +--- + Dummy.openstack: + - + args: + sleep: 0.1 + runner: + type: "constant" + times: 4 + concurrency: 2 + context: + users: + tenants: 1 + users_per_tenant: 2 + api_versions: + nova: + version: 2.2 + cinder: + version: 2 + service_type: "volumev2" \ No newline at end of file diff --git a/samples/tasks/contexts/audit-templates.json b/samples/tasks/contexts/audit-templates.json new file mode 100644 index 00000000..b9e8b980 --- /dev/null +++ b/samples/tasks/contexts/audit-templates.json @@ -0,0 +1,38 @@ +{ + "Dummy.openstack": [ + { + "args": { + "sleep": 0.1 + }, + "runner": { + "type": "constant", + "times": 4, + "concurrency": 2 + }, + "context": { + "audit_templates": { + "audit_templates_per_admin": 5, + "fill_strategy": "random", + "params": [ + { + "goal": { + "name": "workload_balancing" + }, + "strategy": { + "name": "workload_stabilization" + } + }, + { + "goal": { + "name": "dummy" + }, + "strategy": { + "name": "dummy" + } + } + ] + } + } + } + ] +} diff --git a/samples/tasks/contexts/audit-templates.yaml b/samples/tasks/contexts/audit-templates.yaml new file mode 100644 index 00000000..05c2e2a8 --- /dev/null +++ b/samples/tasks/contexts/audit-templates.yaml @@ -0,0 +1,22 @@ +--- + Dummy.openstack: + - + args: + sleep: 0.1 + runner: + type: "constant" + times: 4 + concurrency: 2 + context: + audit_templates: + audit_templates_per_admin: 5 + fill_strategy: "random" + params: + - goal: + name: "workload_balancing" + strategy: + name: "workload_stabilization" + - goal: + name: "dummy" + strategy: + name: "dummy" diff --git a/samples/tasks/contexts/ceilometer.json b/samples/tasks/contexts/ceilometer.json new file mode 100644 index 00000000..c3991d73 --- /dev/null +++ b/samples/tasks/contexts/ceilometer.json @@ -0,0 +1,38 @@ +{ + "Dummy.openstack": [ + { + "args": { + "sleep": 0.1 + }, + "runner": { + "type": "constant", + "times": 4, + "concurrency": 2 + }, + "context": { + "users": { + "tenants": 1, + "users_per_tenant": 2 + }, + "ceilometer": { + "counter_name": "cpu_util", + "counter_type": "gauge", + "counter_unit": "instance", + "counter_volume": 1.0, + "resources_per_tenant": 100, + "samples_per_resource": 100, + "timestamp_interval": 60, + "metadata_list": [ + {"status": "active", "name": "fake_resource", + "deleted": "False", + "created_at": "2015-09-04T12:34:19.000000"}, + {"status": "not_active", "name": "fake_resource_1", + "deleted": "False", + "created_at": "2015-09-10T06:55:12.000000"} + ], + "batch_size": 5 + } + } + } + ] +} diff --git a/samples/tasks/contexts/ceilometer.yaml b/samples/tasks/contexts/ceilometer.yaml new file mode 100644 index 00000000..22a6128c --- /dev/null +++ b/samples/tasks/contexts/ceilometer.yaml @@ -0,0 +1,31 @@ +--- + Dummy.openstack: + - + args: + sleep: 0.1 + runner: + type: "constant" + times: 4 + concurrency: 2 + context: + users: + tenants: 1 + users_per_tenant: 2 + ceilometer: + counter_name: "cpu_util" + counter_type: "gauge" + counter_unit: "instance" + counter_volume: 1.0 + resources_per_tenant: 100 + samples_per_resource: 100 + timestamp_interval: 60 + metadata_list: + - status: "active" + name: "fake_resource" + deleted: "False" + created_at: "2015-09-04T12:34:19.000000" + - status: "not_active" + name: "fake_resource_1" + deleted: "False" + created_at: "2015-09-10T06:55:12.000000" + batch_size: 5 \ No newline at end of file diff --git a/samples/tasks/contexts/cluster-templates.json b/samples/tasks/contexts/cluster-templates.json new file mode 100644 index 00000000..4594749a --- /dev/null +++ b/samples/tasks/contexts/cluster-templates.json @@ -0,0 +1,78 @@ +{ + "Dummy.openstack": [ + { + "args": { + "sleep": 0.1 + }, + "runner": { + "type": "constant", + "concurrency": 1, + "times": 1 + }, + "context": { + "cluster_templates": { + "dns_nameserver": "8.8.8.8", + "external_network_id": "public", + "flavor_id": "m1.small", + "docker_volume_size": 5, + "coe": "kubernetes", + "image_id": "fedora-atomic-latest", + "network_driver": "flannel" + }, + "users": { + "users_per_tenant": 1, + "tenants": 1 + } + } + }, + { + "args": { + "sleep": 0.1 + }, + "runner": { + "type": "constant", + "concurrency": 1, + "times": 1 + }, + "context": { + "cluster_templates": { + "dns_nameserver": "8.8.8.8", + "external_network_id": "public", + "flavor_id": "m1.small", + "docker_volume_size": 5, + "coe": "swarm", + "image_id": "fedora-atomic-latest", + "network_driver": "docker" + }, + "users": { + "users_per_tenant": 1, + "tenants": 1 + } + } + }, + { + "args": { + "sleep": 0.1 + }, + "runner": { + "type": "constant", + "concurrency": 1, + "times": 1 + }, + "context": { + "cluster_templates": { + "dns_nameserver": "8.8.8.8", + "external_network_id": "public", + "flavor_id": "m1.small", + "coe": "mesos", + "image_id": "ubuntu-mesos", + "network_driver": "docker" + }, + "users": { + "users_per_tenant": 1, + "tenants": 1 + } + } + } + ] +} diff --git a/samples/tasks/contexts/cluster-templates.yaml b/samples/tasks/contexts/cluster-templates.yaml new file mode 100644 index 00000000..16ccc4cf --- /dev/null +++ b/samples/tasks/contexts/cluster-templates.yaml @@ -0,0 +1,58 @@ +--- + Dummy.openstack: + - + args: + sleep: 0.1 + runner: + type: "constant" + times: 1 + concurrency: 1 + context: + users: + tenants: 1 + users_per_tenant: 1 + cluster_templates: + image_id: "fedora-atomic-latest" + external_network_id: "public" + dns_nameserver: "8.8.8.8" + flavor_id: "m1.small" + docker_volume_size: 5 + network_driver: "flannel" + coe: "kubernetes" + - + args: + sleep: 0.1 + runner: + type: "constant" + times: 1 + concurrency: 1 + context: + users: + tenants: 1 + users_per_tenant: 1 + cluster_templates: + image_id: "fedora-atomic-latest" + external_network_id: "public" + dns_nameserver: "8.8.8.8" + flavor_id: "m1.small" + docker_volume_size: 5 + network_driver: "docker" + coe: "swarm" + - + args: + sleep: 0.1 + runner: + type: "constant" + times: 1 + concurrency: 1 + context: + users: + tenants: 1 + users_per_tenant: 1 + cluster_templates: + image_id: "ubuntu-mesos" + external_network_id: "public" + dns_nameserver: "8.8.8.8" + flavor_id: "m1.small" + network_driver: "docker" + coe: "mesos" diff --git a/samples/tasks/contexts/clusters.json b/samples/tasks/contexts/clusters.json new file mode 100644 index 00000000..b9c271e5 --- /dev/null +++ b/samples/tasks/contexts/clusters.json @@ -0,0 +1,87 @@ +{ + "Dummy.openstack": [ + { + "args": { + "sleep": 0.1 + }, + "runner": { + "type": "constant", + "concurrency": 1, + "times": 1 + }, + "context": { + "clusters": { + "node_count": 2 + }, + "cluster_templates": { + "dns_nameserver": "8.8.8.8", + "external_network_id": "public", + "flavor_id": "m1.small", + "docker_volume_size": 5, + "coe": "kubernetes", + "image_id": "fedora-atomic-latest", + "network_driver": "flannel" + }, + "users": { + "users_per_tenant": 1, + "tenants": 1 + } + } + }, + { + "args": { + "sleep": 0.1 + }, + "runner": { + "type": "constant", + "concurrency": 1, + "times": 1 + }, + "context": { + "clusters": { + "node_count": 2 + }, + "cluster_templates": { + "dns_nameserver": "8.8.8.8", + "external_network_id": "public", + "flavor_id": "m1.small", + "docker_volume_size": 5, + "coe": "swarm", + "image_id": "fedora-atomic-latest", + "network_driver": "docker" + }, + "users": { + "users_per_tenant": 1, + "tenants": 1 + } + } + }, + { + "args": { + "sleep": 0.1 + }, + "runner": { + "type": "constant", + "concurrency": 1, + "times": 1 + }, + "context": { + "clusters": { + "node_count": 2 + }, + "cluster_templates": { + "dns_nameserver": "8.8.8.8", + "external_network_id": "public", + "flavor_id": "m1.small", + "coe": "mesos", + "image_id": "ubuntu-mesos", + "network_driver": "docker" + }, + "users": { + "users_per_tenant": 1, + "tenants": 1 + } + } + } + ] +} diff --git a/samples/tasks/contexts/clusters.yaml b/samples/tasks/contexts/clusters.yaml new file mode 100644 index 00000000..07bac0ca --- /dev/null +++ b/samples/tasks/contexts/clusters.yaml @@ -0,0 +1,64 @@ +--- + Dummy.openstack: + - + args: + sleep: 0.1 + runner: + type: "constant" + times: 1 + concurrency: 1 + context: + users: + tenants: 1 + users_per_tenant: 1 + cluster_templates: + image_id: "fedora-atomic-latest" + external_network_id: "public" + dns_nameserver: "8.8.8.8" + flavor_id: "m1.small" + docker_volume_size: 5 + network_driver: "flannel" + coe: "kubernetes" + clusters: + node_count: 2 + - + args: + sleep: 0.1 + runner: + type: "constant" + times: 1 + concurrency: 1 + context: + users: + tenants: 1 + users_per_tenant: 1 + cluster_templates: + image_id: "fedora-atomic-latest" + external_network_id: "public" + dns_nameserver: "8.8.8.8" + flavor_id: "m1.small" + docker_volume_size: 5 + network_driver: "docker" + coe: "swarm" + clusters: + node_count: 2 + - + args: + sleep: 0.1 + runner: + type: "constant" + times: 1 + concurrency: 1 + context: + users: + tenants: 1 + users_per_tenant: 1 + cluster_templates: + image_id: "ubuntu-mesos" + external_network_id: "public" + dns_nameserver: "8.8.8.8" + flavor_id: "m1.small" + network_driver: "docker" + coe: "mesos" + clusters: + node_count: 2 diff --git a/samples/tasks/contexts/dummy-context.json b/samples/tasks/contexts/dummy-context.json new file mode 100644 index 00000000..4ebdc3f3 --- /dev/null +++ b/samples/tasks/contexts/dummy-context.json @@ -0,0 +1,24 @@ +{ + "Dummy.openstack": [ + { + "args": { + "sleep": 0.1 + }, + "runner": { + "type": "constant", + "times": 4, + "concurrency": 2 + }, + "context": { + "users": { + "tenants": 1, + "users_per_tenant": 2 + }, + "dummy_context": { + "fail_setup": false, + "fail_cleanup": false + } + } + } + ] +} diff --git a/samples/tasks/contexts/dummy-context.yaml b/samples/tasks/contexts/dummy-context.yaml new file mode 100644 index 00000000..7ab64cc1 --- /dev/null +++ b/samples/tasks/contexts/dummy-context.yaml @@ -0,0 +1,16 @@ +--- + Dummy.openstack: + - + args: + sleep: 0.1 + runner: + type: "constant" + times: 4 + concurrency: 2 + context: + users: + tenants: 1 + users_per_tenant: 2 + dummy_context: + fail_setup: false + fail_cleanup: false \ No newline at end of file diff --git a/samples/tasks/contexts/ec2-servers.json b/samples/tasks/contexts/ec2-servers.json new file mode 100644 index 00000000..c55a4a1d --- /dev/null +++ b/samples/tasks/contexts/ec2-servers.json @@ -0,0 +1,29 @@ +{ + "Dummy.openstack": [ + { + "args": { + "sleep": 0.1 + }, + "runner": { + "type": "constant", + "times": 4, + "concurrency": 2 + }, + "context": { + "users": { + "tenants": 1, + "users_per_tenant": 2 + }, + "ec2_servers": { + "flavor": { + "name": "m1.tiny" + }, + "image": { + "name": "^cirros.*-disk$" + }, + "servers_per_tenant": 2 + } + } + } + ] +} diff --git a/samples/tasks/contexts/ec2-servers.yaml b/samples/tasks/contexts/ec2-servers.yaml new file mode 100644 index 00000000..376b9442 --- /dev/null +++ b/samples/tasks/contexts/ec2-servers.yaml @@ -0,0 +1,19 @@ +--- + Dummy.openstack: + - + args: + sleep: 0.1 + runner: + type: "constant" + times: 4 + concurrency: 2 + context: + users: + tenants: 1 + users_per_tenant: 2 + ec2_servers: + flavor: + name: "m1.tiny" + image: + name: "^cirros.*-disk$" + servers_per_tenant: 2 diff --git a/samples/tasks/contexts/existing-network.json b/samples/tasks/contexts/existing-network.json new file mode 100644 index 00000000..abbc70a1 --- /dev/null +++ b/samples/tasks/contexts/existing-network.json @@ -0,0 +1,21 @@ +{ + "Dummy.openstack": [ + { + "args": { + "sleep": 0.1 + }, + "runner": { + "type": "constant", + "times": 4, + "concurrency": 2 + }, + "context": { + "users": { + "tenants": 1, + "users_per_tenant": 2 + }, + "existing_network": {} + } + } + ] +} diff --git a/samples/tasks/contexts/existing-network.yaml b/samples/tasks/contexts/existing-network.yaml new file mode 100644 index 00000000..13831066 --- /dev/null +++ b/samples/tasks/contexts/existing-network.yaml @@ -0,0 +1,14 @@ +--- + Dummy.openstack: + - + args: + sleep: 0.1 + runner: + type: "constant" + times: 4 + concurrency: 2 + context: + users: + tenants: 1 + users_per_tenant: 2 + existing_network: {} \ No newline at end of file diff --git a/samples/tasks/contexts/flavors.json b/samples/tasks/contexts/flavors.json new file mode 100644 index 00000000..c398a29c --- /dev/null +++ b/samples/tasks/contexts/flavors.json @@ -0,0 +1,26 @@ +{ + "Dummy.openstack": [ + { + "args": { + "sleep": 0.1 + }, + "runner": { + "type": "constant", + "times": 4, + "concurrency": 2 + }, + "context": { + "users": { + "tenants": 1, + "users_per_tenant": 2 + }, + "flavors": [ + { + "name": "ram64", + "ram": 64 + } + ] + } + } + ] +} diff --git a/samples/tasks/contexts/flavors.yaml b/samples/tasks/contexts/flavors.yaml new file mode 100644 index 00000000..dc680435 --- /dev/null +++ b/samples/tasks/contexts/flavors.yaml @@ -0,0 +1,17 @@ +--- + Dummy.openstack: + - + args: + sleep: 0.1 + runner: + type: "constant" + times: 4 + concurrency: 2 + context: + users: + tenants: 1 + users_per_tenant: 2 + flavors: + - + name: "ram64" + ram: 64 \ No newline at end of file diff --git a/samples/tasks/contexts/heat-dataplane.json b/samples/tasks/contexts/heat-dataplane.json new file mode 100644 index 00000000..38a0bd6b --- /dev/null +++ b/samples/tasks/contexts/heat-dataplane.json @@ -0,0 +1,40 @@ +{ + "Dummy.openstack": [ + { + "args": { + "sleep": 0.1 + }, + "runner": { + "type": "constant", + "times": 4, + "concurrency": 2 + }, + "context": { + "users": { + "tenants": 1, + "users_per_tenant": 2 + }, + "network": { + "start_cidr": "10.2.0.0/24", + "networks_per_tenant": 1, + "subnets_per_network": 1, + "network_create_args": {}, + "dns_nameservers": ["10.2.0.1"] + }, + "heat_dataplane": { + "stacks_per_tenant": 1, + "template": "samples/tasks/scenarios/heat/templates/resource-group-with-constraint.yaml.template", + "files": { + "file1": "f1.yaml", + "file2": "f2.yaml" + }, + "parameters": { + "count": 40, + "delay": 0.1 + }, + "context_parameters": {} + } + } + } + ] +} diff --git a/samples/tasks/contexts/heat-dataplane.yaml b/samples/tasks/contexts/heat-dataplane.yaml new file mode 100644 index 00000000..9e670690 --- /dev/null +++ b/samples/tasks/contexts/heat-dataplane.yaml @@ -0,0 +1,30 @@ +--- + Dummy.openstack: + - + args: + sleep: 0.1 + runner: + type: "constant" + times: 4 + concurrency: 2 + context: + users: + tenants: 1 + users_per_tenant: 2 + network: + start_cidr: "10.2.0.0/24" + networks_per_tenant: 1 + subnets_per_network: 1 + network_create_args: {} + dns_nameservers: + - "10.2.0.1" + heat_dataplane: + stacks_per_tenant: 1 + template: "samples/tasks/scenarios/heat/templates/resource-group-with-constraint.yaml.template" + files: + file1: "f1.yaml" + file2: "f2.yaml" + parameters: + count: 40 + delay: 0.1 + context_parameters: {} \ No newline at end of file diff --git a/samples/tasks/contexts/image-command-customizer.json b/samples/tasks/contexts/image-command-customizer.json new file mode 100644 index 00000000..7748139e --- /dev/null +++ b/samples/tasks/contexts/image-command-customizer.json @@ -0,0 +1,32 @@ +{ + "Dummy.openstack": [ + { + "args": { + "sleep": 0.1 + }, + "runner": { + "type": "constant", + "times": 1, + "concurrency": 1, + "timeout": 3000 + }, + "context": { + "users": { + "tenants": 1, + "users_per_tenant": 1 + }, + "image_command_customizer": { + "image": {"name": "Fedora-x86_64-20-20140618-sda"}, + "flavor": {"name": "m1.small"}, + "command": { + "local_path": "rally-jobs/extra/install_benchmark.sh", + "remote_path": "./install_benchmark.sh" + }, + "username": "root", + "userdata": "#cloud-config\ndisable_root: 0\nssh_pwauth: 1" + }, + "network": {} + } + } + ] +} diff --git a/samples/tasks/contexts/image-command-customizer.yaml b/samples/tasks/contexts/image-command-customizer.yaml new file mode 100644 index 00000000..832e037d --- /dev/null +++ b/samples/tasks/contexts/image-command-customizer.yaml @@ -0,0 +1,25 @@ +--- + Dummy.openstack: + - + args: + sleep: 0.1 + runner: + concurrency: 1 + timeout: 3000 + times: 1 + type: "constant" + context: + image_command_customizer: + command: + local_path: "rally-jobs/extra/install_benchmark.sh" + remote_path: "./install_benchmark.sh" + flavor: + name: m1.small + image: + name: "Fedora-x86_64-20-20140618-sda" + userdata: "#cloud-config\ndisable_root: 0\nssh_pwauth: 1" + username: root + network: {} + users: + tenants: 1 + users_per_tenant: 1 diff --git a/samples/tasks/contexts/images.json b/samples/tasks/contexts/images.json new file mode 100644 index 00000000..7a2ec600 --- /dev/null +++ b/samples/tasks/contexts/images.json @@ -0,0 +1,26 @@ +{ + "Dummy.openstack": [ + { + "args": { + "sleep": 0.1 + }, + "runner": { + "type": "constant", + "times": 2, + "concurrency": 1 + }, + "context": { + "users": { + "tenants": 1, + "users_per_tenant": 2 + }, + "images": { + "image_url": "http://download.cirros-cloud.net/0.3.5/cirros-0.3.5-x86_64-disk.img", + "image_type": "qcow2", + "image_container": "bare", + "images_per_tenant": 4 + } + } + } + ] +} diff --git a/samples/tasks/contexts/images.yaml b/samples/tasks/contexts/images.yaml new file mode 100644 index 00000000..3bb9cd37 --- /dev/null +++ b/samples/tasks/contexts/images.yaml @@ -0,0 +1,18 @@ +--- + Dummy.openstack: + - + args: + sleep: 0.1 + runner: + type: "constant" + times: 2 + concurrency: 1 + context: + users: + tenants: 1 + users_per_tenant: 2 + images: + image_url: "http://download.cirros-cloud.net/0.3.5/cirros-0.3.5-x86_64-disk.img" + image_type: "qcow2" + image_container: "bare" + images_per_tenant: 4 diff --git a/samples/tasks/contexts/keypair.json b/samples/tasks/contexts/keypair.json new file mode 100644 index 00000000..66d0f145 --- /dev/null +++ b/samples/tasks/contexts/keypair.json @@ -0,0 +1,21 @@ +{ + "Dummy.openstack": [ + { + "args": { + "sleep": 0.1 + }, + "runner": { + "type": "constant", + "times": 4, + "concurrency": 2 + }, + "context": { + "users": { + "tenants": 1, + "users_per_tenant": 2 + }, + "keypair": {} + } + } + ] +} diff --git a/samples/tasks/contexts/keypair.yaml b/samples/tasks/contexts/keypair.yaml new file mode 100644 index 00000000..3e5cd148 --- /dev/null +++ b/samples/tasks/contexts/keypair.yaml @@ -0,0 +1,14 @@ +--- + Dummy.openstack: + - + args: + sleep: 0.1 + runner: + type: "constant" + times: 4 + concurrency: 2 + context: + users: + tenants: 1 + users_per_tenant: 2 + keypair: {} diff --git a/samples/tasks/contexts/lbaas.json b/samples/tasks/contexts/lbaas.json new file mode 100644 index 00000000..442227ff --- /dev/null +++ b/samples/tasks/contexts/lbaas.json @@ -0,0 +1,45 @@ +{ + "Dummy.openstack": [ + { + "args": { + "sleep": 0.1 + }, + "runner": { + "type": "constant", + "times": 4, + "concurrency": 2 + }, + "context": { + "users": { + "tenants": 1, + "users_per_tenant": 2 + }, + "lbaas": { + "pool": {} + } + } + }, + { + "args": { + "sleep": 0.1 + }, + "runner": { + "type": "constant", + "times": 4, + "concurrency": 2 + }, + "context": { + "users": { + "tenants": 1, + "users_per_tenant": 2 + }, + "lbaas": { + "pool": { + "lb_method": "ROUND_ROBIN", + "protocol": "HTTP" + } + } + } + } + ] +} diff --git a/samples/tasks/contexts/lbaas.yaml b/samples/tasks/contexts/lbaas.yaml new file mode 100644 index 00000000..706fee76 --- /dev/null +++ b/samples/tasks/contexts/lbaas.yaml @@ -0,0 +1,30 @@ +--- + Dummy.openstack: + - + args: + sleep: 0.1 + runner: + type: "constant" + times: 4 + concurrency: 2 + context: + users: + tenants: 1 + users_per_tenant: 2 + lbaas: + pool: {} + - + args: + sleep: 0.1 + runner: + type: "constant" + times: 4 + concurrency: 2 + context: + users: + tenants: 1 + users_per_tenant: 2 + lbaas: + pool: + lb_method: "ROUND_ROBIN" + protocol: "HTTP" diff --git a/samples/tasks/contexts/manila-security-services.json b/samples/tasks/contexts/manila-security-services.json new file mode 100644 index 00000000..1f59fd21 --- /dev/null +++ b/samples/tasks/contexts/manila-security-services.json @@ -0,0 +1,60 @@ +{ + "Dummy.openstack": [ + { + "args": { + "sleep": 0.1 + }, + "runner": { + "type": "constant", + "times": 4, + "concurrency": 2 + }, + "context": { + "quotas": { + "manila": { + "shares": -1, + "gigabytes": -1, + "share_networks": -1 + } + }, + "users": { + "tenants": 1, + "users_per_tenant": 1 + }, + "manila_share_networks": { + "use_share_networks": true + }, + "manila_security_services": { + "security_services": [ + { + "type": "ldap", + "server": "LDAP server address", + "user": "User that will be used", + "password": "Password for specified user" + }, + { + "type": "kerberos", + "dns_ip": "IP address of DNS service to be used", + "server": "Kerberos server address", + "domain": "Kerberos realm", + "user": "User that will be used", + "password": "Password for specified user" + }, + { + "type": "active_directory", + "dns_ip": "IP address of DNS service to be used", + "domain": "Domain from 'Active Directory'", + "user": "User from 'Active Directory'", + "password": "password for specified user" + } + ] + } + }, + "sla": { + "failure_rate": { + "max": 0 + } + } + } + ] +} diff --git a/samples/tasks/contexts/manila-security-services.yaml b/samples/tasks/contexts/manila-security-services.yaml new file mode 100644 index 00000000..8c052563 --- /dev/null +++ b/samples/tasks/contexts/manila-security-services.yaml @@ -0,0 +1,42 @@ +Dummy.openstack: + - + args: + sleep: 0.1 + runner: + type: "constant" + times: 4 + concurrency: 2 + context: + quotas: + manila: + shares: -1 + gigabytes: -1 + share_networks: -1 + users: + tenants: 1 + users_per_tenant: 1 + manila_share_networks: + use_share_networks: True + manila_security_services: + security_services: + - + type: "ldap" + server: "LDAP server address" + user: "User that will be used" + password: "Password for specified user" + - + type: "kerberos" + dns_ip: "IP address of DNS service to be used" + server: "Kerberos server address" + domain: "Kerberos realm" + user: "User that will be used" + password: "Password for specified user" + - + type: "active_directory" + dns_ip: "IP address of DNS service to be used" + domain: "Domain from 'Active Directory'" + user: "User from 'Active Directory'" + password: "password for specified user" + sla: + failure_rate: + max: 0 diff --git a/samples/tasks/contexts/manila-share-networks.json b/samples/tasks/contexts/manila-share-networks.json new file mode 100644 index 00000000..7af9620a --- /dev/null +++ b/samples/tasks/contexts/manila-share-networks.json @@ -0,0 +1,41 @@ +{ + "Dummy.openstack": [ + { + "args": { + "sleep": 0.1 + }, + "runner": { + "type": "constant", + "times": 4, + "concurrency": 2 + }, + "context": { + "quotas": { + "manila": { + "shares": -1, + "gigabytes": -1, + "share_networks": -1 + } + }, + "users": { + "tenants": 1, + "users_per_tenant": 1 + }, + "manila_share_networks": { + "use_share_networks": true + }, + "manila_shares": { + "shares_per_tenant": 1, + "share_proto": "NFS", + "size": 1, + "share_type": "dhss_true" + } + }, + "sla": { + "failure_rate": { + "max": 0 + } + } + } + ] +} diff --git a/samples/tasks/contexts/manila-share-networks.yaml b/samples/tasks/contexts/manila-share-networks.yaml new file mode 100644 index 00000000..d18420b4 --- /dev/null +++ b/samples/tasks/contexts/manila-share-networks.yaml @@ -0,0 +1,27 @@ +Dummy.openstack: + - + args: + sleep: 0.1 + runner: + type: "constant" + times: 4 + concurrency: 2 + context: + quotas: + manila: + shares: -1 + gigabytes: -1 + share_networks: -1 + users: + tenants: 1 + users_per_tenant: 1 + manila_share_networks: + use_share_networks: True + manila_shares: + shares_per_tenant: 1 + share_proto: "NFS" + size: 1 + share_type: "dhss_true" + sla: + failure_rate: + max: 0 \ No newline at end of file diff --git a/samples/tasks/contexts/manila-shares.json b/samples/tasks/contexts/manila-shares.json new file mode 100644 index 00000000..66104c72 --- /dev/null +++ b/samples/tasks/contexts/manila-shares.json @@ -0,0 +1,41 @@ +{ + "Dummy.openstack": [ + { + "args": { + "sleep": 0.1 + }, + "runner": { + "type": "constant", + "times": 4, + "concurrency": 2 + }, + "context": { + "quotas": { + "manila": { + "shares": -1, + "gigabytes": -1, + "share_networks": -1 + } + }, + "users": { + "tenants": 1, + "users_per_tenant": 1 + }, + "manila_share_networks": { + "use_share_networks": true + }, + "manila_shares": { + "shares_per_tenant": 1, + "share_proto": "NFS", + "size": 1, + "share_type": "dhss_true" + } + }, + "sla": { + "failure_rate": { + "max": 0 + } + } + } + ] +} diff --git a/samples/tasks/contexts/manila-shares.yaml b/samples/tasks/contexts/manila-shares.yaml new file mode 100644 index 00000000..d18420b4 --- /dev/null +++ b/samples/tasks/contexts/manila-shares.yaml @@ -0,0 +1,27 @@ +Dummy.openstack: + - + args: + sleep: 0.1 + runner: + type: "constant" + times: 4 + concurrency: 2 + context: + quotas: + manila: + shares: -1 + gigabytes: -1 + share_networks: -1 + users: + tenants: 1 + users_per_tenant: 1 + manila_share_networks: + use_share_networks: True + manila_shares: + shares_per_tenant: 1 + share_proto: "NFS" + size: 1 + share_type: "dhss_true" + sla: + failure_rate: + max: 0 \ No newline at end of file diff --git a/samples/tasks/contexts/monasca-metrics.json b/samples/tasks/contexts/monasca-metrics.json new file mode 100644 index 00000000..a74889e3 --- /dev/null +++ b/samples/tasks/contexts/monasca-metrics.json @@ -0,0 +1,32 @@ +{ + "Dummy.openstack": [ + { + "args": { + "sleep": 0.1 + }, + "runner": { + "type": "constant", + "times": 4, + "concurrency": 2 + }, + "context": { + "users": { + "tenants": 1, + "users_per_tenant": 1 + }, + "roles": [ + "monasca-user" + ], + "monasca_metrics": { + "dimensions": { + "region": "RegionOne", + "service": "identity", + "hostname": "fake_host", + "url": "http://fake_host:5000/v2.0" + }, + "metrics_per_tenant": 10 + } + } + } + ] +} diff --git a/samples/tasks/contexts/monasca-metrics.yaml b/samples/tasks/contexts/monasca-metrics.yaml new file mode 100644 index 00000000..7146c121 --- /dev/null +++ b/samples/tasks/contexts/monasca-metrics.yaml @@ -0,0 +1,22 @@ +--- + Dummy.openstack: + - + args: + sleep: 0.1 + runner: + type: "constant" + times: 4 + concurrency: 2 + context: + users: + tenants: 1 + users_per_tenant: 1 + roles: + - "monasca-user" + monasca_metrics: + dimensions: + region: "RegionOne" + service: "identity" + hostname: "fake_host" + url: "http://fake_host:5000/v2.0" + metrics_per_tenant: 10 diff --git a/samples/tasks/contexts/murano-environments.json b/samples/tasks/contexts/murano-environments.json new file mode 100644 index 00000000..286b33e8 --- /dev/null +++ b/samples/tasks/contexts/murano-environments.json @@ -0,0 +1,23 @@ +{ + "Dummy.openstack": [ + { + "args": { + "sleep": 0.1 + }, + "runner": { + "type": "constant", + "times": 4, + "concurrency": 2 + }, + "context": { + "users": { + "tenants": 2, + "users_per_tenant": 2 + }, + "murano_environments": { + "environments_per_tenant": 2 + } + } + } + ] +} diff --git a/samples/tasks/contexts/murano-environments.yaml b/samples/tasks/contexts/murano-environments.yaml new file mode 100644 index 00000000..cc36e35c --- /dev/null +++ b/samples/tasks/contexts/murano-environments.yaml @@ -0,0 +1,15 @@ +--- + Dummy.openstack: + - + args: + sleep: 0.1 + runner: + type: "constant" + times: 4 + concurrency: 2 + context: + users: + tenants: 2 + users_per_tenant: 2 + murano_environments: + environments_per_tenant: 2 diff --git a/samples/tasks/contexts/murano-packages.json b/samples/tasks/contexts/murano-packages.json new file mode 100644 index 00000000..31f02a81 --- /dev/null +++ b/samples/tasks/contexts/murano-packages.json @@ -0,0 +1,44 @@ +{ + "Dummy.openstack": [ + { + "args": { + "sleep": 0.1 + }, + "runner": { + "type": "constant", + "times": 2, + "concurrency": 2 + }, + "context": { + "users": { + "tenants": 2, + "users_per_tenant": 2 + }, + "murano_packages": { + "app_package": "rally-jobs/extra/murano/applications/HelloReporter/io.murano.apps.HelloReporter.zip" + }, + "roles": ["admin"] + } + }, + { + "args": { + "sleep": 0.1 + }, + "runner": { + "type": "constant", + "times": 2, + "concurrency": 2 + }, + "context": { + "users": { + "tenants": 2, + "users_per_tenant": 2 + }, + "murano_packages": { + "app_package": "rally-jobs/extra/murano/applications/HelloReporter/io.murano.apps.HelloReporter/" + }, + "roles": ["admin"] + } + } + ] +} diff --git a/samples/tasks/contexts/murano-packages.yaml b/samples/tasks/contexts/murano-packages.yaml new file mode 100644 index 00000000..87e5709e --- /dev/null +++ b/samples/tasks/contexts/murano-packages.yaml @@ -0,0 +1,32 @@ +--- + Dummy.openstack: + - + args: + sleep: 0.1 + runner: + type: "constant" + times: 2 + concurrency: 2 + context: + users: + tenants: 2 + users_per_tenant: 2 + murano_packages: + app_package: "rally-jobs/extra/murano/applications/HelloReporter/io.murano.apps.HelloReporter.zip" + roles: + - "admin" + - + args: + sleep: 0.1 + runner: + type: "constant" + times: 2 + concurrency: 2 + context: + users: + tenants: 2 + users_per_tenant: 2 + murano_packages: + app_package: "rally-jobs/extra/murano/applications/HelloReporter/io.murano.apps.HelloReporter/" + roles: + - "admin" diff --git a/samples/tasks/contexts/network.json b/samples/tasks/contexts/network.json new file mode 100644 index 00000000..a28e719a --- /dev/null +++ b/samples/tasks/contexts/network.json @@ -0,0 +1,44 @@ +{ + "Dummy.openstack": [ + { + "args": { + "sleep": 0.1 + }, + "runner": { + "type": "constant", + "times": 4, + "concurrency": 2 + }, + "context": { + "users": { + "tenants": 1, + "users_per_tenant": 2 + }, + "network": {} + } + }, + { + "args": { + "sleep": 0.1 + }, + "runner": { + "type": "constant", + "times": 4, + "concurrency": 2 + }, + "context": { + "users": { + "tenants": 1, + "users_per_tenant": 2 + }, + "network": { + "start_cidr": "10.2.0.0/24", + "networks_per_tenant": 1, + "subnets_per_network": 1, + "network_create_args": {}, + "dns_nameservers": ["10.2.0.1"] + } + } + } + ] +} diff --git a/samples/tasks/contexts/network.yaml b/samples/tasks/contexts/network.yaml new file mode 100644 index 00000000..60c8f67e --- /dev/null +++ b/samples/tasks/contexts/network.yaml @@ -0,0 +1,32 @@ +--- + Dummy.openstack: + - + args: + sleep: 0.1 + runner: + type: "constant" + times: 4 + concurrency: 2 + context: + users: + tenants: 1 + users_per_tenant: 2 + network: {} + - + args: + sleep: 0.1 + runner: + type: "constant" + times: 4 + concurrency: 2 + context: + users: + tenants: 1 + users_per_tenant: 2 + network: + start_cidr: "10.2.0.0/24" + networks_per_tenant: 1 + subnets_per_network: 1 + network_create_args: {} + dns_nameservers: + - "10.2.0.1" \ No newline at end of file diff --git a/samples/tasks/contexts/profiles.json b/samples/tasks/contexts/profiles.json new file mode 100644 index 00000000..1db069af --- /dev/null +++ b/samples/tasks/contexts/profiles.json @@ -0,0 +1,32 @@ +{ + "Dummy.openstack": [ + { + "args": { + "sleep": 0.1 + }, + "runner": { + "type": "constant", + "times": 3, + "concurrency": 1 + }, + "context": { + "users": { + "tenants": 1, + "users_per_tenant": 1 + }, + "profiles": { + "type": "os.nova.server", + "version": "1.0", + "properties": { + "name": "cirros_server", + "flavor": 1, + "image": "cirros-0.3.5-x86_64-disk", + "networks": [ + { "network": "private" } + ] + } + } + } + } + ] +} diff --git a/samples/tasks/contexts/profiles.yaml b/samples/tasks/contexts/profiles.yaml new file mode 100644 index 00000000..48e951a0 --- /dev/null +++ b/samples/tasks/contexts/profiles.yaml @@ -0,0 +1,22 @@ +--- + Dummy.openstack: + - + args: + sleep: 0.1 + runner: + type: "constant" + times: 3 + concurrency: 1 + context: + users: + tenants: 1 + users_per_tenant: 1 + profiles: + type: "os.nova.server" + version: "1.0" + properties: + name: "cirros_server" + flavor: 1 + image: "cirros-0.3.5-x86_64-disk" + networks: + - network: "private" diff --git a/samples/tasks/contexts/quotas.json b/samples/tasks/contexts/quotas.json new file mode 100644 index 00000000..f1aee454 --- /dev/null +++ b/samples/tasks/contexts/quotas.json @@ -0,0 +1,46 @@ +{ + "Dummy.openstack": [ + { + "args": { + "sleep": 0.1 + }, + "runner": { + "type": "constant", + "times": 4, + "concurrency": 2 + }, + "context": { + "users": { + "tenants": 1, + "users_per_tenant": 1 + }, + "quotas": { + "manila": { + "share_networks": -1 + } + } + } + }, + { + "args": { + "sleep": 0.1 + }, + "runner": { + "type": "constant", + "times": 4, + "concurrency": 2 + }, + "context": { + "users": { + "tenants": 1, + "users_per_tenant": 1 + }, + "quotas": { + "cinder": { + "volumes": -1 + } + } + } + } + ] +} diff --git a/samples/tasks/contexts/quotas.yaml b/samples/tasks/contexts/quotas.yaml new file mode 100644 index 00000000..85afcc21 --- /dev/null +++ b/samples/tasks/contexts/quotas.yaml @@ -0,0 +1,30 @@ +--- + Dummy.openstack: + - + args: + sleep: 0.1 + runner: + type: "constant" + times: 4 + concurrency: 2 + context: + users: + tenants: 1 + users_per_tenant: 1 + quotas: + manila: + share_networks: -1 + - + args: + sleep: 0.1 + runner: + type: "constant" + times: 4 + concurrency: 2 + context: + users: + tenants: 1 + users_per_tenant: 1 + quotas: + cinder: + volumes: -1 diff --git a/samples/tasks/contexts/roles.json b/samples/tasks/contexts/roles.json new file mode 100644 index 00000000..0d09cd41 --- /dev/null +++ b/samples/tasks/contexts/roles.json @@ -0,0 +1,21 @@ +{ + "Dummy.openstack": [ + { + "args": { + "sleep": 0.1 + }, + "runner": { + "type": "constant", + "times": 4, + "concurrency": 2 + }, + "context": { + "users": { + "tenants": 1, + "users_per_tenant": 2 + }, + "roles": ["role"] + } + } + ] +} diff --git a/samples/tasks/contexts/roles.yaml b/samples/tasks/contexts/roles.yaml new file mode 100644 index 00000000..32c50488 --- /dev/null +++ b/samples/tasks/contexts/roles.yaml @@ -0,0 +1,15 @@ +--- + Dummy.openstack: + - + args: + sleep: 0.1 + runner: + type: "constant" + times: 4 + concurrency: 2 + context: + users: + tenants: 1 + users_per_tenant: 2 + roles: + - "role" diff --git a/samples/tasks/contexts/sahara-cluster.json b/samples/tasks/contexts/sahara-cluster.json new file mode 100644 index 00000000..5a40ed5f --- /dev/null +++ b/samples/tasks/contexts/sahara-cluster.json @@ -0,0 +1,29 @@ +{ + "Dummy.openstack": [ + { + "args": { + "sleep": 0.1 + }, + "runner": { + "type": "constant", + "times": 4, + "concurrency": 2 + }, + "context": { + "users": { + "tenants": 1, + "users_per_tenant": 1 + }, + "sahara_cluster": { + "master_flavor_id": "4", + "worker_flavor_id": "3", + "workers_count": 3, + "plugin_name": "vanilla", + "hadoop_version": "2.6.0", + "auto_security_group": true + }, + "network": {} + } + } + ] +} \ No newline at end of file diff --git a/samples/tasks/contexts/sahara-cluster.yaml b/samples/tasks/contexts/sahara-cluster.yaml new file mode 100644 index 00000000..68b915d6 --- /dev/null +++ b/samples/tasks/contexts/sahara-cluster.yaml @@ -0,0 +1,21 @@ +--- + Dummy.openstack: + - + args: + sleep: 0.1 + runner: + type: "constant" + times: 4 + concurrency: 2 + context: + users: + tenants: 1 + users_per_tenant: 1 + sahara_cluster: + master_flavor_id: "4" + worker_flavor_id: "3" + workers_count: 3 + plugin_name: "vanilla" + hadoop_version: "2.6.0" + auto_security_group: True + network: {} diff --git a/samples/tasks/contexts/sahara-image.json b/samples/tasks/contexts/sahara-image.json new file mode 100644 index 00000000..da85b6b0 --- /dev/null +++ b/samples/tasks/contexts/sahara-image.json @@ -0,0 +1,27 @@ +{ + "Dummy.openstack": [ + { + "args": { + "sleep": 0.1 + }, + "runner": { + "type": "constant", + "times": 4, + "concurrency": 2 + }, + "context": { + "users": { + "tenants": 1, + "users_per_tenant": 1 + }, + "sahara_image": { + "image_url": "http://sahara-files.mirantis.com/sahara-icehouse-vanilla-2.3.0-ubuntu-13.10.qcow2", + "username": "ubuntu", + "plugin_name": "vanilla", + "hadoop_version": "2.3.0" + }, + "network": {} + } + } + ] +} \ No newline at end of file diff --git a/samples/tasks/contexts/sahara-image.yaml b/samples/tasks/contexts/sahara-image.yaml new file mode 100644 index 00000000..97b01eac --- /dev/null +++ b/samples/tasks/contexts/sahara-image.yaml @@ -0,0 +1,19 @@ +--- + Dummy.openstack: + - + args: + sleep: 0.1 + runner: + type: "constant" + times: 4 + concurrency: 2 + context: + users: + tenants: 1 + users_per_tenant: 1 + sahara_image: + image_url: "http://sahara-files.mirantis.com/sahara-icehouse-vanilla-2.3.0-ubuntu-13.10.qcow2" + username: "ubuntu" + plugin_name: "vanilla" + hadoop_version: "2.3.0" + network: {} diff --git a/samples/tasks/contexts/sahara-input-data-sources.json b/samples/tasks/contexts/sahara-input-data-sources.json new file mode 100644 index 00000000..3bdadce4 --- /dev/null +++ b/samples/tasks/contexts/sahara-input-data-sources.json @@ -0,0 +1,29 @@ +{ + "Dummy.openstack": [ + { + "args": { + "sleep": 0.1 + }, + "runner": { + "type": "constant", + "times": 4, + "concurrency": 2 + }, + "context": { + "users": { + "tenants": 1, + "users_per_tenant": 1 + }, + "sahara_input_data_sources": { + "input_type": "hdfs", + "input_url": "/" + }, + "sahara_output_data_sources": { + "output_type": "hdfs", + "output_url_prefix": "/out_" + }, + "network": {} + } + } + ] +} \ No newline at end of file diff --git a/samples/tasks/contexts/sahara-input-data-sources.yaml b/samples/tasks/contexts/sahara-input-data-sources.yaml new file mode 100644 index 00000000..ed96d811 --- /dev/null +++ b/samples/tasks/contexts/sahara-input-data-sources.yaml @@ -0,0 +1,20 @@ +--- + Dummy.openstack: + - + args: + sleep: 0.1 + runner: + type: "constant" + times: 4 + concurrency: 2 + context: + users: + tenants: 1 + users_per_tenant: 1 + sahara_input_data_sources: + input_type: "hdfs" + input_url: "/" + sahara_output_data_sources: + output_type: "hdfs" + output_url_prefix: "/out_" + network: {} diff --git a/samples/tasks/contexts/sahara-job-binaries.json b/samples/tasks/contexts/sahara-job-binaries.json new file mode 100644 index 00000000..2e175389 --- /dev/null +++ b/samples/tasks/contexts/sahara-job-binaries.json @@ -0,0 +1,54 @@ +{ + "Dummy.openstack": [ + { + "args": { + "sleep": 0.1 + }, + "runner": { + "type": "constant", + "times": 4, + "concurrency": 2 + }, + "context": { + "users": { + "tenants": 1, + "users_per_tenant": 1 + }, + "sahara_job_binaries": { + "libs": [{ + "name": "tests.jar", + "download_url": "http://repo1.maven.org/maven2/org/apache/hadoop/hadoop-hdfs/2.6.0/hadoop-hdfs-2.6.0-tests.jar" + }] + }, + "network": {} + } + }, + { + "args": { + "sleep": 0.1 + }, + "runner": { + "type": "constant", + "times": 4, + "concurrency": 2 + }, + "context": { + "users": { + "tenants": 1, + "users_per_tenant": 1 + }, + "sahara_job_binaries": { + "mains": [{ + "name": "example.pig", + "download_url": "https://raw.githubusercontent.com/openstack/sahara/master/etc/edp-examples/pig-job/example.pig" + }], + "libs": [{ + "name": "udf.jar", + "download_url": "https://github.com/openstack/sahara/blob/master/etc/edp-examples/pig-job/udf.jar?raw=true" + }] + }, + "network": {} + } + } + ] +} diff --git a/samples/tasks/contexts/sahara-job-binaries.yaml b/samples/tasks/contexts/sahara-job-binaries.yaml new file mode 100644 index 00000000..47cdf97b --- /dev/null +++ b/samples/tasks/contexts/sahara-job-binaries.yaml @@ -0,0 +1,40 @@ +--- + Dummy.openstack: + - + args: + sleep: 0.1 + runner: + type: "constant" + times: 4 + concurrency: 2 + context: + users: + tenants: 1 + users_per_tenant: 1 + sahara_job_binaries: + libs: + - + name: "tests.jar" + download_url: "http://repo1.maven.org/maven2/org/apache/hadoop/hadoop-hdfs/2.6.0/hadoop-hdfs-2.6.0-tests.jar" + network: {} + - + args: + sleep: 0.1 + runner: + type: "constant" + times: 4 + concurrency: 2 + context: + users: + tenants: 1 + users_per_tenant: 1 + sahara_job_binaries: + mains: + - + name: "example.pig" + download_url: "https://raw.githubusercontent.com/openstack/sahara/master/etc/edp-examples/pig-job/example.pig" + libs: + - + name: "udf.jar" + download_url: "https://github.com/openstack/sahara/blob/master/etc/edp-examples/pig-job/udf.jar?raw=true" + network: {} diff --git a/samples/tasks/contexts/sahara-output-data-sources.json b/samples/tasks/contexts/sahara-output-data-sources.json new file mode 100644 index 00000000..3bdadce4 --- /dev/null +++ b/samples/tasks/contexts/sahara-output-data-sources.json @@ -0,0 +1,29 @@ +{ + "Dummy.openstack": [ + { + "args": { + "sleep": 0.1 + }, + "runner": { + "type": "constant", + "times": 4, + "concurrency": 2 + }, + "context": { + "users": { + "tenants": 1, + "users_per_tenant": 1 + }, + "sahara_input_data_sources": { + "input_type": "hdfs", + "input_url": "/" + }, + "sahara_output_data_sources": { + "output_type": "hdfs", + "output_url_prefix": "/out_" + }, + "network": {} + } + } + ] +} \ No newline at end of file diff --git a/samples/tasks/contexts/sahara-output-data-sources.yaml b/samples/tasks/contexts/sahara-output-data-sources.yaml new file mode 100644 index 00000000..ed96d811 --- /dev/null +++ b/samples/tasks/contexts/sahara-output-data-sources.yaml @@ -0,0 +1,20 @@ +--- + Dummy.openstack: + - + args: + sleep: 0.1 + runner: + type: "constant" + times: 4 + concurrency: 2 + context: + users: + tenants: 1 + users_per_tenant: 1 + sahara_input_data_sources: + input_type: "hdfs" + input_url: "/" + sahara_output_data_sources: + output_type: "hdfs" + output_url_prefix: "/out_" + network: {} diff --git a/samples/tasks/contexts/servers.json b/samples/tasks/contexts/servers.json new file mode 100644 index 00000000..262e524c --- /dev/null +++ b/samples/tasks/contexts/servers.json @@ -0,0 +1,30 @@ +{% set flavor_name = flavor_name or "m1.tiny" %} +{ + "Dummy.openstack": [ + { + "args": { + "sleep": 0.1 + }, + "runner": { + "type": "constant", + "times": 1, + "concurrency": 1 + }, + "context": { + "users": { + "tenants": 1, + "users_per_tenant": 2 + }, + "servers": { + "flavor": { + "name": "{{flavor_name}}" + }, + "image": { + "name": "^cirros.*-disk$" + }, + "servers_per_tenant": 2 + } + } + } + ] +} diff --git a/samples/tasks/contexts/servers.yaml b/samples/tasks/contexts/servers.yaml new file mode 100644 index 00000000..0365cf16 --- /dev/null +++ b/samples/tasks/contexts/servers.yaml @@ -0,0 +1,20 @@ +{% set flavor_name = flavor_name or "m1.tiny" %} +--- + Dummy.openstack: + - + args: + sleep: 0.1 + runner: + type: "constant" + times: 1 + concurrency: 1 + context: + users: + tenants: 1 + users_per_tenant: 2 + servers: + flavor: + name: "{{flavor_name}}" + image: + name: "^cirros.*-disk$" + servers_per_tenant: 2 \ No newline at end of file diff --git a/samples/tasks/contexts/stacks.json b/samples/tasks/contexts/stacks.json new file mode 100644 index 00000000..0ddc8d2f --- /dev/null +++ b/samples/tasks/contexts/stacks.json @@ -0,0 +1,24 @@ +{ + "Dummy.openstack": [ + { + "args": { + "sleep": 0.1 + }, + "runner": { + "type": "constant", + "times": 4, + "concurrency": 1 + }, + "context": { + "users": { + "tenants": 1, + "users_per_tenant": 1 + }, + "stacks": { + "stacks_per_tenant": 2, + "resources_per_stack": 10 + } + } + } + ] +} diff --git a/samples/tasks/contexts/stacks.yaml b/samples/tasks/contexts/stacks.yaml new file mode 100644 index 00000000..0080eb92 --- /dev/null +++ b/samples/tasks/contexts/stacks.yaml @@ -0,0 +1,16 @@ +--- + Dummy.openstack: + - + args: + sleep: 0.1 + runner: + type: "constant" + times: 4 + concurrency: 1 + context: + users: + tenants: 1 + users_per_tenant: 1 + stacks: + stacks_per_tenant: 2 + resources_per_stack: 10 \ No newline at end of file diff --git a/samples/tasks/contexts/swift-objects.json b/samples/tasks/contexts/swift-objects.json new file mode 100644 index 00000000..546f5a44 --- /dev/null +++ b/samples/tasks/contexts/swift-objects.json @@ -0,0 +1,28 @@ +{ + "Dummy.openstack": [ + { + "args": { + "sleep": 0.1 + }, + "runner": { + "type": "constant", + "times": 6, + "concurrency": 3 + }, + "context": { + "users": { + "tenants": 1, + "users_per_tenant": 1 + }, + "roles": [ + "admin" + ], + "swift_objects": { + "containers_per_tenant": 1, + "objects_per_container": 10, + "object_size": 1024 + } + } + } + ] +} diff --git a/samples/tasks/contexts/swift-objects.yaml b/samples/tasks/contexts/swift-objects.yaml new file mode 100644 index 00000000..23fe6380 --- /dev/null +++ b/samples/tasks/contexts/swift-objects.yaml @@ -0,0 +1,19 @@ +--- + Dummy.openstack: + - + args: + sleep: 0.1 + runner: + type: "constant" + times: 6 + concurrency: 3 + context: + users: + tenants: 1 + users_per_tenant: 1 + roles: + - "admin" + swift_objects: + containers_per_tenant: 1 + objects_per_container: 10 + object_size: 1024 diff --git a/samples/tasks/contexts/users.json b/samples/tasks/contexts/users.json new file mode 100644 index 00000000..108f3d44 --- /dev/null +++ b/samples/tasks/contexts/users.json @@ -0,0 +1,40 @@ +{ + "Dummy.openstack": [ + { + "args": { + "sleep": 0.1 + }, + "runner": { + "type": "constant", + "times": 4, + "concurrency": 2 + }, + "context": { + "users": { + "tenants": 1, + "users_per_tenant": 2 + } + } + }, + { + "args": { + "sleep": 0.1 + }, + "runner": { + "type": "constant", + "times": 4, + "concurrency": 2 + }, + "context": { + "users": { + "tenants": 1, + "users_per_tenant": 2, + "resource_management_workers": 1, + "project_domain": "project", + "user_domain": "demo", + "user_choice_method": "random" + } + } + } + ] +} diff --git a/samples/tasks/contexts/users.yaml b/samples/tasks/contexts/users.yaml new file mode 100644 index 00000000..f2ccacac --- /dev/null +++ b/samples/tasks/contexts/users.yaml @@ -0,0 +1,28 @@ +--- + Dummy.openstack: + - + args: + sleep: 0.1 + runner: + type: "constant" + times: 4 + concurrency: 2 + context: + users: + tenants: 1 + users_per_tenant: 2 + - + args: + sleep: 0.1 + runner: + type: "constant" + times: 4 + concurrency: 2 + context: + users: + tenants: 1 + users_per_tenant: 2 + resource_management_workers: 1 + project_domain: "project" + user_domain: "demo" + user_choice_method: "random" diff --git a/samples/tasks/contexts/volume-types.json b/samples/tasks/contexts/volume-types.json new file mode 100644 index 00000000..73a962b2 --- /dev/null +++ b/samples/tasks/contexts/volume-types.json @@ -0,0 +1,21 @@ +{ + "Dummy.openstack": [ + { + "args": { + "sleep": 0.1 + }, + "runner": { + "type": "constant", + "times": 4, + "concurrency": 2 + }, + "context": { + "users": { + "tenants": 1, + "users_per_tenant": 2 + }, + "volume_types": ["test"] + } + } + ] +} \ No newline at end of file diff --git a/samples/tasks/contexts/volume-types.yaml b/samples/tasks/contexts/volume-types.yaml new file mode 100644 index 00000000..a0e82cfc --- /dev/null +++ b/samples/tasks/contexts/volume-types.yaml @@ -0,0 +1,15 @@ +--- + Dummy.openstack: + - + args: + sleep: 0.1 + runner: + type: "constant" + times: 4 + concurrency: 2 + context: + users: + tenants: 1 + users_per_tenant: 2 + volume_types: + - test \ No newline at end of file diff --git a/samples/tasks/contexts/volumes.json b/samples/tasks/contexts/volumes.json new file mode 100644 index 00000000..f5594650 --- /dev/null +++ b/samples/tasks/contexts/volumes.json @@ -0,0 +1,24 @@ +{ + "Dummy.openstack": [ + { + "args": { + "sleep": 0.1 + }, + "runner": { + "type": "constant", + "times": 4, + "concurrency": 2 + }, + "context": { + "users": { + "tenants": 1, + "users_per_tenant": 2 + }, + "volumes": { + "size": 1, + "volumes_per_tenant": 4 + } + } + } + ] +} diff --git a/samples/tasks/contexts/volumes.yaml b/samples/tasks/contexts/volumes.yaml new file mode 100644 index 00000000..3980f211 --- /dev/null +++ b/samples/tasks/contexts/volumes.yaml @@ -0,0 +1,16 @@ +--- + Dummy.openstack: + - + args: + sleep: 0.1 + runner: + type: "constant" + times: 4 + concurrency: 2 + context: + users: + tenants: 1 + users_per_tenant: 2 + volumes: + size: 1 + volumes_per_tenant: 4 diff --git a/samples/tasks/contexts/zones.json b/samples/tasks/contexts/zones.json new file mode 100644 index 00000000..7bd32339 --- /dev/null +++ b/samples/tasks/contexts/zones.json @@ -0,0 +1,23 @@ +{ + "Dummy.openstack": [ + { + "args": { + "sleep": 0.1 + }, + "runner": { + "type": "constant", + "times": 4, + "concurrency": 2 + }, + "context": { + "users": { + "tenants": 1, + "users_per_tenant": 2 + }, + "zones": { + "zones_per_tenant": 1 + } + } + } + ] +} diff --git a/samples/tasks/contexts/zones.yaml b/samples/tasks/contexts/zones.yaml new file mode 100644 index 00000000..7ae5f5b4 --- /dev/null +++ b/samples/tasks/contexts/zones.yaml @@ -0,0 +1,15 @@ +--- + Dummy.openstack: + - + args: + sleep: 0.1 + runner: + type: "constant" + times: 4 + concurrency: 2 + context: + users: + tenants: 1 + users_per_tenant: 2 + zones: + zones_per_tenant: 1 diff --git a/tests/unit/doc/test_task_samples.py b/tests/unit/doc/test_task_samples.py index 79c395ff..13ff1b7d 100644 --- a/tests/unit/doc/test_task_samples.py +++ b/tests/unit/doc/test_task_samples.py @@ -13,6 +13,7 @@ # License for the specific language governing permissions and limitations # under the License. +import inspect import json import mock import os @@ -21,17 +22,18 @@ import traceback import yaml +import rally from rally import api +from rally.task import context from rally.task import engine from rally.task import scenario from tests.unit import test +RALLY_PATH = os.path.join(os.path.dirname(rally.__file__), os.pardir) + class TaskSampleTestCase(test.TestCase): - samples_path = os.path.join( - os.path.dirname(__file__), - os.pardir, os.pardir, os.pardir, - "samples", "tasks") + samples_path = os.path.join(RALLY_PATH, "samples", "tasks") def setUp(self): super(TaskSampleTestCase, self).setUp() @@ -145,3 +147,18 @@ class TaskSampleTestCase(test.TestCase): "Following sample task filenames contain " "underscores (_) but must use dashes (-) instead: " "{}".format(bad_filenames)) + + def test_context_samples_found(self): + all_plugins = context.Context.get_all() + context_samples_path = os.path.join(self.samples_path, "contexts") + for p in all_plugins: + # except contexts which belongs to tests module + if not inspect.getfile(p).startswith( + os.path.dirname(rally.__file__)): + continue + file_name = p.get_name().replace("_", "-") + file_path = os.path.join(context_samples_path, file_name) + if not os.path.exists("%s.json" % file_path): + self.fail(("There is no json sample file of %s," + "plugin location: %s" % + (p.get_name(), p.__module__)))