Skip to content

Commit 59c9783

Browse files
Merge pull request #237 from oracle/jira-wdt-8-wldf-not-found
Jira wdt 8 wldf not found
2 parents 4743a7b + 1edd3fd commit 59c9783

File tree

7 files changed

+30
-12
lines changed

7 files changed

+30
-12
lines changed

core/src/main/python/wlsdeploy/aliases/alias_utils.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@
5252
from wlsdeploy.aliases.alias_constants import WLST_TYPE
5353
from wlsdeploy.aliases.alias_constants import WLST_SUBFOLDERS_PATH
5454
from wlsdeploy.aliases.model_constants import ARGUMENTS
55-
from wlsdeploy.aliases.model_constants import MODEL_LIST_DELIMITER
5655
from wlsdeploy.aliases.model_constants import SERVER
5756
from wlsdeploy.aliases.model_constants import SERVER_START
5857

@@ -683,13 +682,10 @@ def convert_from_type(data_type, value, preferred=None, delimiter=None):
683682
elif value is not None and isinstance(value, ObjectName):
684683
new_value = value.getKeyProperty('Name')
685684
else:
686-
new_value = _jconvert_to_type(data_type, value, delimiter)
687-
685+
model_type = data_type
688686
if preferred:
689-
# now put it into the preferred model type, but the model delimiter should ALWAYS be the
690-
# model default delimiter
691-
delimiter = MODEL_LIST_DELIMITER
692-
new_value = _jconvert_to_type(preferred, new_value, delimiter)
687+
model_type = preferred
688+
new_value = _jconvert_to_type(model_type, value, delimiter)
693689

694690
return new_value
695691

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

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,20 @@ def set_server_template_mbean(self, location, key, value, wlst_value):
312312

313313
def set_cluster_mbean(self, location, key, value, wlst_value):
314314
"""
315-
assign the Cluster MBean.
315+
Set the Cluster MBean.
316+
:param location: the location
317+
:param key: the attribute name
318+
:param value: the string value
319+
:param wlst_value: the existing value of the attribute from WLST
320+
:raises BundleAwareException of the specified type: if the cluster is not found
321+
"""
322+
mbean = self.__find_in_location(LocationContext(), CLUSTER, value, required=True)
323+
self.set_attribute(location, key, mbean, wlst_merge_value=wlst_value, use_raw_value=True)
324+
return
325+
326+
def set_server_cluster_mbean(self, location, key, value, wlst_value):
327+
"""
328+
assign the Cluster MBean to a server.
316329
:param location: the location
317330
:param key: the attribute name
318331
:param value: the string value

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ def assign(self, source_type, source_name, target_type, target_name):
3535
try:
3636
wlst_helper.assign(source_type, source_name, target_type, target_name)
3737
except PyWLSTException, pwe:
38-
ex = exception_helper.create_exception(self.__exception_type, 'WLSDPLY-19100',
39-
source_type, source_name, target_type, target_name,
38+
ex = exception_helper.create_exception(self.__exception_type, 'WLSDPLY-19143',
39+
target_type, target_name, source_type, source_name,
4040
pwe.getLocalizedMessage(), error=pwe)
4141
self.__logger.throwing(ex, class_name=self.__class_name, method_name=_method_name)
4242
raise ex

core/src/main/resources/oracle/weblogic/deploy/aliases/category_modules/Server.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1353,7 +1353,7 @@
13531353
"ClasspathServletDisabled": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "ClasspathServletDisabled", "wlst_path": "WP001", "value": {"default": "false" }, "wlst_type": "boolean" } ],
13541354
"ClasspathServletSecureModeEnabled": [ {"version": "[12.2.1.3,)", "wlst_mode": "both", "wlst_name": "ClasspathServletSecureModeEnabled", "wlst_path": "WP001", "value": {"default": "false" }, "wlst_type": "boolean" } ],
13551355
"ClientCertProxyEnabled": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "ClientCertProxyEnabled", "wlst_path": "WP001", "value": {"default": "false" }, "wlst_type": "boolean" } ],
1356-
"Cluster": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "Cluster", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "string", "get_method": "LSA", "set_method": "${MBEAN.set_cluster_mbean:MBEAN.set_cluster_mbean}", "set_mbean_type": "${:weblogic.management.configuration.ClusterMBean}" } ],
1356+
"Cluster": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "Cluster", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "string", "get_method": "LSA", "set_method": "${MBEAN.set_server_cluster_mbean:MBEAN.set_server_cluster_mbean}", "set_mbean_type": "${:weblogic.management.configuration.ClusterMBean}" } ],
13571357
"ClusterWeight": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "ClusterWeight", "wlst_path": "WP001", "value": {"default": 100 }, "wlst_type": "integer" } ],
13581358
"CoherenceClusterSystemResource": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "CoherenceClusterSystemResource", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "string", "get_method": "LSA", "set_method": "${:MBEAN.set_coherence_cluster_mbean}", "set_mbean_type": "${:weblogic.management.configuration.CoherenceClusterSystemResourceMBean}" } ],
13591359
"CompleteCOMMessageTimeout": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "CompleteCOMMessageTimeout", "wlst_path": "WP001", "value": {"default": -1 }, "wlst_type": "integer" } ],

core/src/main/resources/oracle/weblogic/deploy/aliases/category_modules/ServerTemplate.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1364,7 +1364,7 @@
13641364
"ClasspathServletDisabled": [ {"version": "[12.1.2,)", "wlst_mode": "both", "wlst_name": "ClasspathServletDisabled", "wlst_path": "WP001", "value": {"default": "false" }, "wlst_type": "boolean" } ],
13651365
"ClasspathServletSecureModeEnabled": [ {"version": "[12.2.1.3,)", "wlst_mode": "both", "wlst_name": "ClasspathServletSecureModeEnabled", "wlst_path": "WP001", "value": {"default": "false" }, "wlst_type": "boolean" } ],
13661366
"ClientCertProxyEnabled": [ {"version": "[12.1.2,)", "wlst_mode": "both", "wlst_name": "ClientCertProxyEnabled", "wlst_path": "WP001", "value": {"default": "false" }, "wlst_type": "boolean" } ],
1367-
"Cluster": [ {"version": "[12.1.2,)", "wlst_mode": "both", "wlst_name": "Cluster", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "string", "get_method": "LSA", "set_method": "${:MBEAN.set_cluster_mbean}", "set_mbean_type": "${:weblogic.management.configuration.ClusterMBean}" } ],
1367+
"Cluster": [ {"version": "[12.1.2,)", "wlst_mode": "both", "wlst_name": "Cluster", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "string", "get_method": "LSA", "set_method": "${:MBEAN.set_server_cluster_mbean}", "set_mbean_type": "${:weblogic.management.configuration.ClusterMBean}" } ],
13681368
"ClusterWeight": [ {"version": "[12.1.2,)", "wlst_mode": "both", "wlst_name": "ClusterWeight", "wlst_path": "WP001", "value": {"default": 100 }, "wlst_type": "integer" } ],
13691369
"CoherenceClusterSystemResource": [ {"version": "[12.1.2,)", "wlst_mode": "both", "wlst_name": "CoherenceClusterSystemResource", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "string", "get_method": "LSA", "set_method": "${:MBEAN.set_coherence_cluster_mbean}", "set_mbean_type": "${:weblogic.management.configuration.CoherenceClusterSystemResourceMBean}" } ],
13701370
"CompleteCOMMessageTimeout": [ {"version": "[12.1.2,)", "wlst_mode": "both", "wlst_name": "CompleteCOMMessageTimeout", "wlst_path": "WP001", "value": {"default": -1 }, "wlst_type": "integer" } ],

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1140,6 +1140,7 @@ WLSDPLY-19139=Failed to start application {0}: {1}
11401140
WLSDPLY-19140=Failed to stop application {0}: {1}
11411141
WLSDPLY-19141=Failed to undeploy application {0}:{1}
11421142
WLSDPLY-19142=Failed to undo changes: {0}
1143+
WLSDPLY-19143=Failed to assign {0} {1} to {2} {3}
11431144

11441145
# wlsdeploy/tool/util/attribute_setter.py
11451146
WLSDPLY-19200=No target found with name {0}

core/src/test/python/alias_utils_test.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,14 @@ def testWindowsPathSeparators(self):
108108
self.assertEqual(actual, expected)
109109
return
110110

111+
def testDelimitedListToList(self):
112+
value = 'one;two;three'
113+
actual = alias_utils.convert_from_type("invalid", value, preferred='list', delimiter=';')
114+
expected = ['one', 'two', 'three']
115+
lists_equal, message = self.__lists_are_equal(actual, expected)
116+
self.assertEqual(lists_equal, True, message)
117+
return
118+
111119
def __lists_are_equal(self, actual, expected):
112120
if actual is None and expected is None:
113121
return True, 'ok'

0 commit comments

Comments
 (0)