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