Set samples default flavor to m1.tiny

Summary:
Samples should use m1.tiny instead of m1.nano
Samples should be parametrized and use m1.tiny instead of m1.nano as default flavor.

Change-Id: Ie820c573c0a9971a54f7ab20a7454a2f05dc88d2
Closes-Bug: #1431700
This commit is contained in:
Luz Cazares 2015-08-08 13:54:50 -05:00
parent 37fd08ee44
commit b02784cb1a
57 changed files with 128 additions and 70 deletions

View File

@ -1,3 +1,4 @@
{% set flavor_name = flavor_name or "m1.tiny" %}
{
"CinderVolumes.create_and_attach_volume": [
{
@ -7,7 +8,7 @@
"name": "^cirros.*uec$"
},
"flavor": {
"name": "m1.tiny"
"name": "{{flavor_name}}"
}
},
"runner": {
@ -29,7 +30,7 @@
"max": 5
},
"flavor": {
"name": "m1.tiny"
"name": "{{flavor_name}}"
},
"image": {
"name": "^cirros.*uec$"

View File

@ -1,3 +1,4 @@
{% set flavor_name = flavor_name or "m1.tiny" %}
---
CinderVolumes.create_and_attach_volume:
-
@ -6,7 +7,7 @@
image:
name: "^cirros.*uec$"
flavor:
name: "m1.tiny"
name: "{{flavor_name}}"
runner:
type: "constant"
times: 5
@ -21,7 +22,7 @@
min: 1
max: 5
flavor:
name: "m1.tiny"
name: "{{flavor_name}}"
image:
name: "^cirros.*uec$"
runner:

View File

@ -1,3 +1,4 @@
{% set flavor_name = flavor_name or "m1.tiny" %}
{
"CinderVolumes.create_snapshot_and_attach_volume": [
{
@ -23,7 +24,7 @@
"name": "^cirros.*uec$"
},
"flavor": {
"name": "m1.tiny"
"name": "{{flavor_name}}"
},
"servers_per_tenant": 2
}
@ -52,7 +53,7 @@
"name": "^cirros.*uec$"
},
"flavor": {
"name": "m1.tiny"
"name": "{{flavor_name}}"
},
"servers_per_tenant": 2
}

View File

@ -1,3 +1,4 @@
{% set flavor_name = flavor_name or "m1.tiny" %}
---
CinderVolumes.create_snapshot_and_attach_volume:
-
@ -18,7 +19,7 @@
image:
name: "^cirros.*uec$"
flavor:
name: "m1.tiny"
name: "{{flavor_name}}"
servers_per_tenant: 2
-
args:
@ -38,6 +39,6 @@
image:
name: "^cirros.*uec$"
flavor:
name: "m1.tiny"
name: "{{flavor_name}}"
servers_per_tenant: 2

View File

@ -1,9 +1,10 @@
{% set flavor_name = flavor_name or "m1.tiny" %}
{
"EC2Servers.boot_server": [
{
"args": {
"flavor": {
"name": "m1.tiny"
"name": "{{flavor_name}}"
},
"image": {
"name": "^cirros.*uec$"

View File

@ -1,9 +1,10 @@
{% set flavor_name = flavor_name or "m1.tiny" %}
---
EC2Servers.boot_server:
-
args:
flavor:
name: "m1.tiny"
name: "{{flavor_name}}"
image:
name: "^cirros.*uec$"
runner:

View File

@ -1,3 +1,4 @@
{% set flavor_name = flavor_name or "m1.tiny" %}
{
"GlanceImages.create_image_and_boot_instances": [
{
@ -6,7 +7,7 @@
"container_format": "bare",
"disk_format": "qcow2",
"flavor": {
"name": "m1.tiny"
"name": "{{flavor_name}}"
},
"number_instances": 2
},

View File

@ -1,3 +1,4 @@
{% set flavor_name = flavor_name or "m1.tiny" %}
---
GlanceImages.create_image_and_boot_instances:
-
@ -6,7 +7,7 @@
container_format: "bare"
disk_format: "qcow2"
flavor:
name: "m1.tiny"
name: "{{flavor_name}}"
number_instances: 2
runner:
type: "constant"

View File

@ -1,3 +1,4 @@
{% set flavor_name = flavor_name or "m1.tiny" %}
{
"NovaServers.boot_and_associate_floating_ip": [
{
@ -8,7 +9,7 @@
},
"args": {
"flavor": {
"name": "m1.tiny"
"name": "{{flavor_name}}"
},
"image": {
"name": "^cirros.*uec$"

View File

@ -1,9 +1,10 @@
{% set flavor_name = flavor_name or "m1.tiny" %}
---
NovaServers.boot_and_associate_floating_ip:
-
args:
flavor:
name: "m1.tiny"
name: "{{flavor_name}}"
image:
name: "^cirros.*uec$"
runner:

View File

@ -1,9 +1,10 @@
{% set flavor_name = flavor_name or "m1.tiny" %}
{
"NovaServers.boot_and_live_migrate_server": [
{
"args": {
"flavor": {
"name": "m1.tiny"
"name": "{{flavor_name}}"
},
"image": {
"name": "^cirros.*uec$"

View File

@ -1,8 +1,9 @@
{% set flavor_name = flavor_name or "m1.tiny" %}
---
NovaServers.boot_and_live_migrate_server:
- args:
flavor:
name: "m1.tiny"
name: "{{flavor_name}}"
image:
name: "^cirros.*uec$"
block_migration: true

View File

@ -1,3 +1,4 @@
{% set flavor_name = flavor_name or "m1.tiny" %}
{
"NovaServers.boot_and_delete_multiple_servers": [
{
@ -12,7 +13,7 @@
"name": "^cirros.*uec$"
},
"flavor": {
"name": "m1.tiny"
"name": "{{flavor_name}}"
}
},
"context": {

View File

@ -1,3 +1,4 @@
{% set flavor_name = flavor_name or "m1.tiny" %}
---
NovaServers.boot_and_delete_multiple_servers:
-
@ -5,7 +6,7 @@
image:
name: "^cirros.*uec$"
flavor:
name: "m1.tiny"
name: "{{flavor_name}}"
count: 5
runner:
type: "constant"

View File

@ -1,9 +1,10 @@
{% set flavor_name = flavor_name or "m1.tiny" %}
{
"NovaKeypair.boot_and_delete_server_with_keypair": [
{
"args": {
"flavor": {
"name": "m1.tiny"
"name": "{{flavor_name}}"
},
"image": {
"name": "^cirros.*uec$"

View File

@ -1,9 +1,10 @@
{% set flavor_name = flavor_name or "m1.tiny" %}
---
NovaKeypair.boot_and_delete_server_with_keypair:
-
args:
flavor:
name: "m1.tiny"
name: "{{flavor_name}}"
image:
name: "^cirros.*uec$"
runner:

View File

@ -1,9 +1,10 @@
{% set flavor_name = flavor_name or "m1.tiny" %}
{
"NovaServers.boot_and_delete_server": [
{
"args": {
"flavor": {
"name": "m1.tiny"
"name": "{{flavor_name}}"
},
"image": {
"name": "^cirros.*uec$"

View File

@ -1,9 +1,10 @@
{% set flavor_name = flavor_name or "m1.tiny" %}
---
NovaServers.boot_and_delete_server:
-
args:
flavor:
name: "m1.tiny"
name: "{{flavor_name}}"
image:
name: "^cirros.*uec$"
force_delete: false

View File

@ -1,9 +1,10 @@
{% set flavor_name = flavor_name or "m1.tiny" %}
{
"NovaServers.boot_and_list_server": [
{
"args": {
"flavor": {
"name": "m1.tiny"
"name": "{{flavor_name}}"
},
"image": {
"name": "^cirros.*uec$"

View File

@ -1,9 +1,10 @@
{% set flavor_name = flavor_name or "m1.tiny" %}
---
NovaServers.boot_and_list_server:
-
args:
flavor:
name: "m1.tiny"
name: "{{flavor_name}}"
image:
name: "^cirros.*uec$"
detailed: True

View File

@ -1,9 +1,10 @@
{% set flavor_name = flavor_name or "m1.tiny" %}
{
"NovaServers.boot_and_live_migrate_server": [
{
"args": {
"flavor": {
"name": "m1.tiny"
"name": "{{flavor_name}}"
},
"image": {
"name": "^cirros.*uec$"

View File

@ -1,8 +1,9 @@
{% set flavor_name = flavor_name or "m1.tiny" %}
---
NovaServers.boot_and_live_migrate_server:
- args:
flavor:
name: m1.tiny
name: "{{flavor_name}}"
image:
name: "^cirros.*uec$"
block_migration: false

View File

@ -1,9 +1,10 @@
{% set flavor_name = flavor_name or "m1.tiny" %}
{
"NovaServers.boot_and_migrate_server": [
{
"args": {
"flavor": {
"name": "m1.tiny"
"name": "{{flavor_name}}"
},
"image": {
"name": "^cirros.*uec$"

View File

@ -1,8 +1,9 @@
{% set flavor_name = flavor_name or "m1.tiny" %}
---
NovaServers.boot_and_migrate_server:
- args:
flavor:
name: m1.tiny
name: "{{flavor_name}}"
image:
name: "^cirros.*uec$"
runner:

View File

@ -1,9 +1,10 @@
{% set flavor_name = flavor_name or "m1.tiny" %}
{
"NovaServers.boot_and_rebuild_server": [
{
"args": {
"flavor": {
"name": "m1.tiny"
"name": "{{flavor_name}}"
},
"from_image": {
"name": "^cirros.*uec$"

View File

@ -1,8 +1,9 @@
{% set flavor_name = flavor_name or "m1.tiny" %}
---
NovaServers.boot_and_rebuild_server:
- args:
flavor:
name: "m1.tiny"
name: "{{flavor_name}}"
from_image:
name: "^cirros.*uec$"
to_image:

View File

@ -1,9 +1,10 @@
{% set flavor_name = flavor_name or "m1.tiny" %}
{
"NovaServers.boot_and_bounce_server": [
{
"args": {
"flavor": {
"name": "m1.tiny"
"name": "{{flavor_name}}"
},
"image": {
"name": "^cirros.*uec$"

View File

@ -1,9 +1,10 @@
{% set flavor_name = flavor_name or "m1.tiny" %}
---
NovaServers.boot_and_bounce_server:
-
args:
flavor:
name: "m1.tiny"
name: "{{flavor_name}}"
image:
name: "^cirros.*uec$"
force_delete: false

View File

@ -1,9 +1,10 @@
{% set flavor_name = flavor_name or "m1.tiny" %}
{
"NovaServers.boot_server_from_volume_and_delete": [
{
"args": {
"flavor": {
"name": "m1.tiny"
"name": "{{flavor_name}}"
},
"image": {
"name": "^cirros.*uec$"

View File

@ -1,9 +1,10 @@
{% set flavor_name = flavor_name or "m1.tiny" %}
---
NovaServers.boot_server_from_volume_and_delete:
-
args:
flavor:
name: "m1.tiny"
name: "{{flavor_name}}"
image:
name: "^cirros.*uec$"
volume_size: 10

View File

@ -1,9 +1,10 @@
{% set flavor_name = flavor_name or "m1.tiny" %}
{
"NovaServers.boot_server_from_volume": [
{
"args": {
"flavor": {
"name": "m1.tiny"
"name": "{{flavor_name}}"
},
"image": {
"name": "^cirros.*uec$"

View File

@ -1,9 +1,10 @@
{% set flavor_name = flavor_name or "m1.tiny" %}
---
NovaServers.boot_server_from_volume:
-
args:
flavor:
name: "m1.tiny"
name: "{{flavor_name}}"
image:
name: "^cirros.*uec$"
volume_size: 10

View File

@ -1,9 +1,10 @@
{% set flavor_name = flavor_name or "m1.tiny" %}
{
"NovaServers.boot_lock_unlock_and_delete": [
{
"args": {
"flavor": {
"name": "m1.tiny"
"name": "{{flavor_name}}"
},
"image": {
"name": "^cirros.*uec$"

View File

@ -1,9 +1,10 @@
{% set flavor_name = flavor_name or "m1.tiny" %}
---
NovaServers.boot_lock_unlock_and_delete:
-
args:
flavor:
name: "m1.tiny"
name: "{{flavor_name}}"
image:
name: "^cirros.*uec$"
runner:

View File

@ -1,3 +1,4 @@
{% set flavor_name = flavor_name or "m1.tiny" %}
{
"NovaServers.boot_server_attach_created_volume_and_live_migrate": [
{
@ -8,7 +9,7 @@
"name": "^cirros.*uec$"
},
"flavor": {
"name": "m1.tiny"
"name": "{{flavor_name}}"
}
},
"runner": {

View File

@ -1,8 +1,9 @@
{% set flavor_name = flavor_name or "m1.tiny" %}
---
NovaServers.boot_server_attach_created_volume_and_live_migrate:
- args:
flavor:
name: m1.tiny
name: "{{flavor_name}}"
image:
name: "^cirros.*uec$"
size: 10

View File

@ -1,9 +1,10 @@
{% set flavor_name = flavor_name or "m1.tiny" %}
{
"NovaServers.boot_server_from_volume_and_live_migrate": [
{
"args": {
"flavor": {
"name": "m1.tiny"
"name": "{{flavor_name}}"
},
"image": {
"name": "^cirros.*uec$"

View File

@ -1,8 +1,9 @@
{% set flavor_name = flavor_name or "m1.tiny" %}
---
NovaServers.boot_server_from_volume_and_live_migrate:
- args:
flavor:
name: "m1.tiny"
name: "{{flavor_name}}"
image:
name: "^cirros.*uec$"
block_migration: false

View File

@ -1,9 +1,10 @@
{% set flavor_name = flavor_name or "m1.tiny" %}
{
"NovaServers.snapshot_server": [
{
"args": {
"flavor": {
"name": "m1.tiny"
"name": "{{flavor_name}}"
},
"image": {
"name": "^cirros.*uec$"

View File

@ -1,9 +1,10 @@
{% set flavor_name = flavor_name or "m1.tiny" %}
---
NovaServers.snapshot_server:
-
args:
flavor:
name: "m1.tiny"
name: "{{flavor_name}}"
image:
name: "^cirros.*uec$"
force_delete: false

View File

@ -1,9 +1,10 @@
{% set flavor_name = flavor_name or "m1.tiny" %}
{
"NovaServers.boot_server": [
{
"args": {
"flavor": {
"name": "m1.tiny"
"name": "{{flavor_name}}"
},
"image": {
"name": "^cirros.*uec$"

View File

@ -1,9 +1,10 @@
{% set flavor_name = flavor_name or "m1.tiny" %}
---
NovaServers.boot_server:
-
args:
flavor:
name: "m1.tiny"
name: "{{flavor_name}}"
image:
name: "^cirros.*uec$"
runner:

View File

@ -1,3 +1,4 @@
{% set flavor_name = flavor_name or "m1.tiny" %}
{
"NovaServers.list_servers": [
{
@ -16,7 +17,7 @@
},
"servers": {
"flavor": {
"name": "m1.tiny"
"name": "{{flavor_name}}"
},
"image": {
"name": "^cirros.*uec$"

View File

@ -1,3 +1,4 @@
{% set flavor_name = flavor_name or "m1.tiny" %}
---
NovaServers.list_servers:
-
@ -13,7 +14,7 @@
users_per_tenant: 1
servers:
flavor:
name: "m1.tiny"
name: "{{flavor_name}}"
image:
name: "^cirros.*uec$"
servers_per_tenant: 2

View File

@ -1,9 +1,10 @@
{% set flavor_name = flavor_name or "m1.tiny" %}
{
"NovaServers.pause_and_unpause_server": [
{
"args": {
"flavor": {
"name": "m1.tiny"
"name": "{{flavor_name}}"
},
"image": {
"name": "^cirros.*uec$"

View File

@ -1,9 +1,10 @@
{% set flavor_name = flavor_name or "m1.tiny" %}
---
NovaServers.pause_and_unpause_server:
-
args:
flavor:
name: "m1.tiny"
name: "{{flavor_name}}"
image:
name: "^cirros.*uec$"
force_delete: false

View File

@ -1,9 +1,10 @@
{% set flavor_name = flavor_name or "m1.tiny" %}
{
"NovaServers.resize_server": [
{
"args": {
"flavor": {
"name": "m1.tiny"
"name": "{{flavor_name}}"
},
"image": {
"name": "^cirros.*uec$"

View File

@ -1,9 +1,10 @@
{% set flavor_name = flavor_name or "m1.tiny" %}
---
NovaServers.resize_server:
-
args:
flavor:
name: "m1.tiny"
name: "{{flavor_name}}"
image:
name: "^cirros.*uec$"
to_flavor:

View File

@ -1,9 +1,10 @@
{% set flavor_name = flavor_name or "m1.tiny" %}
{
"NovaServers.shelve_and_unshelve_server": [
{
"args": {
"flavor": {
"name": "m1.tiny"
"name": "{{flavor_name}}"
},
"image": {
"name": "^cirros.*uec$"

View File

@ -1,9 +1,10 @@
{% set flavor_name = flavor_name or "m1.tiny" %}
---
NovaServers.shelve_and_unshelve_server:
-
args:
flavor:
name: "m1.tiny"
name: "{{flavor_name}}"
image:
name: "^cirros.*uec$"
force_delete: false

View File

@ -1,9 +1,10 @@
{% set flavor_name = flavor_name or "m1.tiny" %}
{
"NovaServers.suspend_and_resume_server": [
{
"args": {
"flavor": {
"name": "m1.tiny"
"name": "{{flavor_name}}"
},
"image": {
"name": "^cirros.*uec$"

View File

@ -1,9 +1,10 @@
{% set flavor_name = flavor_name or "m1.tiny" %}
---
NovaServers.suspend_and_resume_server:
-
args:
flavor:
name: "m1.tiny"
name: "{{flavor_name}}"
image:
name: "^cirros.*uec$"
force_delete: false

View File

@ -1,9 +1,10 @@
{% set flavor_name = flavor_name or "m1.tiny" %}
{
"VMTasks.boot_runcommand_delete": [
{
"args": {
"flavor": {
"name": "m1.tiny"
"name": "{{flavor_name}}"
},
"image": {
"name": "^cirros.*uec$"

View File

@ -1,9 +1,10 @@
{% set flavor_name = flavor_name or "m1.tiny" %}
---
VMTasks.boot_runcommand_delete:
-
args:
flavor:
name: "m1.tiny"
name: "{{flavor_name}}"
image:
name: "^cirros.*uec$"
volume_args:

View File

@ -1,9 +1,10 @@
{% set flavor_name = flavor_name or "m1.tiny" %}
{
"VMTasks.boot_runcommand_delete": [
{
"args": {
"flavor": {
"name": "m1.tiny"
"name": "{{flavor_name}}"
},
"image": {
"name": "^cirros.*uec$"

View File

@ -1,9 +1,10 @@
{% set flavor_name = flavor_name or "m1.tiny" %}
---
VMTasks.boot_runcommand_delete:
-
args:
flavor:
name: "m1.tiny"
name: "{{flavor_name}}"
image:
name: "^cirros.*uec$"
floating_network: "public"

View File

@ -21,6 +21,7 @@ import traceback
import yaml
from rally import api
from rally.task import scenario
from rally.task import engine
from tests.unit import test
@ -49,7 +50,8 @@ class TaskSampleTestCase(test.TestCase):
with open(full_path) as task_file:
try:
task_config = yaml.safe_load(task_file.read())
task_config = yaml.safe_load(api.Task.render_template
(task_file.read()))
eng = engine.BenchmarkEngine(task_config,
mock.MagicMock())
eng.validate()
@ -77,7 +79,7 @@ class TaskSampleTestCase(test.TestCase):
full_path = os.path.join(dirname, filename)
with open(full_path) as task_file:
try:
json.load(task_file)
json.loads(api.Task.render_template(task_file.read()))
except Exception:
print(traceback.format_exc())
self.fail("Invalid JSON file: %s" % full_path)
@ -117,11 +119,11 @@ class TaskSampleTestCase(test.TestCase):
if os.path.exists(yaml_path) and os.path.exists(json_path):
with open(json_path) as json_file:
with open(yaml_path) as yaml_file:
json_config = yaml.safe_load(json_file.read())
yaml_config = yaml.safe_load(yaml_file.read())
self.assertEqual(
json_config,
yaml_config,
"Sample task configs are not equal:\n%s\n%s" %
(yaml_path, json_path))
json_config = yaml.safe_load(api.Task.render_template
(json_file.read()))
with open(yaml_path) as yaml_file:
yaml_config = yaml.safe_load(api.Task.render_template
(yaml_file.read()))
self.assertEqual(json_config, yaml_config,
"Sample task configs are not equal:"
"\n%s\n%s" % (yaml_path, json_path))