2828from wlsdeploy .logging .platform_logger import PlatformLogger
2929from wlsdeploy .tool .encrypt import encryption_utils
3030from wlsdeploy .tool .util .alias_helper import AliasHelper
31+ from wlsdeploy .util import cla_helper
3132from wlsdeploy .util import getcreds
3233from wlsdeploy .util import variables as variable_helper
33- from wlsdeploy .tool .util import wlst_helper
34- from wlsdeploy .tool .util .wlst_helper import WlstHelper
3534from wlsdeploy .util .cla_utils import CommandLineArgUtil
3635from wlsdeploy .util .model_context import ModelContext
3736from wlsdeploy .util .model_translator import FileToPython
3837from wlsdeploy .util .model_translator import PythonToFile
3938
40- wlst_helper .wlst_functions = globals ()
41-
4239_program_name = 'encryptModel'
4340_class_name = 'encrypt'
4441__logger = PlatformLogger ('wlsdeploy.encrypt' )
@@ -68,7 +65,7 @@ def __process_args(args):
6865 cla_util = CommandLineArgUtil (_program_name , __required_arguments , __optional_arguments )
6966 required_arg_map , optional_arg_map = cla_util .process_args (args )
7067
71- __verify_required_args_present ( required_arg_map )
68+ cla_helper . verify_required_args_present ( _program_name , __required_arguments , required_arg_map )
7269 __validate_mode_args (optional_arg_map )
7370 __process_passphrase_arg (optional_arg_map )
7471
@@ -91,23 +88,6 @@ def __process_args(args):
9188 return model_context
9289
9390
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-
11191def __validate_mode_args (optional_arg_map ):
11292 """
11393 Verify that either the model_file or the manual switch was specified.
@@ -281,7 +261,6 @@ def main(args):
281261 for index , arg in enumerate (args ):
282262 __logger .finer ('sys.argv[{0}] = {1}' , str (index ), str (arg ), class_name = _class_name , method_name = _method_name )
283263
284- WlstHelper (ExceptionType .ENCRYPTION ).silence ()
285264 exit_code = _process_request (args )
286265 __logger .exiting (class_name = _class_name , method_name = _method_name , result = exit_code )
287266 sys .exit (exit_code )
0 commit comments