From 26a7e035fef9e7987840dfe903b1d32f4fca15da Mon Sep 17 00:00:00 2001 From: Antoine Eiche Date: Thu, 18 Feb 2016 11:49:53 +0100 Subject: [PATCH] Revert "Add vnc_api method set_user_roles" The method set_auth_token has been unfortunately cherry-picked and this introduces a regression since RBAC is not supported by the vnc_api R2.20. This reverts commit 77d2febbc18c26fb80bb1ee585e39549a0a62ffb. Change-Id: Ifdf28ce18de55b3bed3e59de56de415da1839c2e Partial-Bug: 1546057 --- src/api-lib/vnc_api.py | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/src/api-lib/vnc_api.py b/src/api-lib/vnc_api.py index ae60a97ceb7..5e555746c4d 100644 --- a/src/api-lib/vnc_api.py +++ b/src/api-lib/vnc_api.py @@ -281,7 +281,7 @@ def __init__(self, username=None, password=None, tenant_name=None, if 'user' in self._user_info: self._headers['X-API-USER'] = self._user_info['user'] if 'role' in self._user_info: - self.set_user_roles([self._user_info['role']]) + self._headers['X-API-ROLE'] = self._user_info['role'] #self._http = HTTPClient(self._web_host, self._web_port, # network_timeout = 300) @@ -814,17 +814,4 @@ def resource_list(self, obj_type, parent_id=None, parent_fq_name=None, return resource_objs #end resource_list - def set_auth_token(self, token): - """Park user token for forwarding to API server for RBAC.""" - self._headers['X-AUTH-TOKEN'] = token - #end set_auth_token - - def set_user_roles(self, roles): - """Park user roles for forwarding to API server for RBAC. - - :param roles: list of roles - """ - self._headers['X-API-ROLE'] = (',').join(roles) - #end set_user_roles - #end class VncApi