diff --git a/samples/tasks/scenarios/cinder/create-and-attach-volume.json b/samples/tasks/scenarios/cinder/create-and-attach-volume.json index cf129484..faf1cbaa 100644 --- a/samples/tasks/scenarios/cinder/create-and-attach-volume.json +++ b/samples/tasks/scenarios/cinder/create-and-attach-volume.json @@ -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$" diff --git a/samples/tasks/scenarios/cinder/create-and-attach-volume.yaml b/samples/tasks/scenarios/cinder/create-and-attach-volume.yaml index b42aeba6..18de5fec 100644 --- a/samples/tasks/scenarios/cinder/create-and-attach-volume.yaml +++ b/samples/tasks/scenarios/cinder/create-and-attach-volume.yaml @@ -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: diff --git a/samples/tasks/scenarios/cinder/create-snapshot-and-attach-volume.json b/samples/tasks/scenarios/cinder/create-snapshot-and-attach-volume.json index 1af3950e..5530fe2b 100644 --- a/samples/tasks/scenarios/cinder/create-snapshot-and-attach-volume.json +++ b/samples/tasks/scenarios/cinder/create-snapshot-and-attach-volume.json @@ -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 } diff --git a/samples/tasks/scenarios/cinder/create-snapshot-and-attach-volume.yaml b/samples/tasks/scenarios/cinder/create-snapshot-and-attach-volume.yaml index c77f2875..a2a397aa 100644 --- a/samples/tasks/scenarios/cinder/create-snapshot-and-attach-volume.yaml +++ b/samples/tasks/scenarios/cinder/create-snapshot-and-attach-volume.yaml @@ -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 diff --git a/samples/tasks/scenarios/ec2/boot.json b/samples/tasks/scenarios/ec2/boot.json index 9cf4f2b1..2e0b33dc 100644 --- a/samples/tasks/scenarios/ec2/boot.json +++ b/samples/tasks/scenarios/ec2/boot.json @@ -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$" diff --git a/samples/tasks/scenarios/ec2/boot.yaml b/samples/tasks/scenarios/ec2/boot.yaml index 25eaa043..3f968fe8 100644 --- a/samples/tasks/scenarios/ec2/boot.yaml +++ b/samples/tasks/scenarios/ec2/boot.yaml @@ -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: diff --git a/samples/tasks/scenarios/glance/create-image-and-boot-instances.json b/samples/tasks/scenarios/glance/create-image-and-boot-instances.json index 35b55a0e..31915798 100644 --- a/samples/tasks/scenarios/glance/create-image-and-boot-instances.json +++ b/samples/tasks/scenarios/glance/create-image-and-boot-instances.json @@ -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 }, diff --git a/samples/tasks/scenarios/glance/create-image-and-boot-instances.yaml b/samples/tasks/scenarios/glance/create-image-and-boot-instances.yaml index a7210293..17c84ae1 100644 --- a/samples/tasks/scenarios/glance/create-image-and-boot-instances.yaml +++ b/samples/tasks/scenarios/glance/create-image-and-boot-instances.yaml @@ -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" diff --git a/samples/tasks/scenarios/nova/boot-and-associate-floating-ip.json b/samples/tasks/scenarios/nova/boot-and-associate-floating-ip.json index 5b8ff092..fc60733c 100644 --- a/samples/tasks/scenarios/nova/boot-and-associate-floating-ip.json +++ b/samples/tasks/scenarios/nova/boot-and-associate-floating-ip.json @@ -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$" diff --git a/samples/tasks/scenarios/nova/boot-and-associate-floating-ip.yaml b/samples/tasks/scenarios/nova/boot-and-associate-floating-ip.yaml index 9974fb90..61c7b3c9 100644 --- a/samples/tasks/scenarios/nova/boot-and-associate-floating-ip.yaml +++ b/samples/tasks/scenarios/nova/boot-and-associate-floating-ip.yaml @@ -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: diff --git a/samples/tasks/scenarios/nova/boot-and-block-migrate.json b/samples/tasks/scenarios/nova/boot-and-block-migrate.json index 5528d611..711698f6 100644 --- a/samples/tasks/scenarios/nova/boot-and-block-migrate.json +++ b/samples/tasks/scenarios/nova/boot-and-block-migrate.json @@ -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$" diff --git a/samples/tasks/scenarios/nova/boot-and-block-migrate.yaml b/samples/tasks/scenarios/nova/boot-and-block-migrate.yaml index 8e528014..d02508bd 100644 --- a/samples/tasks/scenarios/nova/boot-and-block-migrate.yaml +++ b/samples/tasks/scenarios/nova/boot-and-block-migrate.yaml @@ -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 diff --git a/samples/tasks/scenarios/nova/boot-and-delete-multiple.json b/samples/tasks/scenarios/nova/boot-and-delete-multiple.json index dbd6ddef..e80a3bf2 100644 --- a/samples/tasks/scenarios/nova/boot-and-delete-multiple.json +++ b/samples/tasks/scenarios/nova/boot-and-delete-multiple.json @@ -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": { diff --git a/samples/tasks/scenarios/nova/boot-and-delete-multiple.yaml b/samples/tasks/scenarios/nova/boot-and-delete-multiple.yaml index 3ce7bbcb..db935e6c 100644 --- a/samples/tasks/scenarios/nova/boot-and-delete-multiple.yaml +++ b/samples/tasks/scenarios/nova/boot-and-delete-multiple.yaml @@ -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" diff --git a/samples/tasks/scenarios/nova/boot-and-delete-server-with-keypairs.json b/samples/tasks/scenarios/nova/boot-and-delete-server-with-keypairs.json index 06225102..097144cc 100644 --- a/samples/tasks/scenarios/nova/boot-and-delete-server-with-keypairs.json +++ b/samples/tasks/scenarios/nova/boot-and-delete-server-with-keypairs.json @@ -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$" diff --git a/samples/tasks/scenarios/nova/boot-and-delete-server-with-keypairs.yaml b/samples/tasks/scenarios/nova/boot-and-delete-server-with-keypairs.yaml index 8b92d7b6..3cfa388f 100644 --- a/samples/tasks/scenarios/nova/boot-and-delete-server-with-keypairs.yaml +++ b/samples/tasks/scenarios/nova/boot-and-delete-server-with-keypairs.yaml @@ -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: diff --git a/samples/tasks/scenarios/nova/boot-and-delete.json b/samples/tasks/scenarios/nova/boot-and-delete.json index 12bb841f..82282eb2 100644 --- a/samples/tasks/scenarios/nova/boot-and-delete.json +++ b/samples/tasks/scenarios/nova/boot-and-delete.json @@ -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$" diff --git a/samples/tasks/scenarios/nova/boot-and-delete.yaml b/samples/tasks/scenarios/nova/boot-and-delete.yaml index 1dd8dc33..08a3c94e 100644 --- a/samples/tasks/scenarios/nova/boot-and-delete.yaml +++ b/samples/tasks/scenarios/nova/boot-and-delete.yaml @@ -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 diff --git a/samples/tasks/scenarios/nova/boot-and-list.json b/samples/tasks/scenarios/nova/boot-and-list.json index e500be97..7978bbfd 100644 --- a/samples/tasks/scenarios/nova/boot-and-list.json +++ b/samples/tasks/scenarios/nova/boot-and-list.json @@ -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$" diff --git a/samples/tasks/scenarios/nova/boot-and-list.yaml b/samples/tasks/scenarios/nova/boot-and-list.yaml index c73724c0..31aa0ecb 100644 --- a/samples/tasks/scenarios/nova/boot-and-list.yaml +++ b/samples/tasks/scenarios/nova/boot-and-list.yaml @@ -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 diff --git a/samples/tasks/scenarios/nova/boot-and-live-migrate.json b/samples/tasks/scenarios/nova/boot-and-live-migrate.json index 39c75d87..384ef13b 100644 --- a/samples/tasks/scenarios/nova/boot-and-live-migrate.json +++ b/samples/tasks/scenarios/nova/boot-and-live-migrate.json @@ -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$" diff --git a/samples/tasks/scenarios/nova/boot-and-live-migrate.yaml b/samples/tasks/scenarios/nova/boot-and-live-migrate.yaml index d9f6719a..2e468379 100644 --- a/samples/tasks/scenarios/nova/boot-and-live-migrate.yaml +++ b/samples/tasks/scenarios/nova/boot-and-live-migrate.yaml @@ -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 diff --git a/samples/tasks/scenarios/nova/boot-and-migrate.json b/samples/tasks/scenarios/nova/boot-and-migrate.json index 557e8c6e..96264ab7 100644 --- a/samples/tasks/scenarios/nova/boot-and-migrate.json +++ b/samples/tasks/scenarios/nova/boot-and-migrate.json @@ -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$" diff --git a/samples/tasks/scenarios/nova/boot-and-migrate.yaml b/samples/tasks/scenarios/nova/boot-and-migrate.yaml index b5edbd29..e53a6301 100644 --- a/samples/tasks/scenarios/nova/boot-and-migrate.yaml +++ b/samples/tasks/scenarios/nova/boot-and-migrate.yaml @@ -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: diff --git a/samples/tasks/scenarios/nova/boot-and-rebuild.json b/samples/tasks/scenarios/nova/boot-and-rebuild.json index 9293bc3d..ecee1316 100644 --- a/samples/tasks/scenarios/nova/boot-and-rebuild.json +++ b/samples/tasks/scenarios/nova/boot-and-rebuild.json @@ -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$" diff --git a/samples/tasks/scenarios/nova/boot-and-rebuild.yaml b/samples/tasks/scenarios/nova/boot-and-rebuild.yaml index 1f644bff..156f7443 100644 --- a/samples/tasks/scenarios/nova/boot-and-rebuild.yaml +++ b/samples/tasks/scenarios/nova/boot-and-rebuild.yaml @@ -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: diff --git a/samples/tasks/scenarios/nova/boot-bounce-delete.json b/samples/tasks/scenarios/nova/boot-bounce-delete.json index ef628d52..4b5f5875 100644 --- a/samples/tasks/scenarios/nova/boot-bounce-delete.json +++ b/samples/tasks/scenarios/nova/boot-bounce-delete.json @@ -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$" diff --git a/samples/tasks/scenarios/nova/boot-bounce-delete.yaml b/samples/tasks/scenarios/nova/boot-bounce-delete.yaml index c5035cef..ca297dda 100644 --- a/samples/tasks/scenarios/nova/boot-bounce-delete.yaml +++ b/samples/tasks/scenarios/nova/boot-bounce-delete.yaml @@ -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 diff --git a/samples/tasks/scenarios/nova/boot-from-volume-and-delete.json b/samples/tasks/scenarios/nova/boot-from-volume-and-delete.json index 18a54819..014831dd 100644 --- a/samples/tasks/scenarios/nova/boot-from-volume-and-delete.json +++ b/samples/tasks/scenarios/nova/boot-from-volume-and-delete.json @@ -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$" diff --git a/samples/tasks/scenarios/nova/boot-from-volume-and-delete.yaml b/samples/tasks/scenarios/nova/boot-from-volume-and-delete.yaml index bda8b8c2..fb4f09d4 100644 --- a/samples/tasks/scenarios/nova/boot-from-volume-and-delete.yaml +++ b/samples/tasks/scenarios/nova/boot-from-volume-and-delete.yaml @@ -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 diff --git a/samples/tasks/scenarios/nova/boot-from-volume.json b/samples/tasks/scenarios/nova/boot-from-volume.json index d65c42a1..caa1c011 100644 --- a/samples/tasks/scenarios/nova/boot-from-volume.json +++ b/samples/tasks/scenarios/nova/boot-from-volume.json @@ -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$" diff --git a/samples/tasks/scenarios/nova/boot-from-volume.yaml b/samples/tasks/scenarios/nova/boot-from-volume.yaml index e0450f99..c8c86ca4 100644 --- a/samples/tasks/scenarios/nova/boot-from-volume.yaml +++ b/samples/tasks/scenarios/nova/boot-from-volume.yaml @@ -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 diff --git a/samples/tasks/scenarios/nova/boot-lock-unlock-and-delete.json b/samples/tasks/scenarios/nova/boot-lock-unlock-and-delete.json index 69e23e12..3fd419ea 100644 --- a/samples/tasks/scenarios/nova/boot-lock-unlock-and-delete.json +++ b/samples/tasks/scenarios/nova/boot-lock-unlock-and-delete.json @@ -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$" diff --git a/samples/tasks/scenarios/nova/boot-lock-unlock-and-delete.yaml b/samples/tasks/scenarios/nova/boot-lock-unlock-and-delete.yaml index b1f9e788..5dd98237 100644 --- a/samples/tasks/scenarios/nova/boot-lock-unlock-and-delete.yaml +++ b/samples/tasks/scenarios/nova/boot-lock-unlock-and-delete.yaml @@ -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: diff --git a/samples/tasks/scenarios/nova/boot-server-attach-created-volume-and-live-migrate.json b/samples/tasks/scenarios/nova/boot-server-attach-created-volume-and-live-migrate.json index 118d2bd1..62e34641 100644 --- a/samples/tasks/scenarios/nova/boot-server-attach-created-volume-and-live-migrate.json +++ b/samples/tasks/scenarios/nova/boot-server-attach-created-volume-and-live-migrate.json @@ -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": { diff --git a/samples/tasks/scenarios/nova/boot-server-attach-created-volume-and-live-migrate.yaml b/samples/tasks/scenarios/nova/boot-server-attach-created-volume-and-live-migrate.yaml index a2165a96..0a27d103 100644 --- a/samples/tasks/scenarios/nova/boot-server-attach-created-volume-and-live-migrate.yaml +++ b/samples/tasks/scenarios/nova/boot-server-attach-created-volume-and-live-migrate.yaml @@ -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 diff --git a/samples/tasks/scenarios/nova/boot-server-from-volume-and-live-migrate.json b/samples/tasks/scenarios/nova/boot-server-from-volume-and-live-migrate.json index cc31ea81..33ee9c7f 100644 --- a/samples/tasks/scenarios/nova/boot-server-from-volume-and-live-migrate.json +++ b/samples/tasks/scenarios/nova/boot-server-from-volume-and-live-migrate.json @@ -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$" diff --git a/samples/tasks/scenarios/nova/boot-server-from-volume-and-live-migrate.yaml b/samples/tasks/scenarios/nova/boot-server-from-volume-and-live-migrate.yaml index a1ad81a6..51979d6f 100644 --- a/samples/tasks/scenarios/nova/boot-server-from-volume-and-live-migrate.yaml +++ b/samples/tasks/scenarios/nova/boot-server-from-volume-and-live-migrate.yaml @@ -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 diff --git a/samples/tasks/scenarios/nova/boot-snapshot-boot-delete.json b/samples/tasks/scenarios/nova/boot-snapshot-boot-delete.json index 5e8e95d0..4893e8d4 100644 --- a/samples/tasks/scenarios/nova/boot-snapshot-boot-delete.json +++ b/samples/tasks/scenarios/nova/boot-snapshot-boot-delete.json @@ -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$" diff --git a/samples/tasks/scenarios/nova/boot-snapshot-boot-delete.yaml b/samples/tasks/scenarios/nova/boot-snapshot-boot-delete.yaml index 08df8215..d7573c32 100644 --- a/samples/tasks/scenarios/nova/boot-snapshot-boot-delete.yaml +++ b/samples/tasks/scenarios/nova/boot-snapshot-boot-delete.yaml @@ -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 diff --git a/samples/tasks/scenarios/nova/boot.json b/samples/tasks/scenarios/nova/boot.json index 4e68c514..7dc5b160 100644 --- a/samples/tasks/scenarios/nova/boot.json +++ b/samples/tasks/scenarios/nova/boot.json @@ -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$" diff --git a/samples/tasks/scenarios/nova/boot.yaml b/samples/tasks/scenarios/nova/boot.yaml index 5da0cc28..771d1e16 100644 --- a/samples/tasks/scenarios/nova/boot.yaml +++ b/samples/tasks/scenarios/nova/boot.yaml @@ -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: diff --git a/samples/tasks/scenarios/nova/list-servers.json b/samples/tasks/scenarios/nova/list-servers.json index 3cca3fc3..ac1d8670 100644 --- a/samples/tasks/scenarios/nova/list-servers.json +++ b/samples/tasks/scenarios/nova/list-servers.json @@ -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$" diff --git a/samples/tasks/scenarios/nova/list-servers.yaml b/samples/tasks/scenarios/nova/list-servers.yaml index 4d874987..656771ed 100644 --- a/samples/tasks/scenarios/nova/list-servers.yaml +++ b/samples/tasks/scenarios/nova/list-servers.yaml @@ -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 diff --git a/samples/tasks/scenarios/nova/pause-and-unpause.json b/samples/tasks/scenarios/nova/pause-and-unpause.json index 9bcff1e1..e4e7c0f7 100644 --- a/samples/tasks/scenarios/nova/pause-and-unpause.json +++ b/samples/tasks/scenarios/nova/pause-and-unpause.json @@ -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$" diff --git a/samples/tasks/scenarios/nova/pause-and-unpause.yaml b/samples/tasks/scenarios/nova/pause-and-unpause.yaml index 58b781d7..2c9ef186 100644 --- a/samples/tasks/scenarios/nova/pause-and-unpause.yaml +++ b/samples/tasks/scenarios/nova/pause-and-unpause.yaml @@ -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 diff --git a/samples/tasks/scenarios/nova/resize-server.json b/samples/tasks/scenarios/nova/resize-server.json index 59964e3a..10348072 100644 --- a/samples/tasks/scenarios/nova/resize-server.json +++ b/samples/tasks/scenarios/nova/resize-server.json @@ -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$" diff --git a/samples/tasks/scenarios/nova/resize-server.yaml b/samples/tasks/scenarios/nova/resize-server.yaml index ad9e4090..f3c7a419 100644 --- a/samples/tasks/scenarios/nova/resize-server.yaml +++ b/samples/tasks/scenarios/nova/resize-server.yaml @@ -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: diff --git a/samples/tasks/scenarios/nova/shelve-and-unshelve.json b/samples/tasks/scenarios/nova/shelve-and-unshelve.json index ec698bfb..ba298f22 100644 --- a/samples/tasks/scenarios/nova/shelve-and-unshelve.json +++ b/samples/tasks/scenarios/nova/shelve-and-unshelve.json @@ -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$" diff --git a/samples/tasks/scenarios/nova/shelve-and-unshelve.yaml b/samples/tasks/scenarios/nova/shelve-and-unshelve.yaml index 8b48a29d..7b6f24b9 100644 --- a/samples/tasks/scenarios/nova/shelve-and-unshelve.yaml +++ b/samples/tasks/scenarios/nova/shelve-and-unshelve.yaml @@ -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 diff --git a/samples/tasks/scenarios/nova/suspend-and-resume.json b/samples/tasks/scenarios/nova/suspend-and-resume.json index 9f0ecd6f..27f15b4c 100644 --- a/samples/tasks/scenarios/nova/suspend-and-resume.json +++ b/samples/tasks/scenarios/nova/suspend-and-resume.json @@ -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$" diff --git a/samples/tasks/scenarios/nova/suspend-and-resume.yaml b/samples/tasks/scenarios/nova/suspend-and-resume.yaml index db30ece3..586b3c3f 100644 --- a/samples/tasks/scenarios/nova/suspend-and-resume.yaml +++ b/samples/tasks/scenarios/nova/suspend-and-resume.yaml @@ -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 diff --git a/samples/tasks/scenarios/vm/boot-runcommand-delete-with-disk.json b/samples/tasks/scenarios/vm/boot-runcommand-delete-with-disk.json index f5d3a89e..35aa8c5c 100644 --- a/samples/tasks/scenarios/vm/boot-runcommand-delete-with-disk.json +++ b/samples/tasks/scenarios/vm/boot-runcommand-delete-with-disk.json @@ -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$" diff --git a/samples/tasks/scenarios/vm/boot-runcommand-delete-with-disk.yaml b/samples/tasks/scenarios/vm/boot-runcommand-delete-with-disk.yaml index d1298590..a8171bfe 100644 --- a/samples/tasks/scenarios/vm/boot-runcommand-delete-with-disk.yaml +++ b/samples/tasks/scenarios/vm/boot-runcommand-delete-with-disk.yaml @@ -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: diff --git a/samples/tasks/scenarios/vm/boot-runcommand-delete.json b/samples/tasks/scenarios/vm/boot-runcommand-delete.json index 16c03b63..b1cf0dcd 100644 --- a/samples/tasks/scenarios/vm/boot-runcommand-delete.json +++ b/samples/tasks/scenarios/vm/boot-runcommand-delete.json @@ -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$" diff --git a/samples/tasks/scenarios/vm/boot-runcommand-delete.yaml b/samples/tasks/scenarios/vm/boot-runcommand-delete.yaml index 8356616c..ea993df0 100644 --- a/samples/tasks/scenarios/vm/boot-runcommand-delete.yaml +++ b/samples/tasks/scenarios/vm/boot-runcommand-delete.yaml @@ -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" diff --git a/tests/unit/doc/test_task_samples.py b/tests/unit/doc/test_task_samples.py index 103c05a7..71b087dc 100644 --- a/tests/unit/doc/test_task_samples.py +++ b/tests/unit/doc/test_task_samples.py @@ -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)) \ No newline at end of file