@@ -949,54 +949,3 @@ def create_initial_user_for_saas(self, user, user_type):
949949 maxadmin_manage_api_key = self .create_or_get_manage_api_key_for_user (MASUserUtils .MAXADMIN , temporary = True )
950950 for manage_security_group in manage_security_groups :
951951 self .add_user_to_manage_group (user_id , manage_security_group , maxadmin_manage_api_key )
952-
953- # Unused (but potentially useful) methods
954- # ----------------------------------------
955-
956- def get_groups (self ):
957- self .logger .debug ("Getting groups" )
958- url = f"{ self .mas_api_url_internal } /groups"
959- headers = {
960- "Accept" : "application/json" ,
961- "x-access-token" : self .superuser_auth_token
962- }
963- response = requests .get (
964- url ,
965- headers = headers ,
966- verify = self .core_internal_ca_pem_file_path
967- )
968- if response .status_code == 200 :
969- return response .json ()
970- raise Exception (f"{ response .status_code } { response .text } " )
971-
972- def get_installed_mas_applications (self ):
973- self .logger .debug ("Getting installed MAS Applications" )
974- url = f"{ self .mas_api_url_internal } /applications"
975- headers = {
976- "Accept" : "application/json" ,
977- "x-access-token" : self .superuser_auth_token
978- }
979- response = requests .get (
980- url ,
981- headers = headers ,
982- verify = self .core_internal_ca_pem_file_path
983- )
984- if response .status_code == 200 :
985- return response .json ()
986- raise Exception (f"{ response .status_code } { response .text } " )
987-
988- def get_user_groups (self , user_id ):
989- self .logger .info (f"Getting groups for user { user_id } " )
990- url = f"{ self .mas_api_url_internal } /v3/users/{ user_id } /groups"
991- headers = {
992- "Accept" : "application/json" ,
993- "x-access-token" : self .superuser_auth_token
994- }
995- response = requests .get (
996- url ,
997- headers = headers ,
998- verify = self .core_internal_ca_pem_file_path
999- )
1000- if response .status_code == 200 :
1001- return response .json ()
1002- raise Exception (f"{ response .status_code } { response .text } " )
0 commit comments