@@ -53,7 +53,35 @@ def setup(self):
5353 self .ocommon .log_info_message ("Start setup()" ,self .file_name )
5454 ct = datetime .datetime .now ()
5555 bts = ct .timestamp ()
56- self .ocommon .update_gi_env_vars_from_rspfile ()
56+ #default version as 0 integer, will read from rsp file
57+ version = 0
58+ if self .ocommon .check_key ("GRID_RESPONSE_FILE" ,self .ora_env_dict ):
59+ gridrsp = self .ora_env_dict ["GRID_RESPONSE_FILE" ]
60+ self .ocommon .log_info_message ("GRID_RESPONSE_FILE parameter is set and file location is:" + gridrsp ,self .file_name )
61+
62+ if os .path .isfile (gridrsp ):
63+ with open (gridrsp ) as fp :
64+ for line in fp :
65+ if len (line .split ("=" )) == 2 :
66+ key = (line .split ("=" )[0 ]).strip ()
67+ value = (line .split ("=" )[1 ]).strip ()
68+ self .ocommon .log_info_message ("KEY and Value pair set to: " + key + ":" + value ,self .file_name )
69+ if key == "oracle.install.responseFileVersion" :
70+ match = re .search (r'v(\d{2})' , value )
71+ if match :
72+ version = int (match .group (1 ))
73+ else :
74+ # Default to version 23 if no match is found
75+ version = 23
76+ #print version in logs
77+ msg = "Version detected in response file is {0}" .format (version )
78+ self .ocommon .log_info_message (msg ,self .file_name )
79+ ## Calling this function from here to make sure INSTALL_NODE is set
80+ if version == int (19 ) or version == int (21 ):
81+ self .ocommon .update_pre_23c_gi_env_vars_from_rspfile ()
82+ else :
83+ # default to read when its either set as 23 in response file or if response file is not present
84+ self .ocommon .update_gi_env_vars_from_rspfile ()
5785 if self .ocommon .check_key ("DBCA_RESPONSE_FILE" ,self .ora_env_dict ):
5886 self .ocommon .update_rac_env_vars_from_rspfile (self .ora_env_dict ["DBCA_RESPONSE_FILE" ])
5987 if self .ocommon .check_key ("DEL_RACHOME" ,self .ora_env_dict ):
0 commit comments