Fix bug in scenario validation
Without inheriting default meta from parent class, OpenStack scenarios do not use `args_spec` validator https://github.com/openstack/rally/blob/1.4.0/rally/task/scenario.py#L85 which is critical for checking input task config. This commit changes that behaviour. Also, this patch fixes broken samples for one of barbocan scenarios Change-Id: I281d361577135377654bde3ae60c3ebd355e3561
This commit is contained in:
parent
9ac1de7be4
commit
a31a30327d
@ -31,7 +31,7 @@ CONF = cfg.CONF
|
||||
|
||||
|
||||
@context.add_default_context("users@openstack", {})
|
||||
@plugin.default_meta(inherit=False)
|
||||
@plugin.default_meta(inherit=True)
|
||||
class OpenStackScenario(scenario.Scenario):
|
||||
"""Base class for all OpenStack scenarios."""
|
||||
|
||||
|
@ -26,3 +26,7 @@ class BarbicanBase(scenario.OpenStackScenario):
|
||||
self.admin_barbican = barbican.BarbicanService(
|
||||
self._admin_clients, name_generator=self.generate_random_name,
|
||||
atomic_inst=self.atomic_actions())
|
||||
if hasattr(self, "_clients"):
|
||||
self.barbican = barbican.BarbicanService(
|
||||
self._clients, name_generator=self.generate_random_name,
|
||||
atomic_inst=self.atomic_actions())
|
||||
|
@ -22,6 +22,11 @@ class OctaviaBase(scenario.OpenStackScenario):
|
||||
|
||||
def __init__(self, context=None, admin_clients=None, clients=None):
|
||||
super(OctaviaBase, self).__init__(context, admin_clients, clients)
|
||||
self.octavia = octavia.Octavia(
|
||||
self._clients, name_generator=self.generate_random_name,
|
||||
atomic_inst=self.atomic_actions())
|
||||
if hasattr(self, "_admin_clients"):
|
||||
self.admin_octavia = octavia.Octavia(
|
||||
self._admin_clients, name_generator=self.generate_random_name,
|
||||
atomic_inst=self.atomic_actions())
|
||||
if hasattr(self, "_clients"):
|
||||
self.octavia = octavia.Octavia(
|
||||
self._clients, name_generator=self.generate_random_name,
|
||||
atomic_inst=self.atomic_actions())
|
||||
|
@ -1,25 +1,22 @@
|
||||
{
|
||||
"BarbicanContainers.create_certificate_and_delete": [
|
||||
{
|
||||
"args": {
|
||||
"passphrase": "my_passphrase"
|
||||
},
|
||||
"runner": {
|
||||
"type": "constant",
|
||||
"times": 2,
|
||||
"concurrency": 1
|
||||
},
|
||||
"context": {
|
||||
"users": {
|
||||
"tenants": 1,
|
||||
"users_per_tenant": 1
|
||||
}
|
||||
},
|
||||
"sla": {
|
||||
"failure_rate": {
|
||||
"max": 0
|
||||
}
|
||||
}
|
||||
"runner": {
|
||||
"type": "constant",
|
||||
"times": 2,
|
||||
"concurrency": 1
|
||||
},
|
||||
"context": {
|
||||
"users": {
|
||||
"tenants": 1,
|
||||
"users_per_tenant": 1
|
||||
}
|
||||
},
|
||||
"sla": {
|
||||
"failure_rate": {
|
||||
"max": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -1,8 +1,6 @@
|
||||
---
|
||||
BarbicanContainers.create_certificate_and_delete:
|
||||
-
|
||||
args:
|
||||
passphrase: "my_passphrase"
|
||||
runner:
|
||||
type: "constant"
|
||||
times: 2
|
||||
|
Loading…
x
Reference in New Issue
Block a user