Add quotas.CinderGet scenario
Get quotas for Cinder. Measure the "cinder quota-show" command performance Change-Id: I95e403c75ae500f19f2d20854062cbdfd9c06283
This commit is contained in:
@@ -902,3 +902,17 @@
|
|||||||
sla:
|
sla:
|
||||||
failure_rate:
|
failure_rate:
|
||||||
max: 0
|
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)
|
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_services(consts.Service.CINDER)
|
||||||
@validation.required_openstack(admin=True, users=True)
|
@validation.required_openstack(admin=True, users=True)
|
||||||
@scenario.configure(context={"admin_cleanup": ["cinder.quotas"]},
|
@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.run()
|
||||||
scenario._get_quotas.assert_called_once_with("nova", "fake")
|
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):
|
def test_nova_update(self):
|
||||||
scenario = quotas.NovaUpdate(self.context)
|
scenario = quotas.NovaUpdate(self.context)
|
||||||
scenario._update_quotas = mock.MagicMock()
|
scenario._update_quotas = mock.MagicMock()
|
||||||
|
|||||||
Reference in New Issue
Block a user