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
This commit is contained in:
parent
65ded3ced9
commit
8621610146
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user