|
28 | 28 | from wlsdeploy.aliases import model_constants |
29 | 29 | from wlsdeploy.aliases.aliases import Aliases |
30 | 30 | from wlsdeploy.aliases.location_context import LocationContext |
31 | | -import wlsdeploy.tool.util.variable_injector as variable_injector |
32 | 31 |
|
33 | 32 | from wlsdeploy.aliases.wlst_modes import WlstModes |
34 | 33 | from wlsdeploy.exception import exception_helper |
35 | 34 | from wlsdeploy.logging.platform_logger import PlatformLogger |
36 | | -from wlsdeploy.tool.create.domain_typedef import DomainTypedef |
37 | 35 | from wlsdeploy.tool.discover import discoverer |
38 | 36 | from wlsdeploy.tool.discover.deployments_discoverer import DeploymentsDiscoverer |
39 | 37 | from wlsdeploy.tool.discover.domain_info_discoverer import DomainInfoDiscoverer |
40 | 38 | from wlsdeploy.tool.discover.multi_tenant_discoverer import MultiTenantDiscoverer |
41 | 39 | from wlsdeploy.tool.discover.resources_discoverer import ResourcesDiscoverer |
42 | 40 | from wlsdeploy.tool.discover.topology_discoverer import TopologyDiscoverer |
43 | 41 | from wlsdeploy.tool.util import filter_helper |
| 42 | +from wlsdeploy.tool.util import model_context_helper |
44 | 43 | from wlsdeploy.tool.util.variable_injector import VariableInjector |
45 | 44 | from wlsdeploy.tool.validate.validator import Validator |
46 | | -from wlsdeploy.util import dictionary_utils |
47 | 45 | from wlsdeploy.util import getcreds |
48 | 46 | from wlsdeploy.util import model_translator |
49 | 47 | from wlsdeploy.util import tool_exit |
50 | 48 | from wlsdeploy.util import wlst_extended |
51 | 49 | from wlsdeploy.util import wlst_helper |
52 | 50 | from wlsdeploy.util.cla_utils import CommandLineArgUtil |
53 | 51 | from wlsdeploy.util.model import Model |
54 | | -from wlsdeploy.util.model_context import ModelContext |
55 | 52 | from wlsdeploy.util.weblogic_helper import WebLogicHelper |
56 | 53 |
|
57 | 54 | wlst_extended.wlst_functions = globals() |
@@ -90,21 +87,14 @@ def __process_args(args): |
90 | 87 | cla_util = CommandLineArgUtil(_program_name, __required_arguments, __optional_arguments) |
91 | 88 | required_arg_map, optional_arg_map = cla_util.process_args(args) |
92 | 89 |
|
93 | | - domain_type = dictionary_utils.get_element(optional_arg_map, CommandLineArgUtil.DOMAIN_TYPE_SWITCH) |
94 | | - if domain_type is None: |
95 | | - domain_type = 'WLS' |
96 | | - domain_typedef = DomainTypedef(_program_name, domain_type) |
97 | | - optional_arg_map[CommandLineArgUtil.DOMAIN_TYPEDEF] = domain_typedef |
98 | | - |
99 | 90 | __verify_required_args_present(required_arg_map) |
100 | 91 | __wlst_mode = __process_online_args(optional_arg_map) |
101 | 92 | __process_archive_filename_arg(required_arg_map) |
102 | 93 | __process_variable_filename_arg(optional_arg_map) |
103 | 94 |
|
104 | 95 | combined_arg_map = optional_arg_map.copy() |
105 | 96 | combined_arg_map.update(required_arg_map) |
106 | | - |
107 | | - return ModelContext(_program_name, combined_arg_map) |
| 97 | + return model_context_helper.create_context(_program_name, combined_arg_map) |
108 | 98 |
|
109 | 99 |
|
110 | 100 | def __verify_required_args_present(required_arg_map): |
@@ -493,7 +483,7 @@ def main(args): |
493 | 483 | class_name=_class_name, method_name=_method_name) |
494 | 484 |
|
495 | 485 | # create a minimal model for summary logging |
496 | | - model_context = ModelContext(_program_name, dict()) |
| 486 | + model_context = model_context_helper.create_exit_context(_program_name) |
497 | 487 | __log_and_exit(model_context, exit_code, _class_name, _method_name) |
498 | 488 |
|
499 | 489 | try: |
|
0 commit comments