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", {})
|
@context.add_default_context("users@openstack", {})
|
||||||
@plugin.default_meta(inherit=False)
|
@plugin.default_meta(inherit=True)
|
||||||
class OpenStackScenario(scenario.Scenario):
|
class OpenStackScenario(scenario.Scenario):
|
||||||
"""Base class for all OpenStack scenarios."""
|
"""Base class for all OpenStack scenarios."""
|
||||||
|
|
||||||
|
@ -26,3 +26,7 @@ class BarbicanBase(scenario.OpenStackScenario):
|
|||||||
self.admin_barbican = barbican.BarbicanService(
|
self.admin_barbican = barbican.BarbicanService(
|
||||||
self._admin_clients, name_generator=self.generate_random_name,
|
self._admin_clients, name_generator=self.generate_random_name,
|
||||||
atomic_inst=self.atomic_actions())
|
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):
|
def __init__(self, context=None, admin_clients=None, clients=None):
|
||||||
super(OctaviaBase, self).__init__(context, admin_clients, clients)
|
super(OctaviaBase, self).__init__(context, admin_clients, clients)
|
||||||
self.octavia = octavia.Octavia(
|
if hasattr(self, "_admin_clients"):
|
||||||
self._clients, name_generator=self.generate_random_name,
|
self.admin_octavia = octavia.Octavia(
|
||||||
atomic_inst=self.atomic_actions())
|
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": [
|
"BarbicanContainers.create_certificate_and_delete": [
|
||||||
{
|
{
|
||||||
"args": {
|
"runner": {
|
||||||
"passphrase": "my_passphrase"
|
"type": "constant",
|
||||||
},
|
"times": 2,
|
||||||
"runner": {
|
"concurrency": 1
|
||||||
"type": "constant",
|
},
|
||||||
"times": 2,
|
"context": {
|
||||||
"concurrency": 1
|
"users": {
|
||||||
},
|
"tenants": 1,
|
||||||
"context": {
|
"users_per_tenant": 1
|
||||||
"users": {
|
}
|
||||||
"tenants": 1,
|
},
|
||||||
"users_per_tenant": 1
|
"sla": {
|
||||||
}
|
"failure_rate": {
|
||||||
},
|
"max": 0
|
||||||
"sla": {
|
}
|
||||||
"failure_rate": {
|
}
|
||||||
"max": 0
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
---
|
---
|
||||||
BarbicanContainers.create_certificate_and_delete:
|
BarbicanContainers.create_certificate_and_delete:
|
||||||
-
|
-
|
||||||
args:
|
|
||||||
passphrase: "my_passphrase"
|
|
||||||
runner:
|
runner:
|
||||||
type: "constant"
|
type: "constant"
|
||||||
times: 2
|
times: 2
|
||||||
|
Loading…
x
Reference in New Issue
Block a user