Add keystone create_update_and_delete_tenant scenario

API covered tenants.create, tenants.update, tenants.delete

Change-Id: Icd245d3c95ac1c8fef96665321ac5d8dc0813f17
This commit is contained in:
Serhii Vasheka 2015-03-25 17:54:14 +02:00
parent 098b0cb3f6
commit aba03a5025
4 changed files with 43 additions and 0 deletions

View File

@ -86,6 +86,18 @@
failure_rate:
max: 0
KeystoneBasic.create_update_and_delete_tenant:
-
args:
name_length: 10
runner:
type: "constant"
times: 10
concurrency: 5
sla:
failure_rate:
max: 0
KeystoneBasic.create_delete_user:
-
args:

View File

@ -0,0 +1,14 @@
{
"KeystoneBasic.create_update_and_delete_tenant": [
{
"args": {
"name_length": 10
},
"runner": {
"type": "constant",
"times": 100,
"concurrency": 10
}
}
]
}

View File

@ -0,0 +1,9 @@
---
KeystoneBasic.create_update_and_delete_tenant:
-
args:
name_length: 10
runner:
type: "constant"
times: 100
concurrency: 10

View File

@ -449,6 +449,14 @@ class FakeTenantsManager(FakeManager):
def create(self, name):
return self._cache(FakeTenant(self, name))
def update(self, tenant_id, name=None, description=None):
tenant = self.get(tenant_id)
name = name or (tenant.name + "_updated")
desc = description or (tenant.name + "_description_updated")
tenant.name = name
tenant.description = desc
return self._cache(tenant)
class FakeNetworkManager(FakeManager):