From 86216101464578436d23540b5433414891633f85 Mon Sep 17 00:00:00 2001 From: Mikhail Dubov Date: Thu, 16 Jan 2014 16:56:10 +0400 Subject: [PATCH] Add support for user/admin permissions in endpoints Instead of storing the endpoints as a single admin credentials dictionary (containing the username, password etc.) we should be able to store several endpoints which can be possibly returned from the deploy object, as well as the information whether these endpoints have the admin permission or not. If not, then the deployment is going to be used with the predefined set of users (that will be implemented next). If there is an admin endpoint, then the users for benchmarking will be generated (the "admin" role). This information now gets stored in a dictionary of form: "endpoints": [ {"username": ..., "password": ..., "tenant_name": ..., "auth_url": ..., "permission": "admin|user"}, {"username": ..., "password": ..., "tenant_name": ..., "auth_url": ..., "permission": "admin|user"}, ... ] Blueprint benchmarking-with-predefined-users Change-Id: If36e33e89daa036bd4b0d7db8e2d3b5b5b0f4aca --- rally/consts.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/rally/consts.py b/rally/consts.py index 84a8b0b1..3b42d6ad 100644 --- a/rally/consts.py +++ b/rally/consts.py @@ -49,5 +49,11 @@ class _DeployStatus(utils.ImmutableMixin, utils.EnumMixin): CLEANUP_FAILED = 'cleanup->failed' +class _EndpointPermission(utils.ImmutableMixin, utils.EnumMixin): + ADMIN = "admin" + USER = "user" + + TaskStatus = _TaskStatus() DeployStatus = _DeployStatus() +EndpointPermission = _EndpointPermission()