@@ -84,7 +84,7 @@ def _populate_model_parameters(self, dictionary, location):
8484 else :
8585 wlst_value = wlst_params [wlst_param ]
8686
87- _logger .finest ('WLSDPLY-06105' , wlst_param , wlst_value , wlst_path , class_name = _class_name ,
87+ _logger .finer ('WLSDPLY-06105' , wlst_param , wlst_value , wlst_path , class_name = _class_name ,
8888 method_name = _method_name )
8989 try :
9090 model_param , model_value = self ._alias_helper .get_model_attribute_name_and_value (location ,
@@ -112,8 +112,14 @@ def _get_attributes_for_current_location(self, location):
112112 :param location: context with the current location information
113113 :return: list of attributes
114114 """
115- _method_name = '_get_attributes_for_current_location'
116- attributes = None
115+ if self ._wlst_mode == WlstModes .OFFLINE :
116+ return self ._get_attributes_for_current_location_offline (location )
117+ else :
118+ return self ._get_attributes_for_current_location_online (location )
119+
120+ def _get_attributes_for_current_location_offline (self , location ):
121+ _method_name = '_get_attributes_for_current_location_offline'
122+ attributes = []
117123 path = self ._alias_helper .get_wlst_attributes_path (location )
118124 try :
119125 attributes = wlst_helper .lsa (path )
@@ -123,31 +129,36 @@ def _get_attributes_for_current_location(self, location):
123129 method_name = _method_name )
124130 return attributes
125131
126- def _get_required_attributes (self , location ):
127- if self ._wlst_mode == WlstModes .OFFLINE :
128- return self ._get_required_attributes_offline (location )
129- else :
130- return self ._get_required_attributes_online (location )
131-
132- def _get_required_attributes_offline (self , location ):
133- return self ._alias_helper .get_wlst_get_required_attribute_names (location )
132+ def _get_attributes_for_current_location_online (self , location ):
133+ _method_name = '_get_attributes_for_current_location_online'
134+ attributes = []
135+ path = self ._alias_helper .get_wlst_attributes_path (location )
136+ try :
137+ attributes = wlst_helper .lsa (path )
138+ mbean_attributes = wlst_helper .get_mbi ().getAttributes ()
139+ for mbean_attribute in mbean_attributes :
140+ name = mbean_attribute .getName ()
141+ if name not in attributes :
142+ attributes [name ] = wlst_helper .get (name )
143+ except PyWLSTException , pe :
144+ name = location .get_model_folders ()[- 1 ]
145+ _logger .fine ('WLSDPLY-06109' , name , str (location ), pe .getLocalizedMessage (), class_name = _class_name ,
146+ method_name = _method_name )
147+ return attributes
134148
135- def _get_required_attributes_online (self , location ):
149+ def _get_required_attributes (self , location ):
136150 """
137151 Use get for all online attributes, and use the attribute names in the
138152 :param location:
139153 :return:
140154 """
141- _method_name = '_get_required_attributes_online '
155+ _method_name = '_get_required_attributes '
142156 attributes = []
143157 try :
144- mbi = wlst_helper .get_mbi ()
145- mbean_attribute_info = mbi .getAttributes ()
146- for mbean_attribute in mbean_attribute_info :
147- attributes .append (mbean_attribute .getName ())
148- except PyWLSTException , pe :
158+ attributes = self ._alias_helper .get_wlst_get_required_attribute_names (location )
159+ except DiscoverException , de :
149160 name = location .get_model_folders ()[- 1 ]
150- _logger .warning ('WLSDPLY-06109' , name , str (location ), pe .getLocalizedMessage (), class_name = _class_name ,
161+ _logger .warning ('WLSDPLY-06109' , name , str (location ), de .getLocalizedMessage (), class_name = _class_name ,
151162 method_name = _method_name )
152163 return attributes
153164
@@ -176,7 +187,10 @@ def _check_attribute(self, model_name, model_value, location):
176187 :param location: context containing current location information
177188 :return: new value if modified by the handler or the original value if not a special attribute
178189 """
179- new_value = model_value
190+ if model_value == 'null ' :
191+ new_value = None
192+ else :
193+ new_value = model_value
180194 if model_name in self ._att_handler_map :
181195 type_method = self ._att_handler_map [model_name ]
182196 if type_method is not None :
0 commit comments