4040from wlsdeploy .tool .util import filter_helper
4141from wlsdeploy .tool .util import model_context_helper
4242from wlsdeploy .tool .util import variable_injector_functions
43- from wlsdeploy .tool .util .alias_helper import AliasHelper
4443from wlsdeploy .tool .util .variable_injector import VariableInjector
4544from wlsdeploy .tool .validate import validation_utils
4645from wlsdeploy .tool .validate .validator import Validator
@@ -108,8 +107,8 @@ def __init__(self, model_files, model_context, logger, output_dir=None):
108107 self .model_files = model_files
109108 self .output_dir = output_dir
110109 self .model_context = model_context
111- self ._aliases = Aliases (model_context = model_context , wlst_mode = WlstModes .OFFLINE )
112- self . _alias_helper = AliasHelper ( self . _aliases , logger , ExceptionType .COMPARE )
110+ self ._aliases = Aliases (model_context = model_context , wlst_mode = WlstModes .OFFLINE ,
111+ exception_type = ExceptionType .COMPARE )
113112 self ._logger = logger
114113 self ._name_tokens_location = LocationContext ()
115114 self ._name_tokens_location .add_name_token ('DOMAIN' , "testdomain" )
@@ -124,14 +123,14 @@ def __walk_model_section(self, model_section_key, model_dict, valid_section_fold
124123 return
125124
126125 # only specific top-level sections have attributes
127- attribute_location = self ._alias_helper .get_model_section_attribute_location (model_section_key )
126+ attribute_location = self ._aliases .get_model_section_attribute_location (model_section_key )
128127
129128 valid_attr_infos = []
130129 path_tokens_attr_keys = []
131130
132131 if attribute_location is not None :
133- valid_attr_infos = self ._alias_helper .get_model_attribute_names_and_types (attribute_location )
134- path_tokens_attr_keys = self ._alias_helper .get_model_uses_path_tokens_attribute_names (attribute_location )
132+ valid_attr_infos = self ._aliases .get_model_attribute_names_and_types (attribute_location )
133+ path_tokens_attr_keys = self ._aliases .get_model_uses_path_tokens_attribute_names (attribute_location )
135134
136135 model_section_dict = model_dict [model_section_key ]
137136 for section_dict_key , section_dict_value in model_section_dict .iteritems ():
@@ -158,16 +157,16 @@ def __walk_model_section(self, model_section_key, model_dict, valid_section_fold
158157 def __walk_section_folder (self , model_node , validation_location ):
159158 _method_name = '__validate_section_folder'
160159
161- model_folder_path = self ._alias_helper .get_model_folder_path (validation_location )
160+ model_folder_path = self ._aliases .get_model_folder_path (validation_location )
162161
163- if self ._alias_helper .supports_multiple_mbean_instances (validation_location ):
162+ if self ._aliases .supports_multiple_mbean_instances (validation_location ):
164163
165164 for name in model_node :
166165 expanded_name = name
167166
168167 new_location = LocationContext (validation_location )
169168
170- name_token = self ._alias_helper .get_name_token (new_location )
169+ name_token = self ._aliases .get_name_token (new_location )
171170
172171 if name_token is not None :
173172 new_location .add_name_token (name_token , expanded_name )
@@ -176,14 +175,14 @@ def __walk_section_folder(self, model_node, validation_location):
176175
177176 self .__walk_model_node (value_dict , new_location )
178177
179- elif self ._alias_helper .requires_artificial_type_subfolder_handling (validation_location ):
178+ elif self ._aliases .requires_artificial_type_subfolder_handling (validation_location ):
180179
181180 for name in model_node :
182181 expanded_name = name
183182
184183 new_location = LocationContext (validation_location )
185184
186- name_token = self ._alias_helper .get_name_token (new_location )
185+ name_token = self ._aliases .get_name_token (new_location )
187186
188187 if name_token is not None :
189188 new_location .add_name_token (name_token , expanded_name )
@@ -193,7 +192,7 @@ def __walk_section_folder(self, model_node, validation_location):
193192 self .__walk_model_node (value_dict , new_location )
194193
195194 else :
196- name_token = self ._alias_helper .get_name_token (validation_location )
195+ name_token = self ._aliases .get_name_token (validation_location )
197196
198197 if name_token is not None :
199198 name = self ._name_tokens_location .get_name_for_token (name_token )
@@ -208,18 +207,18 @@ def __walk_section_folder(self, model_node, validation_location):
208207 def __walk_model_node (self , model_node , validation_location ):
209208 _method_name = '__process_model_node'
210209
211- valid_folder_keys = self ._alias_helper .get_model_subfolder_names (validation_location )
212- valid_attr_infos = self ._alias_helper .get_model_attribute_names_and_types (validation_location )
213- model_folder_path = self ._alias_helper .get_model_folder_path (validation_location )
210+ valid_folder_keys = self ._aliases .get_model_subfolder_names (validation_location )
211+ valid_attr_infos = self ._aliases .get_model_attribute_names_and_types (validation_location )
212+ model_folder_path = self ._aliases .get_model_folder_path (validation_location )
214213
215214 for key , value in model_node .iteritems ():
216215
217216 if key in valid_folder_keys :
218217 new_location = LocationContext (validation_location ).append_location (key )
219218
220- if self ._alias_helper .is_artificial_type_folder (new_location ):
219+ if self ._aliases .is_artificial_type_folder (new_location ):
221220 # key is an ARTIFICIAL_TYPE folder
222- valid_attr_infos = self ._alias_helper .get_model_attribute_names_and_types (new_location )
221+ valid_attr_infos = self ._aliases .get_model_attribute_names_and_types (new_location )
223222
224223 self .__walk_attributes (value , valid_attr_infos , new_location )
225224 else :
@@ -237,17 +236,17 @@ def __walk_model_node(self, model_node, validation_location):
237236
238237 else :
239238 path_tokens_attr_keys = \
240- self ._alias_helper .get_model_uses_path_tokens_attribute_names (validation_location )
239+ self ._aliases .get_model_uses_path_tokens_attribute_names (validation_location )
241240
242241 self .__walk_attribute (key , value , valid_attr_infos , path_tokens_attr_keys , model_folder_path ,
243242 validation_location )
244243
245244 def __walk_attributes (self , attributes_dict , valid_attr_infos , validation_location ):
246245 _method_name = '__validate_attributes'
247246
248- path_tokens_attr_keys = self ._alias_helper .get_model_uses_path_tokens_attribute_names (validation_location )
247+ path_tokens_attr_keys = self ._aliases .get_model_uses_path_tokens_attribute_names (validation_location )
249248
250- model_folder_path = self ._alias_helper .get_model_folder_path (validation_location )
249+ model_folder_path = self ._aliases .get_model_folder_path (validation_location )
251250
252251 for attribute_name , attribute_value in attributes_dict .iteritems ():
253252 self .__walk_attribute (attribute_name , attribute_value , valid_attr_infos , path_tokens_attr_keys ,
@@ -399,14 +398,14 @@ def walk(self):
399398 self .cache [key ] = ''
400399
401400 # use a merged, substituted, filtered model to get domain name and create additional target output.
402- full_model_dictionary = cla_helper .load_model (_program_name , self .model_context , self ._alias_helper ,
401+ full_model_dictionary = cla_helper .load_model (_program_name , self .model_context , self ._aliases ,
403402 "discover" , WlstModes .OFFLINE )
404403
405404 target_configuration_helper .generate_k8s_script (self .model_context , self .cache , full_model_dictionary )
406405
407406 # create any additional outputs from full model dictionary
408407 target_configuration_helper .create_additional_output (Model (full_model_dictionary ), self .model_context ,
409- self ._alias_helper , ExceptionType .VALIDATE )
408+ self ._aliases , ExceptionType .VALIDATE )
410409
411410 except ValidateException , te :
412411 self ._logger .severe ('WLSDPLY-20009' , _program_name , model_file_name , te .getLocalizedMessage (),
0 commit comments