Merge "Add keystone create_update_and_delete_tenant scenario"

This commit is contained in:
Jenkins 2015-04-21 16:55:38 +00:00 committed by Gerrit Code Review
commit f9ec5a86a8
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):