Skip to content

Commit 24b03c0

Browse files
authored
Fix Restricted JRF template creation and blacklist issue, also use assign cluster to server instead of set in wlst_helper since using set will confuse targetting for templates apps/libs. (#227)
1 parent 03d4a2e commit 24b03c0

File tree

5 files changed

+146
-10
lines changed

5 files changed

+146
-10
lines changed

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

+5-3
Original file line numberDiff line numberDiff line change
@@ -312,15 +312,17 @@ 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-
Set the Cluster MBean.
315+
assign the Cluster MBean.
316316
:param location: the location
317317
:param key: the attribute name
318318
:param value: the string value
319319
:param wlst_value: the existing value of the attribute from WLST
320320
:raises BundleAwareException of the specified type: if the cluster is not found
321321
"""
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)
322+
323+
entity_type, entity_name = self.__alias_helper.get_model_type_and_name(location)
324+
325+
self.__wlst_helper.assign(entity_type, entity_name, key, value)
324326
return
325327

326328
def set_coherence_cluster_mbean(self, location, key, value, wlst_value):

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

+21
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,27 @@ def __init__(self, logger, exception_type):
2020
self.__exception_type = exception_type
2121
return
2222

23+
def assign(self, source_type, source_name, target_type, target_name):
24+
"""
25+
Assign target entity to source entity
26+
:param source_type: source entity type
27+
:param source_name: entity name
28+
:param target_type: target type
29+
:param target_name: target name
30+
:raises: BundleAwareException of the specified type: if an error occurs
31+
"""
32+
33+
_method_name = 'assign'
34+
35+
try:
36+
wlst_helper.assign(source_type, source_name, target_type, target_name)
37+
except PyWLSTException, pwe:
38+
ex = exception_helper.create_exception(self.__exception_type, 'WLSDPLY-19100',
39+
source_type, source_name, target_type, target_name,
40+
pwe.getLocalizedMessage(), error=pwe)
41+
self.__logger.throwing(ex, class_name=self.__class_name, method_name=_method_name)
42+
raise ex
43+
2344
def cd(self, wlst_path):
2445
"""
2546
Change WLST directories to the specified path

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

+26
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,32 @@
1414
_class_name = 'wlst_helper'
1515

1616

17+
def assign(source_type, source_name, target_type, target_name):
18+
"""
19+
Assign target entity to source entity
20+
21+
:param source_type: source entity type
22+
:param source_name: entity name
23+
:param target_type: target type
24+
:param target_name: target name
25+
:raises: PyWLSTException: if a WLST error occurs
26+
"""
27+
28+
_method_name = 'assign'
29+
_logger.finest('WLSDPLY-00001', source_type, source_name, target_type, target_name, class_name=_class_name,
30+
method_name=_method_name)
31+
32+
try:
33+
wlst.assign(source_type, source_name, target_type, target_name)
34+
except (wlst.WLSTException, offlineWLSTException), e:
35+
raise exception_helper.create_pywlst_exception('WLSDPLY-00002', source_type, source_name, target_type,
36+
target_name, _get_exception_mode(e),
37+
_format_exception(e), error=e)
38+
_logger.finest('WLSDPLY-00003', source_type, source_name, target_type, target_name, class_name=_class_name,
39+
method_name=_method_name)
40+
return
41+
42+
1743
def cd(path):
1844
"""
1945
Change location to the provided path.

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

+1-1
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}", "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_cluster_mbean:MBEAN.set_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/typedefs/RestrictedJRF.json

+93-6
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,107 @@
55
"description": "Restricted JRF type domain definitions",
66
"versions": {
77
"12.2.1": "RJRF_12CR2",
8+
"12.2.1.3": "RJRF_12213",
89
"19.1": "RJRF_19CR1"
910
},
1011
"definitions": {
1112
"RJRF_12CR2": {
1213
"baseTemplate": "Basic WebLogic Server Domain",
13-
"extensionTemplates": [ "Oracle Enterprise Manager-Restricted JRF" ],
14-
"serverGroupsToTarget": [ "JRF-MAN-SVR" ],
15-
"rcuSchemas": [ "MDS", "IAU", "IAU_VIEWER", "IAU_APPEND", "OPSS"]
14+
"extensionTemplates": [ "Oracle Restricted JRF", "Oracle Enterprise Manager-Restricted JRF" ],
15+
"serverGroupsToTarget": [ "JRF-MAN-SVR", "WSM-CACHE-SVR", "JRF-WS-CORE-MAN-SVR"],
16+
"rcuSchemas": [ ]
17+
},
18+
"RJRF_12213": {
19+
"baseTemplate": "Basic WebLogic Server Domain",
20+
"extensionTemplates": [ "Oracle Restricted JRF", "Oracle Enterprise Manager-Restricted JRF" ],
21+
"serverGroupsToTarget": [ "JRF-MAN-SVR", "WSM-CACHE-SVR", "JRF-WS-CORE-MAN-SVR" ],
22+
"rcuSchemas": [ ]
1623
},
1724
"RJRF_19CR1": {
1825
"baseTemplate": "Basic WebLogic Server Domain",
19-
"extensionTemplates": [ "Oracle Enterprise Manager-Restricted JRF" ],
20-
"serverGroupsToTarget": [ "JRF-MAN-SVR" ],
21-
"rcuSchemas": [ "MDS", "IAU", "IAU_VIEWER", "IAU_APPEND", "OPSS"]
26+
"extensionTemplates": [ "Oracle Restricted JRF", "Oracle Enterprise Manager-Restricted JRF"],
27+
"serverGroupsToTarget": [ "JRF-MAN-SVR", "WSM-CACHE-SVR", "JRF-WS-CORE-MAN-SVR" ],
28+
"rcuSchemas": [ ]
2229
}
30+
},
31+
"system-elements": {
32+
"apps": [
33+
"coherence-transaction-rar",
34+
"DMS Application%%",
35+
"em",
36+
"opss-rest",
37+
"state-management-provider-memory-rar",
38+
"wsil-wls",
39+
"wsm-pm"
40+
],
41+
"coherence-clusters": [
42+
"defaultCoherenceCluster"
43+
],
44+
"shared-libraries": [
45+
"adf.oracle.businesseditor%%",
46+
"adf.oracle.domain%%",
47+
"adf.oracle.domain.webapp%%",
48+
"em_common%%",
49+
"em_core_ppc_pojo_jar",
50+
"em_error%%",
51+
"em_sdkcore_ppc_public_pojo_jar",
52+
"emagentsdk_jar%%",
53+
"emagentsdkimpl_jar%%",
54+
"emagentsdkimplpriv_jar%%",
55+
"emas",
56+
"emcore",
57+
"emcore_jar",
58+
"emcoreclient_jar",
59+
"emcorecommon_jar",
60+
"emcoreconsole_jar",
61+
"emcoreintsdk_jar%%",
62+
"emcorepbs_jar",
63+
"emcoresdk_jar%%",
64+
"emcoresdkimpl_jar%%",
65+
"jsf%%",
66+
"jstl%%",
67+
"log4j_jar%%",
68+
"odl.clickhistory%%",
69+
"odl.clickhistory.webapp%%",
70+
"ohw-rcf%%",
71+
"ohw-uix%%",
72+
"oracle.adf.dconfigbeans%%",
73+
"oracle.adf.desktopintegration%%",
74+
"oracle.adf.desktopintegration.model%%",
75+
"oracle.adf.management%%",
76+
"oracle.bi.adf.model.slib%%",
77+
"oracle.bi.adf.view.slib%%",
78+
"oracle.bi.adf.webcenter.slib%%",
79+
"oracle.bi.composer%%",
80+
"oracle.bi.jbips%%",
81+
"oracle.dconfig-infra%%",
82+
"oracle.jrf.system.filter",
83+
"oracle.jsp.next%%",
84+
"oracle.pwdgen%%",
85+
"oracle.sdp.client%%",
86+
"oracle.sdp.messaging%%",
87+
"oracle.webcenter.composer%%",
88+
"oracle.webcenter.skin%%",
89+
"oracle.wsm.console%%",
90+
"oracle.wsm.idmrest%%",
91+
"oracle.wsm.seedpolicies%%",
92+
"orai18n-adf%%",
93+
"owasp.esapi%%",
94+
"UIX%%"
95+
],
96+
"shutdown-classes": [
97+
"DMSShutdown"
98+
],
99+
"startup-classes": [
100+
"WSM Startup Class",
101+
"Web Services Startup Class",
102+
"JRF Startup Class",
103+
"ODL-Startup",
104+
"DMS-Startup",
105+
"AWT Application Context Startup Class"
106+
],
107+
"wldf": [
108+
"Module-FMWDFW"
109+
]
23110
}
24111
}

0 commit comments

Comments
 (0)