From c4eeed5558eb415fbecc3a180e4b562e518b1210 Mon Sep 17 00:00:00 2001 From: Rajaditya Chauhan Date: Tue, 18 Jun 2024 10:00:38 +0530 Subject: [PATCH] rbac: fixing format for rh identity header after gunicorn update. --- opl/rbac_populate.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/opl/rbac_populate.py b/opl/rbac_populate.py index a84d787..35b10d1 100644 --- a/opl/rbac_populate.py +++ b/opl/rbac_populate.py @@ -99,7 +99,7 @@ def load_apps_and_perms(url_base, x_rh_identity, application=[]): url = f"{url_base}/permissions/" headers = { - "X_RH_IDENTITY": x_rh_identity, + "X-RH-IDENTITY": x_rh_identity, "Accept": "application/json", "Content-Type": "application/json", } @@ -125,7 +125,7 @@ def create_tenant(url_base, x_rh_identity): # with unknown account will create new tenant for it url = f"{url_base}/roles/" headers = { - "X_RH_IDENTITY": x_rh_identity, + "X-RH-IDENTITY": x_rh_identity, "Accept": "application/json", "Content-Type": "application/json", } @@ -136,7 +136,7 @@ def create_tenant(url_base, x_rh_identity): def create_group(url_base, x_rh_identity): url = f"{url_base}/groups/" headers = { - "X_RH_IDENTITY": x_rh_identity, + "X-RH-IDENTITY": x_rh_identity, "Accept": "application/json", "Content-Type": "application/json", } @@ -151,7 +151,7 @@ def create_group(url_base, x_rh_identity): def create_role(url_base, x_rh_identity): url = f"{url_base}/roles/" headers = { - "X_RH_IDENTITY": x_rh_identity, + "X-RH-IDENTITY": x_rh_identity, "Accept": "application/json", "Content-Type": "application/json", } @@ -166,7 +166,7 @@ def create_role(url_base, x_rh_identity): def add_roles_to_group(url_base, x_rh_identity, role_list, group_uuid): url = f"{url_base}/groups/{group_uuid}/roles/" headers = { - "X_RH_IDENTITY": x_rh_identity, + "X-RH-IDENTITY": x_rh_identity, "Accept": "application/json", "Content-Type": "application/json", }