@@ -414,15 +414,22 @@ def unzip_atp_wallet(wallet_file, location):
414
414
415
415
416
416
def validateRCUArgsAndModel (model_context , model ):
417
- has_atp = 0
418
- if model_constants .RCU_DB_INFO in model [model_constants .DOMAIN_INFO ]:
419
- # extract the wallet first
420
- has_atp = 1
421
- has_tns_admin = model_constants .DRIVER_PARAMS_NET_TNS_ADMIN in model [model_constants .DOMAIN_INFO ][
417
+ has_atpdbinfo = 0
418
+ domain_info = model [model_constants .DOMAIN_INFO ]
419
+ if model_constants .RCU_DB_INFO in domain_info :
420
+ has_tns_admin = model_constants .DRIVER_PARAMS_NET_TNS_ADMIN in domain_info [
422
421
model_constants .RCU_DB_INFO ]
423
- if model_context .get_archive_file_name ():
424
- # if it does not have the oracle.net.tns_admin specified, then extract to
422
+ has_regular_db = model_constants .RCU_DB_CONN in domain_info [model_constants .RCU_DB_INFO ]
423
+
424
+ if model_constants .ATP_TNS_ENTRY in domain_info [model_constants .RCU_DB_INFO ]:
425
+ has_atpdbinfo = 1
426
+
427
+ if model_context .get_archive_file_name () and not has_regular_db :
428
+ # 1. If it does not have the oracle.net.tns_admin specified, then extract to domain/atpwallet
429
+ # 2. If it is plain old regular oracle db, do nothing
430
+ # 3. If it deos not have tns_admin in the model, then the wallet must be in the archive
425
431
if not has_tns_admin :
432
+ # extract the wallet first
426
433
archive_file = WLSDeployArchive (model_context .get_archive_file_name ())
427
434
atp_path = archive_file .getATPWallet ()
428
435
if atp_path and model [model_constants .TOPOLOGY ]['Name' ]:
@@ -442,20 +449,16 @@ def validateRCUArgsAndModel(model_context, model):
442
449
class_name = _class_name , method_name = "validateRCUArgsAndModel" )
443
450
__clean_up_temp_files ()
444
451
tool_exit .end (model_context , CommandLineArgUtil .PROG_ERROR_EXIT_CODE )
445
- elif not has_tns_admin :
446
- __logger .severe ('WLSDPLY-12411' , error = None ,
447
- class_name = _class_name , method_name = "validateRCUArgsAndModel" )
448
- __clean_up_temp_files ()
449
- tool_exit .end (model_context , CommandLineArgUtil .PROG_ERROR_EXIT_CODE )
450
-
451
- if not has_atp and model_context .get_domain_type () not in ['WLS' , 'RestrictedJRF' ]:
452
- if not model_context .get_rcu_database () or not model_context .get_rcu_prefix ():
453
- __logger .severe ('WLSDPLY-12408' , model_context .get_domain_type (), CommandLineArgUtil .RCU_DB_SWITCH ,
452
+
453
+ else :
454
+ if model_context .get_domain_type () not in ['WLS' , 'RestrictedJRF' ]:
455
+ if not model_context .get_rcu_database () or not model_context .get_rcu_prefix ():
456
+ __logger .severe ('WLSDPLY-12408' , model_context .get_domain_type (), CommandLineArgUtil .RCU_DB_SWITCH ,
454
457
CommandLineArgUtil .RCU_PREFIX_SWITCH )
455
- __clean_up_temp_files ()
456
- tool_exit .end (model_context , CommandLineArgUtil .PROG_ERROR_EXIT_CODE )
458
+ __clean_up_temp_files ()
459
+ tool_exit .end (model_context , CommandLineArgUtil .PROG_ERROR_EXIT_CODE )
457
460
458
- return has_atp
461
+ return has_atpdbinfo
459
462
460
463
461
464
def main (args ):
0 commit comments