Merge "Convert existing scenarios to new types plugins"
This commit is contained in:
commit
d6722f0f76
@ -33,7 +33,7 @@ class CinderVolumes(cinder_utils.CinderScenario,
|
||||
glance_utils.GlanceScenario):
|
||||
"""Benchmark scenarios for Cinder Volumes."""
|
||||
|
||||
@types.set(image=types.ImageResourceType)
|
||||
@types.convert(image={"type": "glance_image"})
|
||||
@validation.image_exists("image", nullable=True)
|
||||
@validation.required_services(consts.Service.CINDER)
|
||||
@validation.required_openstack(users=True)
|
||||
@ -80,7 +80,7 @@ class CinderVolumes(cinder_utils.CinderScenario,
|
||||
|
||||
self._list_volumes(detailed)
|
||||
|
||||
@types.set(image=types.ImageResourceType)
|
||||
@types.convert(image={"type": "glance_image"})
|
||||
@validation.image_exists("image", nullable=True)
|
||||
@validation.required_services(consts.Service.CINDER)
|
||||
@validation.required_openstack(users=True)
|
||||
@ -102,7 +102,7 @@ class CinderVolumes(cinder_utils.CinderScenario,
|
||||
volume = self._create_volume(size, **create_volume_kwargs)
|
||||
self._update_volume(volume, **update_volume_kwargs)
|
||||
|
||||
@types.set(image=types.ImageResourceType)
|
||||
@types.convert(image={"type": "glance_image"})
|
||||
@validation.image_exists("image", nullable=True)
|
||||
@validation.required_services(consts.Service.CINDER)
|
||||
@validation.required_openstack(users=True)
|
||||
@ -135,7 +135,7 @@ class CinderVolumes(cinder_utils.CinderScenario,
|
||||
self.sleep_between(min_sleep, max_sleep)
|
||||
self._delete_volume(volume)
|
||||
|
||||
@types.set(image=types.ImageResourceType)
|
||||
@types.convert(image={"type": "glance_image"})
|
||||
@validation.image_exists("image", nullable=True)
|
||||
@validation.required_services(consts.Service.CINDER)
|
||||
@validation.required_openstack(users=True)
|
||||
@ -272,8 +272,8 @@ class CinderVolumes(cinder_utils.CinderScenario,
|
||||
self.sleep_between(min_sleep, max_sleep)
|
||||
self._delete_snapshot(snapshot)
|
||||
|
||||
@types.set(image=types.ImageResourceType,
|
||||
flavor=types.FlavorResourceType)
|
||||
@types.convert(image={"type": "glance_image"},
|
||||
flavor={"type": "nova_flavor"})
|
||||
@validation.image_valid_on_flavor("flavor", "image")
|
||||
@validation.required_services(consts.Service.NOVA, consts.Service.CINDER)
|
||||
@validation.required_openstack(users=True)
|
||||
|
@ -37,8 +37,8 @@ class EC2Servers(utils.EC2Scenario):
|
||||
"""
|
||||
self._list_servers()
|
||||
|
||||
@types.set(image=types.EC2ImageResourceType,
|
||||
flavor=types.EC2FlavorResourceType)
|
||||
@types.convert(image={"type": "ec2_image"},
|
||||
flavor={"type": "ec2_flavor"})
|
||||
@validation.image_valid_on_flavor("flavor", "image")
|
||||
@validation.required_services(consts.Service.EC2)
|
||||
@validation.required_openstack(users=True)
|
||||
|
@ -24,7 +24,7 @@ from rally.task import validation
|
||||
class GlanceImages(utils.GlanceScenario, nova_utils.NovaScenario):
|
||||
"""Benchmark scenarios for Glance images."""
|
||||
|
||||
@types.set(image_location=types.FilePathOrUrlType)
|
||||
@types.convert(image_location={"type": "path_or_url"})
|
||||
@validation.required_services(consts.Service.GLANCE)
|
||||
@validation.required_openstack(users=True)
|
||||
@scenario.configure(context={"cleanup": ["glance"]})
|
||||
@ -89,7 +89,7 @@ class GlanceImages(utils.GlanceScenario, nova_utils.NovaScenario):
|
||||
**kwargs)
|
||||
self._delete_image(image)
|
||||
|
||||
@types.set(flavor=types.FlavorResourceType)
|
||||
@types.convert(flavor={"type": "nova_flavor"})
|
||||
@validation.flavor_exists("flavor")
|
||||
@validation.required_services(consts.Service.GLANCE, consts.Service.NOVA)
|
||||
@validation.required_openstack(users=True)
|
||||
|
@ -24,7 +24,7 @@ from rally.task import validation
|
||||
class HeatStacks(utils.HeatScenario):
|
||||
"""Benchmark scenarios for Heat stacks."""
|
||||
|
||||
@types.set(template_path=types.FileType, files=types.FileTypeDict)
|
||||
@types.convert(template_path={"type": "file"}, files={"type": "file_dict"})
|
||||
@validation.required_services(consts.Service.HEAT)
|
||||
@validation.required_openstack(users=True)
|
||||
@scenario.configure(context={"cleanup": ["heat"]})
|
||||
@ -55,7 +55,7 @@ class HeatStacks(utils.HeatScenario):
|
||||
for stack in stacks:
|
||||
self.clients("heat").resources.list(stack.id)
|
||||
|
||||
@types.set(template_path=types.FileType, files=types.FileTypeDict)
|
||||
@types.convert(template_path={"type": "file"}, files={"type": "file_dict"})
|
||||
@validation.required_services(consts.Service.HEAT)
|
||||
@validation.required_openstack(users=True)
|
||||
@scenario.configure(context={"cleanup": ["heat"]})
|
||||
@ -76,7 +76,7 @@ class HeatStacks(utils.HeatScenario):
|
||||
files, environment)
|
||||
self._delete_stack(stack)
|
||||
|
||||
@types.set(template_path=types.FileType, files=types.FileTypeDict)
|
||||
@types.convert(template_path={"type": "file"}, files={"type": "file_dict"})
|
||||
@validation.required_services(consts.Service.HEAT)
|
||||
@validation.required_openstack(users=True)
|
||||
@scenario.configure(context={"cleanup": ["heat"]})
|
||||
@ -100,10 +100,10 @@ class HeatStacks(utils.HeatScenario):
|
||||
self._check_stack(stack)
|
||||
self._delete_stack(stack)
|
||||
|
||||
@types.set(template_path=types.FileType,
|
||||
updated_template_path=types.FileType,
|
||||
files=types.FileTypeDict,
|
||||
updated_files=types.FileTypeDict)
|
||||
@types.convert(template_path={"type": "file"},
|
||||
updated_template_path={"type": "file"},
|
||||
files={"type": "file_dict"},
|
||||
updated_files={"type": "file_dict"})
|
||||
@validation.required_services(consts.Service.HEAT)
|
||||
@validation.required_openstack(users=True)
|
||||
@scenario.configure(context={"cleanup": ["heat"]})
|
||||
@ -138,7 +138,7 @@ class HeatStacks(utils.HeatScenario):
|
||||
updated_environment or environment)
|
||||
self._delete_stack(stack)
|
||||
|
||||
@types.set(template_path=types.FileType, files=types.FileTypeDict)
|
||||
@types.convert(template_path={"type": "file"}, files={"type": "file_dict"})
|
||||
@validation.required_services(consts.Service.HEAT)
|
||||
@validation.required_openstack(users=True)
|
||||
@scenario.configure(context={"cleanup": ["heat"]})
|
||||
@ -175,7 +175,7 @@ class HeatStacks(utils.HeatScenario):
|
||||
environment)
|
||||
self._scale_stack(stack, output_key, delta)
|
||||
|
||||
@types.set(template_path=types.FileType, files=types.FileTypeDict)
|
||||
@types.convert(template_path={"type": "file"}, files={"type": "file_dict"})
|
||||
@validation.required_services(consts.Service.HEAT)
|
||||
@validation.required_openstack(users=True)
|
||||
@scenario.configure(context={"cleanup": ["heat"]})
|
||||
@ -213,7 +213,7 @@ class HeatStacks(utils.HeatScenario):
|
||||
for stack in stacks:
|
||||
self.clients("heat").events.list(stack.id)
|
||||
|
||||
@types.set(template_path=types.FileType, files=types.FileTypeDict)
|
||||
@types.convert(template_path={"type": "file"}, files={"type": "file_dict"})
|
||||
@validation.required_services(consts.Service.HEAT)
|
||||
@validation.required_openstack(users=True)
|
||||
@scenario.configure(context={"cleanup": ["heat"]})
|
||||
|
@ -35,7 +35,7 @@ class MistralWorkbooks(utils.MistralScenario):
|
||||
"""
|
||||
self._list_workbooks()
|
||||
|
||||
@types.set(definition=types.FileType)
|
||||
@types.convert(definition={"type": "file"})
|
||||
@validation.file_exists("definition")
|
||||
@validation.required_parameters("definition")
|
||||
@validation.required_clients("mistral")
|
||||
|
@ -52,8 +52,8 @@ class NovaKeypair(utils.NovaScenario):
|
||||
keypair = self._create_keypair(**kwargs)
|
||||
self._delete_keypair(keypair)
|
||||
|
||||
@types.set(image=types.ImageResourceType,
|
||||
flavor=types.FlavorResourceType)
|
||||
@types.convert(image={"type": "glance_image"},
|
||||
flavor={"type": "nova_flavor"})
|
||||
@validation.image_valid_on_flavor("flavor", "image")
|
||||
@validation.required_services(consts.Service.NOVA)
|
||||
@validation.required_openstack(users=True)
|
||||
|
@ -33,8 +33,8 @@ class NovaServers(utils.NovaScenario,
|
||||
cinder_utils.CinderScenario):
|
||||
"""Benchmark scenarios for Nova servers."""
|
||||
|
||||
@types.set(image=types.ImageResourceType,
|
||||
flavor=types.FlavorResourceType)
|
||||
@types.convert(image={"type": "glance_image"},
|
||||
flavor={"type": "nova_flavor"})
|
||||
@validation.image_valid_on_flavor("flavor", "image")
|
||||
@validation.required_services(consts.Service.NOVA)
|
||||
@validation.required_openstack(users=True)
|
||||
@ -74,8 +74,8 @@ class NovaServers(utils.NovaScenario,
|
||||
"""
|
||||
self._list_servers(detailed)
|
||||
|
||||
@types.set(image=types.ImageResourceType,
|
||||
flavor=types.FlavorResourceType)
|
||||
@types.convert(image={"type": "glance_image"},
|
||||
flavor={"type": "nova_flavor"})
|
||||
@validation.image_valid_on_flavor("flavor", "image")
|
||||
@validation.required_services(consts.Service.NOVA)
|
||||
@validation.required_openstack(users=True)
|
||||
@ -100,8 +100,8 @@ class NovaServers(utils.NovaScenario,
|
||||
self.sleep_between(min_sleep, max_sleep)
|
||||
self._delete_server(server, force=force_delete)
|
||||
|
||||
@types.set(image=types.ImageResourceType,
|
||||
flavor=types.FlavorResourceType)
|
||||
@types.convert(image={"type": "glance_image"},
|
||||
flavor={"type": "nova_flavor"})
|
||||
@validation.image_valid_on_flavor("flavor", "image")
|
||||
@validation.required_services(consts.Service.NOVA)
|
||||
@validation.required_openstack(admin=True, users=True)
|
||||
@ -127,8 +127,8 @@ class NovaServers(utils.NovaScenario,
|
||||
self.sleep_between(min_sleep, max_sleep)
|
||||
self._delete_servers(servers, force=force_delete)
|
||||
|
||||
@types.set(image=types.ImageResourceType,
|
||||
flavor=types.FlavorResourceType)
|
||||
@types.convert(image={"type": "glance_image"},
|
||||
flavor={"type": "nova_flavor"})
|
||||
@validation.image_valid_on_flavor("flavor", "image")
|
||||
@validation.required_services(consts.Service.NOVA, consts.Service.CINDER)
|
||||
@validation.required_openstack(users=True)
|
||||
@ -160,8 +160,8 @@ class NovaServers(utils.NovaScenario,
|
||||
self.sleep_between(min_sleep, max_sleep)
|
||||
self._delete_server(server, force=force_delete)
|
||||
|
||||
@types.set(image=types.ImageResourceType,
|
||||
flavor=types.FlavorResourceType)
|
||||
@types.convert(image={"type": "glance_image"},
|
||||
flavor={"type": "nova_flavor"})
|
||||
@validation.image_valid_on_flavor("flavor", "image")
|
||||
@validation.required_services(consts.Service.NOVA)
|
||||
@validation.required_openstack(users=True)
|
||||
@ -196,8 +196,8 @@ class NovaServers(utils.NovaScenario,
|
||||
action()
|
||||
self._delete_server(server, force=force_delete)
|
||||
|
||||
@types.set(image=types.ImageResourceType,
|
||||
flavor=types.FlavorResourceType)
|
||||
@types.convert(image={"type": "glance_image"},
|
||||
flavor={"type": "nova_flavor"})
|
||||
@validation.image_valid_on_flavor("flavor", "image")
|
||||
@validation.required_services(consts.Service.NOVA)
|
||||
@validation.required_openstack(users=True)
|
||||
@ -227,8 +227,8 @@ class NovaServers(utils.NovaScenario,
|
||||
self._unlock_server(server)
|
||||
self._delete_server(server, force=force_delete)
|
||||
|
||||
@types.set(image=types.ImageResourceType,
|
||||
flavor=types.FlavorResourceType)
|
||||
@types.convert(image={"type": "glance_image"},
|
||||
flavor={"type": "nova_flavor"})
|
||||
@validation.image_valid_on_flavor("flavor", "image")
|
||||
@validation.required_services(consts.Service.NOVA, consts.Service.GLANCE)
|
||||
@validation.required_openstack(users=True)
|
||||
@ -251,8 +251,8 @@ class NovaServers(utils.NovaScenario,
|
||||
self._delete_server(server, force=force_delete)
|
||||
self._delete_image(image)
|
||||
|
||||
@types.set(image=types.ImageResourceType,
|
||||
flavor=types.FlavorResourceType)
|
||||
@types.convert(image={"type": "glance_image"},
|
||||
flavor={"type": "nova_flavor"})
|
||||
@validation.image_valid_on_flavor("flavor", "image")
|
||||
@validation.required_services(consts.Service.NOVA)
|
||||
@validation.required_openstack(users=True)
|
||||
@ -270,8 +270,8 @@ class NovaServers(utils.NovaScenario,
|
||||
self._boot_server(image, flavor,
|
||||
auto_assign_nic=auto_assign_nic, **kwargs)
|
||||
|
||||
@types.set(image=types.ImageResourceType,
|
||||
flavor=types.FlavorResourceType)
|
||||
@types.convert(image={"type": "glance_image"},
|
||||
flavor={"type": "nova_flavor"})
|
||||
@validation.image_valid_on_flavor("flavor", "image")
|
||||
@validation.required_services(consts.Service.NOVA, consts.Service.CINDER)
|
||||
@validation.required_openstack(users=True)
|
||||
@ -336,9 +336,9 @@ class NovaServers(utils.NovaScenario,
|
||||
self._rescue_server(server)
|
||||
self._unrescue_server(server)
|
||||
|
||||
@types.set(image=types.ImageResourceType,
|
||||
flavor=types.FlavorResourceType,
|
||||
to_flavor=types.FlavorResourceType)
|
||||
@types.convert(image={"type": "glance_image"},
|
||||
flavor={"type": "nova_flavor"},
|
||||
to_flavor={"type": "nova_flavor"})
|
||||
@validation.image_valid_on_flavor("flavor", "image")
|
||||
@validation.required_services(consts.Service.NOVA)
|
||||
@validation.required_openstack(users=True)
|
||||
@ -366,9 +366,9 @@ class NovaServers(utils.NovaScenario,
|
||||
self._resize_revert(server)
|
||||
self._delete_server(server, force=force_delete)
|
||||
|
||||
@types.set(image=types.ImageResourceType,
|
||||
flavor=types.FlavorResourceType,
|
||||
to_flavor=types.FlavorResourceType)
|
||||
@types.convert(image={"type": "glance_image"},
|
||||
flavor={"type": "nova_flavor"},
|
||||
to_flavor={"type": "nova_flavor"})
|
||||
@validation.image_valid_on_flavor("flavor", "image")
|
||||
@validation.required_services(consts.Service.NOVA, consts.Service.CINDER)
|
||||
@validation.required_openstack(users=True)
|
||||
@ -417,9 +417,9 @@ class NovaServers(utils.NovaScenario,
|
||||
self._delete_volume(volume)
|
||||
self._delete_server(server, force=force_delete)
|
||||
|
||||
@types.set(image=types.ImageResourceType,
|
||||
flavor=types.FlavorResourceType,
|
||||
to_flavor=types.FlavorResourceType)
|
||||
@types.convert(image={"type": "glance_image"},
|
||||
flavor={"type": "nova_flavor"},
|
||||
to_flavor={"type": "nova_flavor"})
|
||||
@validation.image_valid_on_flavor("flavor", "image")
|
||||
@validation.required_services(consts.Service.NOVA, consts.Service.CINDER)
|
||||
@validation.required_openstack(users=True)
|
||||
@ -474,8 +474,8 @@ class NovaServers(utils.NovaScenario,
|
||||
if do_delete:
|
||||
self._delete_server(server, force=force_delete)
|
||||
|
||||
@types.set(image=types.ImageResourceType,
|
||||
flavor=types.FlavorResourceType)
|
||||
@types.convert(image={"type": "glance_image"},
|
||||
flavor={"type": "nova_flavor"})
|
||||
@validation.image_valid_on_flavor("flavor", "image")
|
||||
@validation.required_services(consts.Service.NOVA)
|
||||
@validation.required_openstack(users=True)
|
||||
@ -494,8 +494,8 @@ class NovaServers(utils.NovaScenario,
|
||||
self._resume_server(server)
|
||||
self._delete_server(server, force=force_delete)
|
||||
|
||||
@types.set(image=types.ImageResourceType,
|
||||
flavor=types.FlavorResourceType)
|
||||
@types.convert(image={"type": "glance_image"},
|
||||
flavor={"type": "nova_flavor"})
|
||||
@validation.image_valid_on_flavor("flavor", "image")
|
||||
@validation.required_services(consts.Service.NOVA)
|
||||
@validation.required_openstack(users=True)
|
||||
@ -514,8 +514,8 @@ class NovaServers(utils.NovaScenario,
|
||||
self._unpause_server(server)
|
||||
self._delete_server(server, force=force_delete)
|
||||
|
||||
@types.set(image=types.ImageResourceType,
|
||||
flavor=types.FlavorResourceType)
|
||||
@types.convert(image={"type": "glance_image"},
|
||||
flavor={"type": "nova_flavor"})
|
||||
@validation.image_valid_on_flavor("flavor", "image")
|
||||
@validation.required_services(consts.Service.NOVA)
|
||||
@validation.required_openstack(users=True)
|
||||
@ -534,8 +534,8 @@ class NovaServers(utils.NovaScenario,
|
||||
self._unshelve_server(server)
|
||||
self._delete_server(server, force=force_delete)
|
||||
|
||||
@types.set(image=types.ImageResourceType,
|
||||
flavor=types.FlavorResourceType)
|
||||
@types.convert(image={"type": "glance_image"},
|
||||
flavor={"type": "nova_flavor"})
|
||||
@validation.image_valid_on_flavor("flavor", "image")
|
||||
@validation.required_services(consts.Service.NOVA)
|
||||
@validation.required_openstack(admin=True, users=True)
|
||||
@ -572,8 +572,8 @@ class NovaServers(utils.NovaScenario,
|
||||
|
||||
self._delete_server(server)
|
||||
|
||||
@types.set(image=types.ImageResourceType,
|
||||
flavor=types.FlavorResourceType)
|
||||
@types.convert(image={"type": "glance_image"},
|
||||
flavor={"type": "nova_flavor"})
|
||||
@validation.image_valid_on_flavor("flavor", "image")
|
||||
@validation.required_services(consts.Service.NOVA, consts.Service.CINDER)
|
||||
@validation.required_openstack(admin=True, users=True)
|
||||
@ -620,8 +620,8 @@ class NovaServers(utils.NovaScenario,
|
||||
|
||||
self._delete_server(server, force=force_delete)
|
||||
|
||||
@types.set(image=types.ImageResourceType,
|
||||
flavor=types.FlavorResourceType)
|
||||
@types.convert(image={"type": "glance_image"},
|
||||
flavor={"type": "nova_flavor"})
|
||||
@validation.image_valid_on_flavor("flavor", "image")
|
||||
@validation.required_services(consts.Service.NOVA, consts.Service.CINDER)
|
||||
@validation.required_openstack(admin=True, users=True)
|
||||
@ -679,8 +679,8 @@ class NovaServers(utils.NovaScenario,
|
||||
self._delete_volume(volume)
|
||||
self._delete_server(server)
|
||||
|
||||
@types.set(image=types.ImageResourceType,
|
||||
flavor=types.FlavorResourceType)
|
||||
@types.convert(image={"type": "glance_image"},
|
||||
flavor={"type": "nova_flavor"})
|
||||
@validation.image_valid_on_flavor("flavor", "image")
|
||||
@validation.required_services(consts.Service.NOVA)
|
||||
@validation.required_openstack(admin=True, users=True)
|
||||
@ -708,9 +708,9 @@ class NovaServers(utils.NovaScenario,
|
||||
self._resize_revert(server, status="SHUTOFF")
|
||||
self._delete_server(server)
|
||||
|
||||
@types.set(from_image=types.ImageResourceType,
|
||||
to_image=types.ImageResourceType,
|
||||
flavor=types.FlavorResourceType)
|
||||
@types.convert(from_image={"type": "glance_image"},
|
||||
to_image={"type": "glance_image"},
|
||||
flavor={"type": "nova_flavor"})
|
||||
@validation.image_valid_on_flavor("flavor", "from_image")
|
||||
@validation.image_valid_on_flavor("flavor", "to_image")
|
||||
@validation.required_services(consts.Service.NOVA)
|
||||
@ -731,8 +731,8 @@ class NovaServers(utils.NovaScenario,
|
||||
self._rebuild_server(server, to_image)
|
||||
self._delete_server(server)
|
||||
|
||||
@types.set(image=types.ImageResourceType,
|
||||
flavor=types.FlavorResourceType)
|
||||
@types.convert(image={"type": "glance_image"},
|
||||
flavor={"type": "nova_flavor"})
|
||||
@validation.image_valid_on_flavor("flavor", "image")
|
||||
@validation.required_services(consts.Service.NOVA)
|
||||
@validation.required_openstack(users=True)
|
||||
@ -750,8 +750,8 @@ class NovaServers(utils.NovaScenario,
|
||||
tenant_id=server.tenant_id)
|
||||
self._associate_floating_ip(server, address["ip"])
|
||||
|
||||
@types.set(image=types.ImageResourceType,
|
||||
flavor=types.FlavorResourceType)
|
||||
@types.convert(image={"type": "glance_image"},
|
||||
flavor={"type": "nova_flavor"})
|
||||
@validation.image_valid_on_flavor("flavor", "image")
|
||||
@validation.required_services(consts.Service.NOVA)
|
||||
@validation.required_openstack(users=True)
|
||||
@ -770,8 +770,8 @@ class NovaServers(utils.NovaScenario,
|
||||
server = self._boot_server(image, flavor, **kwargs)
|
||||
self._show_server(server)
|
||||
|
||||
@types.set(image=types.ImageResourceType,
|
||||
flavor=types.FlavorResourceType)
|
||||
@types.convert(image={"type": "glance_image"},
|
||||
flavor={"type": "nova_flavor"})
|
||||
@validation.image_valid_on_flavor("flavor", "image")
|
||||
@validation.required_services(consts.Service.NOVA)
|
||||
@validation.required_openstack(users=True)
|
||||
|
@ -26,11 +26,11 @@ LOG = logging.getLogger(__name__)
|
||||
class SaharaClusters(utils.SaharaScenario):
|
||||
"""Benchmark scenarios for Sahara clusters."""
|
||||
|
||||
@types.set(flavor=types.FlavorResourceType,
|
||||
master_flavor=types.FlavorResourceType,
|
||||
worker_flavor=types.FlavorResourceType,
|
||||
neutron_net=types.NeutronNetworkResourceType,
|
||||
floating_ip_pool=types.NeutronNetworkResourceType)
|
||||
@types.convert(flavor={"type": "nova_flavor"},
|
||||
master_flavor={"type": "nova_flavor"},
|
||||
worker_flavor={"type": "nova_flavor"},
|
||||
neutron_net={"type": "neutron_network"},
|
||||
floating_ip_pool={"type": "neutron_network"})
|
||||
@validation.flavor_exists("master_flavor")
|
||||
@validation.flavor_exists("worker_flavor")
|
||||
@validation.required_contexts("users", "sahara_image")
|
||||
@ -113,9 +113,9 @@ class SaharaClusters(utils.SaharaScenario):
|
||||
|
||||
self._delete_cluster(cluster)
|
||||
|
||||
@types.set(flavor=types.FlavorResourceType,
|
||||
master_flavor=types.FlavorResourceType,
|
||||
worker_flavor=types.FlavorResourceType)
|
||||
@types.convert(flavor={"type": "nova_flavor"},
|
||||
master_flavor={"type": "nova_flavor"},
|
||||
worker_flavor={"type": "nova_flavor"})
|
||||
@validation.flavor_exists("master_flavor")
|
||||
@validation.flavor_exists("worker_flavor")
|
||||
@validation.required_services(consts.Service.SAHARA)
|
||||
|
@ -23,7 +23,7 @@ from rally.task import validation
|
||||
class SaharaNodeGroupTemplates(utils.SaharaScenario):
|
||||
"""Benchmark scenarios for Sahara node group templates."""
|
||||
|
||||
@types.set(flavor=types.FlavorResourceType)
|
||||
@types.convert(flavor={"type": "nova_flavor"})
|
||||
@validation.flavor_exists("flavor")
|
||||
@validation.required_services(consts.Service.SAHARA)
|
||||
@validation.required_openstack(users=True)
|
||||
@ -58,7 +58,7 @@ class SaharaNodeGroupTemplates(utils.SaharaScenario):
|
||||
hadoop_version=hadoop_version)
|
||||
self._list_node_group_templates()
|
||||
|
||||
@types.set(flavor=types.FlavorResourceType)
|
||||
@types.convert(flavor={"type": "nova_flavor"})
|
||||
@validation.flavor_exists("flavor")
|
||||
@validation.required_services(consts.Service.SAHARA)
|
||||
@validation.required_openstack(users=True)
|
||||
|
@ -36,8 +36,8 @@ class VMTasks(vm_utils.VMScenario):
|
||||
def __init__(self, *args, **kwargs):
|
||||
super(VMTasks, self).__init__(*args, **kwargs)
|
||||
|
||||
@types.set(image=types.ImageResourceType,
|
||||
flavor=types.FlavorResourceType)
|
||||
@types.convert(image={"type": "glance_image"},
|
||||
flavor={"type": "nova_flavor"})
|
||||
@validation.image_valid_on_flavor("flavor", "image")
|
||||
@validation.valid_command("command")
|
||||
@validation.number("port", minval=1, maxval=65535, nullable=True,
|
||||
@ -192,8 +192,8 @@ class VMTasks(vm_utils.VMScenario):
|
||||
|
||||
return {"data": data, "errors": err}
|
||||
|
||||
@types.set(image=types.ImageResourceType,
|
||||
flavor=types.FlavorResourceType)
|
||||
@types.convert(image={"type": "glance_image"},
|
||||
flavor={"type": "nova_flavor"})
|
||||
@validation.number("port", minval=1, maxval=65535, nullable=True,
|
||||
integer_only=True)
|
||||
@validation.valid_command("command")
|
||||
|
Loading…
Reference in New Issue
Block a user