Add quotas.CinderGet scenario
Get quotas for Cinder. Measure the "cinder quota-show" command performance Change-Id: I95e403c75ae500f19f2d20854062cbdfd9c06283
This commit is contained in:
parent
b028723cfc
commit
58ebb68d21
@ -902,3 +902,17 @@
|
||||
sla:
|
||||
failure_rate:
|
||||
max: 0
|
||||
|
||||
Quotas.cinder_get:
|
||||
-
|
||||
runner:
|
||||
type: "constant"
|
||||
times: 10
|
||||
concurrency: 2
|
||||
context:
|
||||
users:
|
||||
tenants: 2
|
||||
users_per_tenant: 2
|
||||
sla:
|
||||
failure_rate:
|
||||
max: 0
|
||||
|
@ -70,6 +70,21 @@ class CinderUpdate(utils.QuotasScenario):
|
||||
max_quota)
|
||||
|
||||
|
||||
@validation.required_services(consts.Service.CINDER)
|
||||
@validation.required_openstack(admin=True, users=True)
|
||||
@scenario.configure(context={"admin_cleanup": ["cinder.quotas"]},
|
||||
name="Quotas.cinder_get")
|
||||
class CinderGet(utils.QuotasScenario):
|
||||
|
||||
def run(self):
|
||||
"""Get quotas for Cinder.
|
||||
|
||||
Measure the "cinder quota-show" command performance
|
||||
|
||||
"""
|
||||
self._get_quotas("cinder", self.context["tenant"]["id"])
|
||||
|
||||
|
||||
@validation.required_services(consts.Service.CINDER)
|
||||
@validation.required_openstack(admin=True, users=True)
|
||||
@scenario.configure(context={"admin_cleanup": ["cinder.quotas"]},
|
||||
|
23
samples/tasks/scenarios/quotas/cinder-get.json
Normal file
23
samples/tasks/scenarios/quotas/cinder-get.json
Normal file
@ -0,0 +1,23 @@
|
||||
{
|
||||
"Quotas.cinder_get": [
|
||||
{
|
||||
"runner": {
|
||||
"type": "constant",
|
||||
"times": 10,
|
||||
"concurrency": 2
|
||||
},
|
||||
"context": {
|
||||
"users": {
|
||||
"tenants": 2,
|
||||
"users_per_tenant": 2
|
||||
}
|
||||
},
|
||||
"sla": {
|
||||
"failure_rate": {
|
||||
"max": 0
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
]
|
||||
}
|
14
samples/tasks/scenarios/quotas/cinder-get.yaml
Normal file
14
samples/tasks/scenarios/quotas/cinder-get.yaml
Normal file
@ -0,0 +1,14 @@
|
||||
---
|
||||
Quotas.cinder_get:
|
||||
-
|
||||
runner:
|
||||
type: "constant"
|
||||
times: 10
|
||||
concurrency: 2
|
||||
context:
|
||||
users:
|
||||
tenants: 2
|
||||
users_per_tenant: 2
|
||||
sla:
|
||||
failure_rate:
|
||||
max: 0
|
@ -37,6 +37,12 @@ class QuotasTestCase(test.ScenarioTestCase):
|
||||
scenario.run()
|
||||
scenario._get_quotas.assert_called_once_with("nova", "fake")
|
||||
|
||||
def test_cinder_get(self):
|
||||
scenario = quotas.CinderGet(self.context)
|
||||
scenario._get_quotas = mock.MagicMock()
|
||||
scenario.run()
|
||||
scenario._get_quotas.assert_called_once_with("cinder", "fake")
|
||||
|
||||
def test_nova_update(self):
|
||||
scenario = quotas.NovaUpdate(self.context)
|
||||
scenario._update_quotas = mock.MagicMock()
|
||||
|
Loading…
x
Reference in New Issue
Block a user