Skip to content

Commit fb105b1

Browse files
Various fixes
1 parent 07450eb commit fb105b1

File tree

4 files changed

+25
-16
lines changed

4 files changed

+25
-16
lines changed

core/src/main/python/wlsdeploy/tool/create/creator.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -229,19 +229,19 @@ def _create_security_provider_mbeans(self, type_name, model_nodes, base_location
229229

230230
if wlst_name not in existing_folder_names:
231231
if log_created:
232-
self.logger.info('WLSDPLY-12118', type_name, model_type_subfolder_name, name,
232+
self.logger.info('WLSDPLY-12118', type_name, model_type_subfolder_name, name, create_path,
233233
class_name=self.__class_name, method_name=_method_name)
234234
else:
235-
self.logger.fine('WLSDPLY-12118', type_name, model_type_subfolder_name, name,
235+
self.logger.fine('WLSDPLY-12118', type_name, model_type_subfolder_name, name, create_path,
236236
class_name=self.__class_name, method_name=_method_name)
237237
self.wlst_helper.cd(create_path)
238238
self.wlst_helper.create(wlst_name, wlst_type, wlst_base_provider_type)
239239
else:
240240
if log_created:
241-
self.logger.info('WLSDPLY-12119', type_name, model_type_subfolder_name, name,
241+
self.logger.info('WLSDPLY-12119', type_name, model_type_subfolder_name, name, create_path,
242242
class_name=self.__class_name, method_name=_method_name)
243243
else:
244-
self.logger.fine('WLSDPLY-12119', type_name, model_type_subfolder_name, name,
244+
self.logger.fine('WLSDPLY-12119', type_name, model_type_subfolder_name, name, create_path,
245245
class_name=self.__class_name, method_name=_method_name)
246246

247247
attribute_path = self.alias_helper.get_wlst_attributes_path(prov_location)

core/src/main/python/wlsdeploy/tool/util/attribute_setter.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -622,6 +622,8 @@ def set_attribute_with_cmo(self, location, key, value, wlst_value=None, masked=F
622622
log_value = '<masked>'
623623
self.__logger.info('WLSDPLY-20012', key, log_value, class_name=self._class_name, method_name=_method_name)
624624
else:
625+
attrib_path = self.__alias_helper.get_wlst_attributes_path(location)
626+
self.__wlst_helper.cd(attrib_path)
625627
self.__wlst_helper.set_with_cmo(wlst_attr_name, wlst_attr_value, masked=masked)
626628
return
627629

core/src/main/python/wlsdeploy/util/wlst_helper.py

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ def create(name, folder, base_provider_type=None):
167167
result = wlst.create(name, folder, base_provider_type)
168168
except (wlst.WLSTException, offlineWLSTException), e:
169169
pwe = exception_helper.create_pywlst_exception('WLSDPLY-00017', name, folder, base_provider_type,
170-
_get_exception_mode(e), _format_exception(e), error=e)
170+
_get_exception_mode(e), _format_exception(e), get_pwd(), error=e)
171171
_logger.throwing(class_name=_class_name, method_name=_method_name, error=pwe)
172172
raise pwe
173173
_logger.finest('WLSDPLY-00018', name, folder, base_provider_type, result,
@@ -423,14 +423,20 @@ def get_cmo():
423423
_method_name = 'get_cmo'
424424
_logger.entering(class_name=_class_name, method_name=_method_name)
425425

426-
try:
427-
wlst.updateCmo()
428-
except (wlst.WLSTException, offlineWLSTException), e:
429-
pwe = exception_helper.create_pywlst_exception('WLSDPLY-00036', get_pwd(), _get_exception_mode(e),
430-
_format_exception(e), error=e)
431-
_logger.throwing(class_name=_class_name, method_name='get_cmo', error=pwe)
432-
raise pwe
433-
_logger.exiting(class_name=_class_name, method_name=_method_name, result=wlst.cmo)
426+
if wlst.connected == 'true':
427+
if wlst.cmo is None:
428+
pwe = exception_helper.create_pywlst_exception('WLSDPLY-00070')
429+
_logger.throwing(class_name=_class_name, method_name=_method_name, error=pwe)
430+
raise pwe
431+
else:
432+
try:
433+
wlst.updateCmo()
434+
except (wlst.WLSTException, offlineWLSTException), e:
435+
pwe = exception_helper.create_pywlst_exception('WLSDPLY-00036', get_pwd(), _get_exception_mode(e),
436+
_format_exception(e), error=e)
437+
_logger.throwing(class_name=_class_name, method_name='get_cmo', error=pwe)
438+
raise pwe
439+
_logger.exiting(class_name=_class_name, method_name=_method_name, result=wlst.cmo)
434440
return wlst.cmo
435441

436442

core/src/main/resources/oracle/weblogic/deploy/messages/wlsdeploy_rb.properties

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ WLSDPLY-00013=Failed to find the cmo method {0} in {1} mode: {2}
2121
WLSDPLY-00014=Call to cmo.{0}({1}) in {2} mode failed: {3}
2222
WLSDPLY-00015=Exiting set_with_cmo({0}, {1})
2323
WLSDPLY-00016=Entering create({0}, {1}, {2}) method
24-
WLSDPLY-00017=Unable to create({0}, {1}, {2}) in {3} mode : {4}
24+
WLSDPLY-00017=Unable to create({0}, {1}, {2}) in {3} mode at location {5} : {4}
2525
WLSDPLY-00018=Exiting create({0}, {1}, {2}) method with result {3}
2626
WLSDPLY-00019=Entering delete({0}, {1}) method
2727
WLSDPLY-00020=Unable to delete({0}, {1}) in {2} mode : {3}
@@ -74,6 +74,7 @@ WLSDPLY-00066=Failed to switch to the domainRuntime MBean tree: {0}
7474
WLSDPLY-00067=Failed to switch to the custom MBean tree: {0}
7575
WLSDPLY-00068=Failed to change directories back to the original location {0}: {1}
7676
WLSDPLY-00069=wlst.undo() failed : {0}
77+
WLSDPLY-00070=Unexpected exception: the cmo is not valid in online wlst
7778

7879
###############################################################################
7980
# Util messages (1000 - 3999) #
@@ -940,8 +941,8 @@ WLSDPLY-12115=Setting attribute {0} to value {1}
940941
WLSDPLY-12116=Creating named security provider mbeans for subfolder {0} because location ({1}) supports \
941942
multiple child MBeans using an artificial type subfolder: {2}
942943
WLSDPLY-12117=While creating security {0} with name {1}, found {2} model type subfolders when exactly one was expected
943-
WLSDPLY-12118=Creating {0} of type {1} with name {2}
944-
WLSDPLY-12119=Updating {0} of type {1} with name {2}
944+
WLSDPLY-12118=Creating {0} of type {1} with name {2} at location {3}
945+
WLSDPLY-12119=Updating {0} of type {1} with name {2} at location {3}
945946
WLSDPLY-12120=Unexpected artificial type folder found in location {0} while creating folder {1} for location {2}
946947
WLSDPLY-12121=The attribute {0} in model location {1} has value {2} that references a file inside the \
947948
archive file {3} that does not exist

0 commit comments

Comments
 (0)