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": [ "CinderVolumes.create_and_attach_volume": [
{ {
@ -7,7 +8,7 @@
"name": "^cirros.*uec$" "name": "^cirros.*uec$"
}, },
"flavor": { "flavor": {
"name": "m1.tiny" "name": "{{flavor_name}}"
} }
}, },
"runner": { "runner": {
@ -29,7 +30,7 @@
"max": 5 "max": 5
}, },
"flavor": { "flavor": {
"name": "m1.tiny" "name": "{{flavor_name}}"
}, },
"image": { "image": {
"name": "^cirros.*uec$" "name": "^cirros.*uec$"

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,9 +1,10 @@
{% set flavor_name = flavor_name or "m1.tiny" %}
{ {
"NovaServers.boot_server_from_volume_and_live_migrate": [ "NovaServers.boot_server_from_volume_and_live_migrate": [
{ {
"args": { "args": {
"flavor": { "flavor": {
"name": "m1.tiny" "name": "{{flavor_name}}"
}, },
"image": { "image": {
"name": "^cirros.*uec$" "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: NovaServers.boot_server_from_volume_and_live_migrate:
- args: - args:
flavor: flavor:
name: "m1.tiny" name: "{{flavor_name}}"
image: image:
name: "^cirros.*uec$" name: "^cirros.*uec$"
block_migration: false block_migration: false

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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