Fix some CI task files

Fix image_name to work with both devstack and MOS
Remove hardcoded paths
Add missing fake image file
Use os.expanduser in glance utils

Change-Id: Ie805a332f98431702b16c3b6a47f76a562e09f7a
This commit is contained in:
Sergey Skripnick 2015-04-20 21:02:00 +02:00
parent f9f5ad73ad
commit d565af3a6d
8 changed files with 31 additions and 30 deletions

View File

@ -1,4 +1,4 @@
{% set image_name = "^cirros.*uec$" %}
{% set image_name = "^(cirros.*uec|TestVM)$" %}
---
Authenticate.validate_cinder:
-

View File

View File

@ -2,7 +2,7 @@
HeatStacks.create_and_list_stack:
-
args:
template_path: "/home/jenkins/.rally/extra/default.yaml.template"
template_path: "~/.rally/extra/default.yaml.template"
runner:
type: "constant"
times: 6
@ -18,7 +18,7 @@
HeatStacks.create_and_delete_stack:
-
args:
template_path: "/home/jenkins/.rally/extra/default.yaml.template"
template_path: "~/.rally/extra/default.yaml.template"
runner:
type: "constant"
times: 6
@ -33,7 +33,7 @@
-
args:
template_path: "/home/jenkins/.rally/extra/server_with_volume.yaml.template"
template_path: "~/.rally/extra/server_with_volume.yaml.template"
runner:
type: "constant"
times: 2
@ -48,10 +48,10 @@
-
args:
template_path: "/home/jenkins/.rally/extra/resource_group_server_with_volume.yaml.template"
template_path: "~/.rally/extra/resource_group_server_with_volume.yaml.template"
parameters:
num_instances: 2
files: ["/home/jenkins/.rally/extra/server_with_volume.yaml.template"]
files: ["~/.rally/extra/server_with_volume.yaml.template"]
runner:
type: "constant"
times: 2
@ -67,7 +67,7 @@
HeatStacks.create_check_delete_stack:
-
args:
template_path: "/home/jenkins/.rally/extra/random_strings.yaml.template"
template_path: "~/.rally/extra/random_strings.yaml.template"
runner:
type: "constant"
times: 6
@ -83,8 +83,8 @@
HeatStacks.create_update_delete_stack:
-
args:
template_path: "/home/jenkins/.rally/extra/random_strings.yaml.template"
updated_template_path: "/home/jenkins/.rally/extra/updated_random_strings_add.yaml.template"
template_path: "~/.rally/extra/random_strings.yaml.template"
updated_template_path: "~/.rally/extra/updated_random_strings_add.yaml.template"
runner:
type: "constant"
times: 6
@ -99,8 +99,8 @@
-
args:
template_path: "/home/jenkins/.rally/extra/random_strings.yaml.template"
updated_template_path: "/home/jenkins/.rally/extra/updated_random_strings_delete.yaml.template"
template_path: "~/.rally/extra/random_strings.yaml.template"
updated_template_path: "~/.rally/extra/updated_random_strings_delete.yaml.template"
runner:
type: "constant"
times: 6
@ -115,8 +115,8 @@
-
args:
template_path: "/home/jenkins/.rally/extra/random_strings.yaml.template"
updated_template_path: "/home/jenkins/.rally/extra/updated_random_strings_replace.yaml.template"
template_path: "~/.rally/extra/random_strings.yaml.template"
updated_template_path: "~/.rally/extra/updated_random_strings_replace.yaml.template"
runner:
type: "constant"
times: 6
@ -131,8 +131,8 @@
-
args:
template_path: "/home/jenkins/.rally/extra/autoscaling_policy.yaml.template"
updated_template_path: "/home/jenkins/.rally/extra/updated_autoscaling_policy_inplace.yaml.template"
template_path: "~/.rally/extra/autoscaling_policy.yaml.template"
updated_template_path: "~/.rally/extra/updated_autoscaling_policy_inplace.yaml.template"
runner:
type: "constant"
times: 6
@ -147,8 +147,8 @@
-
args:
template_path: "/home/jenkins/.rally/extra/resource_group.yaml.template"
updated_template_path: "/home/jenkins/.rally/extra/updated_resource_group_increase.yaml.template"
template_path: "~/.rally/extra/resource_group.yaml.template"
updated_template_path: "~/.rally/extra/updated_resource_group_increase.yaml.template"
runner:
type: "constant"
times: 6
@ -163,8 +163,8 @@
-
args:
template_path: "/home/jenkins/.rally/extra/resource_group.yaml.template"
updated_template_path: "/home/jenkins/.rally/extra/updated_resource_group_reduce.yaml.template"
template_path: "~/.rally/extra/resource_group.yaml.template"
updated_template_path: "~/.rally/extra/updated_resource_group_reduce.yaml.template"
runner:
type: "constant"
times: 6
@ -197,7 +197,7 @@
HeatStacks.create_suspend_resume_delete_stack:
-
args:
template_path: "/home/jenkins/.rally/extra/random_strings.yaml.template"
template_path: "~/.rally/extra/random_strings.yaml.template"
runner:
type: "constant"
times: 6
@ -230,7 +230,7 @@
HeatStacks.create_snapshot_restore_delete_stack:
-
args:
template_path: "/home/jenkins/.rally/extra/random_strings.yaml.template"
template_path: "~/.rally/extra/random_strings.yaml.template"
runner:
type: "constant"
times: 6
@ -246,7 +246,7 @@
HeatStacks.create_stack_and_scale:
-
args:
template_path: "/home/jenkins/.rally/extra/autoscaling_group.yaml.template"
template_path: "~/.rally/extra/autoscaling_group.yaml.template"
output_key: "scaling_url"
delta: 1
parameters:
@ -264,7 +264,7 @@
max: 0
-
args:
template_path: "/home/jenkins/.rally/extra/autoscaling_group.yaml.template"
template_path: "~/.rally/extra/autoscaling_group.yaml.template"
output_key: "scaling_url"
delta: -1
parameters:

View File

@ -1,4 +1,4 @@
{% set image_name = "^cirros.*uec$" %}
{% set image_name = "^(cirros.*uec|TestVM)$" %}
---
Authenticate.validate_nova:
-

View File

@ -16,7 +16,7 @@
MistralWorkbooks.create_workbook:
-
args:
definition: "/home/jenkins/.rally/extra/mistral_wb.yaml"
definition: "~/.rally/extra/mistral_wb.yaml"
runner:
type: "constant"
times: 50
@ -31,7 +31,7 @@
-
args:
definition: "/home/jenkins/.rally/extra/mistral_wb.yaml"
definition: "~/.rally/extra/mistral_wb.yaml"
do_delete: true
runner:
type: "constant"

View File

@ -40,7 +40,7 @@
tenants: 2
users_per_tenant: 2
murano_packages:
app_package: "/home/jenkins/.rally/extra/murano/applications/HelloReporter/io.murano.apps.HelloReporter.zip"
app_package: "~/.rally/extra/murano/applications/HelloReporter/io.murano.apps.HelloReporter.zip"
roles:
- "admin"
sla:
@ -58,7 +58,7 @@
tenants: 2
users_per_tenant: 2
murano_packages:
app_package: "/home/jenkins/.rally/extra/murano/applications/HelloReporter/io.murano.apps.HelloReporter/"
app_package: "~/.rally/extra/murano/applications/HelloReporter/io.murano.apps.HelloReporter/"
roles:
- "admin"
sla:

View File

@ -919,7 +919,7 @@
tenants: 1
users_per_tenant: 2
images:
image_url: "/home/jenkins/.rally/extra/fake-image.img"
image_url: "~/.rally/extra/fake-image.img"
image_type: "qcow2"
image_container: "bare"
images_per_tenant: 1
@ -948,7 +948,7 @@
GlanceImages.create_and_list_image:
-
args:
image_location: "/home/jenkins/.rally/extra/fake-image.img"
image_location: "~/.rally/extra/fake-image.img"
container_format: "bare"
disk_format: "qcow2"
runner:

View File

@ -85,6 +85,7 @@ class GlanceScenario(scenario.OpenStackScenario):
}
kw.update(kwargs)
image_location = os.path.expanduser(image_location)
try:
if os.path.isfile(image_location):