28
28
from wlsdeploy .logging .platform_logger import PlatformLogger
29
29
from wlsdeploy .tool .encrypt import encryption_utils
30
30
from wlsdeploy .tool .util .alias_helper import AliasHelper
31
+ from wlsdeploy .util import cla_helper
31
32
from wlsdeploy .util import getcreds
32
33
from wlsdeploy .util import variables as variable_helper
33
- from wlsdeploy .tool .util import wlst_helper
34
- from wlsdeploy .tool .util .wlst_helper import WlstHelper
35
34
from wlsdeploy .util .cla_utils import CommandLineArgUtil
36
35
from wlsdeploy .util .model_context import ModelContext
37
36
from wlsdeploy .util .model_translator import FileToPython
38
37
from wlsdeploy .util .model_translator import PythonToFile
39
38
40
- wlst_helper .wlst_functions = globals ()
41
-
42
39
_program_name = 'encryptModel'
43
40
_class_name = 'encrypt'
44
41
__logger = PlatformLogger ('wlsdeploy.encrypt' )
@@ -68,7 +65,7 @@ def __process_args(args):
68
65
cla_util = CommandLineArgUtil (_program_name , __required_arguments , __optional_arguments )
69
66
required_arg_map , optional_arg_map = cla_util .process_args (args )
70
67
71
- __verify_required_args_present ( required_arg_map )
68
+ cla_helper . verify_required_args_present ( _program_name , __required_arguments , required_arg_map )
72
69
__validate_mode_args (optional_arg_map )
73
70
__process_passphrase_arg (optional_arg_map )
74
71
@@ -91,23 +88,6 @@ def __process_args(args):
91
88
return model_context
92
89
93
90
94
- def __verify_required_args_present (required_arg_map ):
95
- """
96
- Verify that the required args are present.
97
- :param required_arg_map: the required arguments map
98
- :raises CLAException: if one or more of the required arguments are missing
99
- """
100
- _method_name = '__verify_required_args_present'
101
-
102
- for req_arg in __required_arguments :
103
- if req_arg not in required_arg_map :
104
- ex = exception_helper .create_cla_exception ('WLSDPLY-20005' , _program_name , req_arg )
105
- ex .setExitCode (CommandLineArgUtil .USAGE_ERROR_EXIT_CODE )
106
- __logger .throwing (ex , class_name = _class_name , method_name = _method_name )
107
- raise ex
108
- return
109
-
110
-
111
91
def __validate_mode_args (optional_arg_map ):
112
92
"""
113
93
Verify that either the model_file or the manual switch was specified.
@@ -281,7 +261,6 @@ def main(args):
281
261
for index , arg in enumerate (args ):
282
262
__logger .finer ('sys.argv[{0}] = {1}' , str (index ), str (arg ), class_name = _class_name , method_name = _method_name )
283
263
284
- WlstHelper (ExceptionType .ENCRYPTION ).silence ()
285
264
exit_code = _process_request (args )
286
265
__logger .exiting (class_name = _class_name , method_name = _method_name , result = exit_code )
287
266
sys .exit (exit_code )
0 commit comments