|
27 | 27 | from oracle.weblogic.deploy.util import VariableException
|
28 | 28 | from oracle.weblogic.deploy.util import WebLogicDeployToolingVersion
|
29 | 29 | from oracle.weblogic.deploy.validate import ValidateException
|
| 30 | + |
| 31 | +from oracle.weblogic.deploy.aliases import AliasException |
30 | 32 | from wlsdeploy.aliases import model_constants
|
31 | 33 | from wlsdeploy.aliases.aliases import Aliases
|
32 | 34 | from wlsdeploy.aliases.location_context import LocationContext
|
@@ -82,32 +84,29 @@ def __process_args(args, logger):
|
82 | 84 | _method_name = '__process_args'
|
83 | 85 |
|
84 | 86 | cla_util = CommandLineArgUtil(_program_name, __required_arguments, __optional_arguments)
|
85 |
| - required_arg_map, optional_arg_map = cla_util.process_args(args) |
| 87 | + argument_map = cla_util.process_args(args) |
86 | 88 |
|
87 |
| - cla_helper.verify_required_args_present(_program_name, __required_arguments, required_arg_map) |
| 89 | + __process_target_arg(argument_map, logger) |
88 | 90 |
|
89 |
| - __process_target_arg(optional_arg_map, required_arg_map, logger) |
| 91 | + return ModelContext(_program_name, argument_map) |
90 | 92 |
|
91 |
| - combined_arg_map = optional_arg_map.copy() |
92 |
| - combined_arg_map.update(required_arg_map) |
93 |
| - return ModelContext(_program_name, combined_arg_map) |
94 | 93 |
|
95 |
| -def __process_target_arg(optional_arg_map, required_arg_map, logger): |
| 94 | +def __process_target_arg(argument_map, logger): |
96 | 95 |
|
97 | 96 | _method_name = '__process_target_arg'
|
98 | 97 |
|
99 | 98 | # if -target is specified -output_dir is required
|
100 |
| - output_dir = required_arg_map[CommandLineArgUtil.OUTPUT_DIR_SWITCH] |
| 99 | + output_dir = argument_map[CommandLineArgUtil.OUTPUT_DIR_SWITCH] |
101 | 100 | if output_dir is None or os.path.isdir(output_dir) is False:
|
102 | 101 | if not os.path.isdir(output_dir):
|
103 | 102 | ex = exception_helper.create_cla_exception('WLSDPLY-01642', output_dir)
|
104 | 103 | logger.throwing(ex, class_name=_class_name, method_name=_method_name)
|
105 | 104 | raise ex
|
106 | 105 |
|
107 | 106 | # Set the -variable_file parameter if not present with default
|
108 |
| - if CommandLineArgUtil.VARIABLE_FILE_SWITCH not in optional_arg_map: |
109 |
| - optional_arg_map[CommandLineArgUtil.VARIABLE_FILE_SWITCH] = os.path.join(output_dir, |
110 |
| - "k8s_variable.properties") |
| 107 | + if CommandLineArgUtil.VARIABLE_FILE_SWITCH not in argument_map: |
| 108 | + argument_map[CommandLineArgUtil.VARIABLE_FILE_SWITCH] = os.path.join(output_dir, |
| 109 | + "k8s_variable.properties") |
111 | 110 |
|
112 | 111 | class PrepareModel:
|
113 | 112 | """
|
@@ -348,7 +347,7 @@ def __substitute_password_with_token(self, model_path, attribute_name, validatio
|
348 | 347 | if tokens_length > 1:
|
349 | 348 | # For AdminPassword
|
350 | 349 | if model_path_tokens[0] == 'domainInfo:' and model_path_tokens[1] == '':
|
351 |
| - password_name = "@@SECRET:@@DOAMIN-UID@@-weblogic-credentials:%s@@" % (attribute_name.lower()) |
| 350 | + password_name = "@@SECRET:@@DOMAIN-UID@@-weblogic-credentials:%s@@" % (attribute_name.lower()) |
352 | 351 | self.cache[attribute_name] = ''
|
353 | 352 | else:
|
354 | 353 | password_name = target_configuration_helper.format_as_secret(variable_name)
|
|
0 commit comments