Skip to content

Rcufix #291

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 19, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 33 additions & 32 deletions core/src/main/python/create.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,41 +335,42 @@ def validate_model(model_dictionary, model_context, aliases):
def validateRCUArgsAndModel(model_context, model):
has_atpdbinfo = 0
domain_info = model[model_constants.DOMAIN_INFO]
if model_constants.RCU_DB_INFO in domain_info:
rcu_db_info = domain_info[model_constants.RCU_DB_INFO]
has_tns_admin = atp_helper.has_tns_admin(rcu_db_info)
has_regular_db = atp_helper.is_regular_db(rcu_db_info)
has_atpdbinfo = atp_helper.has_atpdbinfo(rcu_db_info)

if model_context.get_archive_file_name() and not has_regular_db:
System.setProperty('oracle.jdbc.fanEnabled', 'false')

# 1. If it does not have the oracle.net.tns_admin specified, then extract to domain/atpwallet
# 2. If it is plain old regular oracle db, do nothing
# 3. If it deos not have tns_admin in the model, then the wallet must be in the archive
if not has_tns_admin:
# extract the wallet first
archive_file = WLSDeployArchive(model_context.get_archive_file_name())
atp_wallet_zipentry = archive_file.getATPWallet()
if atp_wallet_zipentry and model[model_constants.TOPOLOGY]['Name']:
extract_path = atp_helper.extract_walletzip(model, model_context, archive_file, atp_wallet_zipentry)
# update the model to add the tns_admin
model[model_constants.DOMAIN_INFO][model_constants.RCU_DB_INFO][
model_constants.DRIVER_PARAMS_NET_TNS_ADMIN] = extract_path
else:
__logger.severe('WLSDPLY-12411', error=None,
class_name=_class_name, method_name="validateRCUArgsAndModel")
if domain_info is not None:
if model_constants.RCU_DB_INFO in domain_info:
rcu_db_info = domain_info[model_constants.RCU_DB_INFO]
has_tns_admin = atp_helper.has_tns_admin(rcu_db_info)
has_regular_db = atp_helper.is_regular_db(rcu_db_info)
has_atpdbinfo = atp_helper.has_atpdbinfo(rcu_db_info)

if model_context.get_archive_file_name() and not has_regular_db:
System.setProperty('oracle.jdbc.fanEnabled', 'false')

# 1. If it does not have the oracle.net.tns_admin specified, then extract to domain/atpwallet
# 2. If it is plain old regular oracle db, do nothing
# 3. If it deos not have tns_admin in the model, then the wallet must be in the archive
if not has_tns_admin:
# extract the wallet first
archive_file = WLSDeployArchive(model_context.get_archive_file_name())
atp_wallet_zipentry = archive_file.getATPWallet()
if atp_wallet_zipentry and model[model_constants.TOPOLOGY]['Name']:
extract_path = atp_helper.extract_walletzip(model, model_context, archive_file, atp_wallet_zipentry)
# update the model to add the tns_admin
model[model_constants.DOMAIN_INFO][model_constants.RCU_DB_INFO][
model_constants.DRIVER_PARAMS_NET_TNS_ADMIN] = extract_path
else:
__logger.severe('WLSDPLY-12411', error=None,
class_name=_class_name, method_name="validateRCUArgsAndModel")
__clean_up_temp_files()
tool_exit.end(model_context, CommandLineArgUtil.PROG_ERROR_EXIT_CODE)

else:
if model_context.get_domain_typedef().required_rcu():
if not model_context.get_rcu_database() or not model_context.get_rcu_prefix():
__logger.severe('WLSDPLY-12408', model_context.get_domain_type(), CommandLineArgUtil.RCU_DB_SWITCH,
CommandLineArgUtil.RCU_PREFIX_SWITCH)
__clean_up_temp_files()
tool_exit.end(model_context, CommandLineArgUtil.PROG_ERROR_EXIT_CODE)

else:
if model_context.get_domain_typedef().required_rcu():
if not model_context.get_rcu_database() or not model_context.get_rcu_prefix():
__logger.severe('WLSDPLY-12408', model_context.get_domain_type(), CommandLineArgUtil.RCU_DB_SWITCH,
CommandLineArgUtil.RCU_PREFIX_SWITCH)
__clean_up_temp_files()
tool_exit.end(model_context, CommandLineArgUtil.PROG_ERROR_EXIT_CODE)

return has_atpdbinfo


Expand Down