Skip to content

Jira wdt 8 wldf not found #237

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 31, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions core/src/main/python/wlsdeploy/aliases/alias_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@
from wlsdeploy.aliases.alias_constants import WLST_TYPE
from wlsdeploy.aliases.alias_constants import WLST_SUBFOLDERS_PATH
from wlsdeploy.aliases.model_constants import ARGUMENTS
from wlsdeploy.aliases.model_constants import MODEL_LIST_DELIMITER
from wlsdeploy.aliases.model_constants import SERVER
from wlsdeploy.aliases.model_constants import SERVER_START

Expand Down Expand Up @@ -683,13 +682,10 @@ def convert_from_type(data_type, value, preferred=None, delimiter=None):
elif value is not None and isinstance(value, ObjectName):
new_value = value.getKeyProperty('Name')
else:
new_value = _jconvert_to_type(data_type, value, delimiter)

model_type = data_type
if preferred:
# now put it into the preferred model type, but the model delimiter should ALWAYS be the
# model default delimiter
delimiter = MODEL_LIST_DELIMITER
new_value = _jconvert_to_type(preferred, new_value, delimiter)
model_type = preferred
new_value = _jconvert_to_type(model_type, value, delimiter)

return new_value

Expand Down
15 changes: 14 additions & 1 deletion core/src/main/python/wlsdeploy/tool/util/attribute_setter.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,20 @@ def set_server_template_mbean(self, location, key, value, wlst_value):

def set_cluster_mbean(self, location, key, value, wlst_value):
"""
assign the Cluster MBean.
Set the Cluster MBean.
:param location: the location
:param key: the attribute name
:param value: the string value
:param wlst_value: the existing value of the attribute from WLST
:raises BundleAwareException of the specified type: if the cluster is not found
"""
mbean = self.__find_in_location(LocationContext(), CLUSTER, value, required=True)
self.set_attribute(location, key, mbean, wlst_merge_value=wlst_value, use_raw_value=True)
return

def set_server_cluster_mbean(self, location, key, value, wlst_value):
"""
assign the Cluster MBean to a server.
:param location: the location
:param key: the attribute name
:param value: the string value
Expand Down
4 changes: 2 additions & 2 deletions core/src/main/python/wlsdeploy/tool/util/wlst_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ def assign(self, source_type, source_name, target_type, target_name):
try:
wlst_helper.assign(source_type, source_name, target_type, target_name)
except PyWLSTException, pwe:
ex = exception_helper.create_exception(self.__exception_type, 'WLSDPLY-19100',
source_type, source_name, target_type, target_name,
ex = exception_helper.create_exception(self.__exception_type, 'WLSDPLY-19143',
target_type, target_name, source_type, source_name,
pwe.getLocalizedMessage(), error=pwe)
self.__logger.throwing(ex, class_name=self.__class_name, method_name=_method_name)
raise ex
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1353,7 +1353,7 @@
"ClasspathServletDisabled": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "ClasspathServletDisabled", "wlst_path": "WP001", "value": {"default": "false" }, "wlst_type": "boolean" } ],
"ClasspathServletSecureModeEnabled": [ {"version": "[12.2.1.3,)", "wlst_mode": "both", "wlst_name": "ClasspathServletSecureModeEnabled", "wlst_path": "WP001", "value": {"default": "false" }, "wlst_type": "boolean" } ],
"ClientCertProxyEnabled": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "ClientCertProxyEnabled", "wlst_path": "WP001", "value": {"default": "false" }, "wlst_type": "boolean" } ],
"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}" } ],
"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}" } ],
"ClusterWeight": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "ClusterWeight", "wlst_path": "WP001", "value": {"default": 100 }, "wlst_type": "integer" } ],
"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}" } ],
"CompleteCOMMessageTimeout": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "CompleteCOMMessageTimeout", "wlst_path": "WP001", "value": {"default": -1 }, "wlst_type": "integer" } ],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1364,7 +1364,7 @@
"ClasspathServletDisabled": [ {"version": "[12.1.2,)", "wlst_mode": "both", "wlst_name": "ClasspathServletDisabled", "wlst_path": "WP001", "value": {"default": "false" }, "wlst_type": "boolean" } ],
"ClasspathServletSecureModeEnabled": [ {"version": "[12.2.1.3,)", "wlst_mode": "both", "wlst_name": "ClasspathServletSecureModeEnabled", "wlst_path": "WP001", "value": {"default": "false" }, "wlst_type": "boolean" } ],
"ClientCertProxyEnabled": [ {"version": "[12.1.2,)", "wlst_mode": "both", "wlst_name": "ClientCertProxyEnabled", "wlst_path": "WP001", "value": {"default": "false" }, "wlst_type": "boolean" } ],
"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}" } ],
"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}" } ],
"ClusterWeight": [ {"version": "[12.1.2,)", "wlst_mode": "both", "wlst_name": "ClusterWeight", "wlst_path": "WP001", "value": {"default": 100 }, "wlst_type": "integer" } ],
"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}" } ],
"CompleteCOMMessageTimeout": [ {"version": "[12.1.2,)", "wlst_mode": "both", "wlst_name": "CompleteCOMMessageTimeout", "wlst_path": "WP001", "value": {"default": -1 }, "wlst_type": "integer" } ],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1140,6 +1140,7 @@ WLSDPLY-19139=Failed to start application {0}: {1}
WLSDPLY-19140=Failed to stop application {0}: {1}
WLSDPLY-19141=Failed to undeploy application {0}:{1}
WLSDPLY-19142=Failed to undo changes: {0}
WLSDPLY-19143=Failed to assign {0} {1} to {2} {3}

# wlsdeploy/tool/util/attribute_setter.py
WLSDPLY-19200=No target found with name {0}
Expand Down
8 changes: 8 additions & 0 deletions core/src/test/python/alias_utils_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,14 @@ def testWindowsPathSeparators(self):
self.assertEqual(actual, expected)
return

def testDelimitedListToList(self):
value = 'one;two;three'
actual = alias_utils.convert_from_type("invalid", value, preferred='list', delimiter=';')
expected = ['one', 'two', 'three']
lists_equal, message = self.__lists_are_equal(actual, expected)
self.assertEqual(lists_equal, True, message)
return

def __lists_are_equal(self, actual, expected):
if actual is None and expected is None:
return True, 'ok'
Expand Down