Add Octavia Authenticate
Change-Id: Ieab9642153d903a461765abc35ea36fd9f399089
This commit is contained in:
parent
40690f07a4
commit
a1c98eca51
@ -131,6 +131,25 @@ class ValidateNeutron(scenario.OpenStackScenario):
|
||||
neutron_client.list_networks()
|
||||
|
||||
|
||||
@validation.add("number", param_name="repetitions", minval=1)
|
||||
@validation.add("required_platform", platform="openstack", users=True)
|
||||
@scenario.configure(name="Authenticate.validate_octavia", platform="openstack")
|
||||
class ValidateOctavia(scenario.OpenStackScenario):
|
||||
|
||||
def run(self, repetitions):
|
||||
"""Check Octavia Client to ensure validation of token.
|
||||
|
||||
Creation of the client does not ensure validation of the token.
|
||||
We have to do some minimal operation to make sure token gets validated.
|
||||
|
||||
:param repetitions: number of times to validate
|
||||
"""
|
||||
octavia_client = self.clients("octavia")
|
||||
with atomic.ActionTimer(self, "authenticate.validate_octavia"):
|
||||
for i in range(repetitions):
|
||||
octavia_client.load_balancer_list()
|
||||
|
||||
|
||||
@validation.add("number", param_name="repetitions", minval=1)
|
||||
@validation.add("required_platform", platform="openstack", users=True)
|
||||
@scenario.configure(name="Authenticate.validate_heat", platform="openstack")
|
||||
|
@ -0,0 +1,25 @@
|
||||
{
|
||||
"Authenticate.validate_octavia": [
|
||||
{
|
||||
"args": {
|
||||
"repetitions": 2
|
||||
},
|
||||
"runner": {
|
||||
"type": "constant",
|
||||
"times": 10,
|
||||
"concurrency": 5
|
||||
},
|
||||
"context": {
|
||||
"users": {
|
||||
"tenants": 3,
|
||||
"users_per_tenant": 5
|
||||
}
|
||||
},
|
||||
"sla": {
|
||||
"failure_rate": {
|
||||
"max": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
---
|
||||
Authenticate.validate_octavia:
|
||||
-
|
||||
args:
|
||||
repetitions: 2
|
||||
runner:
|
||||
type: "constant"
|
||||
times: 10
|
||||
concurrency: 5
|
||||
context:
|
||||
users:
|
||||
tenants: 3
|
||||
users_per_tenant: 5
|
||||
sla:
|
||||
failure_rate:
|
||||
max: 0
|
@ -77,6 +77,14 @@ class AuthenticateTestCase(test.ScenarioTestCase):
|
||||
self._test_atomic_action_timer(scenario_inst.atomic_actions(),
|
||||
"authenticate.validate_neutron")
|
||||
|
||||
def test_validate_octavia(self):
|
||||
scenario_inst = authenticate.ValidateOctavia()
|
||||
scenario_inst.run(5)
|
||||
self.clients("octavia").load_balancer_list.assert_has_calls(
|
||||
[mock.call()] * 5)
|
||||
self._test_atomic_action_timer(scenario_inst.atomic_actions(),
|
||||
"authenticate.validate_octavia")
|
||||
|
||||
def test_validate_heat(self):
|
||||
scenario_inst = authenticate.ValidateHeat()
|
||||
scenario_inst.run(5)
|
||||
|
Loading…
Reference in New Issue
Block a user