Add FilePathOrUrlType

This type does check whether is path or url passed, check if file
available and perform os.path.expanduser if needed.

Change-Id: I2551fbf90b1180ec9246478ee6ed64938b52d923
This commit is contained in:
Sergey Skripnick 2015-08-13 16:06:56 +02:00
parent 3cf3f28e77
commit 8353ecc905

View File

@ -27,6 +27,7 @@ class GlanceImages(utils.GlanceScenario, nova_utils.NovaScenario):
RESOURCE_NAME_PREFIX = "rally_image_"
RESOURCE_NAME_LENGTH = 16
@types.set(image_location=types.FilePathOrUrlType)
@validation.required_services(consts.Service.GLANCE)
@validation.required_openstack(users=True)
@scenario.configure(context={"cleanup": ["glance"]})