@@ -335,41 +335,42 @@ def validate_model(model_dictionary, model_context, aliases):
335335def validateRCUArgsAndModel (model_context , model ):
336336 has_atpdbinfo = 0
337337 domain_info = model [model_constants .DOMAIN_INFO ]
338- if model_constants .RCU_DB_INFO in domain_info :
339- rcu_db_info = domain_info [model_constants .RCU_DB_INFO ]
340- has_tns_admin = atp_helper .has_tns_admin (rcu_db_info )
341- has_regular_db = atp_helper .is_regular_db (rcu_db_info )
342- has_atpdbinfo = atp_helper .has_atpdbinfo (rcu_db_info )
343-
344- if model_context .get_archive_file_name () and not has_regular_db :
345- System .setProperty ('oracle.jdbc.fanEnabled' , 'false' )
346-
347- # 1. If it does not have the oracle.net.tns_admin specified, then extract to domain/atpwallet
348- # 2. If it is plain old regular oracle db, do nothing
349- # 3. If it deos not have tns_admin in the model, then the wallet must be in the archive
350- if not has_tns_admin :
351- # extract the wallet first
352- archive_file = WLSDeployArchive (model_context .get_archive_file_name ())
353- atp_wallet_zipentry = archive_file .getATPWallet ()
354- if atp_wallet_zipentry and model [model_constants .TOPOLOGY ]['Name' ]:
355- extract_path = atp_helper .extract_walletzip (model , model_context , archive_file , atp_wallet_zipentry )
356- # update the model to add the tns_admin
357- model [model_constants .DOMAIN_INFO ][model_constants .RCU_DB_INFO ][
358- model_constants .DRIVER_PARAMS_NET_TNS_ADMIN ] = extract_path
359- else :
360- __logger .severe ('WLSDPLY-12411' , error = None ,
361- class_name = _class_name , method_name = "validateRCUArgsAndModel" )
338+ if domain_info is not None :
339+ if model_constants .RCU_DB_INFO in domain_info :
340+ rcu_db_info = domain_info [model_constants .RCU_DB_INFO ]
341+ has_tns_admin = atp_helper .has_tns_admin (rcu_db_info )
342+ has_regular_db = atp_helper .is_regular_db (rcu_db_info )
343+ has_atpdbinfo = atp_helper .has_atpdbinfo (rcu_db_info )
344+
345+ if model_context .get_archive_file_name () and not has_regular_db :
346+ System .setProperty ('oracle.jdbc.fanEnabled' , 'false' )
347+
348+ # 1. If it does not have the oracle.net.tns_admin specified, then extract to domain/atpwallet
349+ # 2. If it is plain old regular oracle db, do nothing
350+ # 3. If it deos not have tns_admin in the model, then the wallet must be in the archive
351+ if not has_tns_admin :
352+ # extract the wallet first
353+ archive_file = WLSDeployArchive (model_context .get_archive_file_name ())
354+ atp_wallet_zipentry = archive_file .getATPWallet ()
355+ if atp_wallet_zipentry and model [model_constants .TOPOLOGY ]['Name' ]:
356+ extract_path = atp_helper .extract_walletzip (model , model_context , archive_file , atp_wallet_zipentry )
357+ # update the model to add the tns_admin
358+ model [model_constants .DOMAIN_INFO ][model_constants .RCU_DB_INFO ][
359+ model_constants .DRIVER_PARAMS_NET_TNS_ADMIN ] = extract_path
360+ else :
361+ __logger .severe ('WLSDPLY-12411' , error = None ,
362+ class_name = _class_name , method_name = "validateRCUArgsAndModel" )
363+ __clean_up_temp_files ()
364+ tool_exit .end (model_context , CommandLineArgUtil .PROG_ERROR_EXIT_CODE )
365+
366+ else :
367+ if model_context .get_domain_typedef ().required_rcu ():
368+ if not model_context .get_rcu_database () or not model_context .get_rcu_prefix ():
369+ __logger .severe ('WLSDPLY-12408' , model_context .get_domain_type (), CommandLineArgUtil .RCU_DB_SWITCH ,
370+ CommandLineArgUtil .RCU_PREFIX_SWITCH )
362371 __clean_up_temp_files ()
363372 tool_exit .end (model_context , CommandLineArgUtil .PROG_ERROR_EXIT_CODE )
364373
365- else :
366- if model_context .get_domain_typedef ().required_rcu ():
367- if not model_context .get_rcu_database () or not model_context .get_rcu_prefix ():
368- __logger .severe ('WLSDPLY-12408' , model_context .get_domain_type (), CommandLineArgUtil .RCU_DB_SWITCH ,
369- CommandLineArgUtil .RCU_PREFIX_SWITCH )
370- __clean_up_temp_files ()
371- tool_exit .end (model_context , CommandLineArgUtil .PROG_ERROR_EXIT_CODE )
372-
373374 return has_atpdbinfo
374375
375376
0 commit comments