Modify nested_level from dict to integer

In function create_nested_snapshots_and_attach_volume, nested_level's
default value is 1, and it is used to operate with an integer
(for i in range(nested_level - 1):).

Change-Id: I4879d7cdcb5a56b83a1415c4a8fc427241ddc913
Closes-Bug: #1594656
This commit is contained in:
Lv Fumei 2016-06-21 11:47:28 +08:00
parent 0250775b00
commit 70c6500d72
2 changed files with 57 additions and 0 deletions

View File

@ -0,0 +1,34 @@
{% set flavor_name = flavor_name or "m1.tiny" %}
{
"CinderVolumes.create_nested_snapshots_and_attach_volume": [
{
"args": {
"size": {
"min": 1,
"max": 5
},
"nested_level": 5
},
"runner": {
"type": "constant",
"times": 1,
"concurrency": 1
},
"context": {
"users": {
"tenants": 2,
"users_per_tenant": 1
},
"servers": {
"image": {
"name": "^cirros.*uec$"
},
"flavor": {
"name": "{{flavor_name}}"
},
"servers_per_tenant": 2
}
}
}
]
}

View File

@ -0,0 +1,23 @@
{% set flavor_name = flavor_name or "m1.tiny" %}
---
CinderVolumes.create_nested_snapshots_and_attach_volume:
-
args:
size:
min: 1
max: 5
nested_level: 5
runner:
type: "constant"
times: 1
concurrency: 1
context:
users:
tenants: 2
users_per_tenant: 1
servers:
image:
name: "^cirros.*uec$"
flavor:
name: "{{flavor_name}}"
servers_per_tenant: 2