Skip to content

Commit 9e81226

Browse files
Merge pull request #1020 from oracle/WDT-582-soa-online-versus-offline
Wdt 582 soa online versus offline
2 parents 1305bec + c696454 commit 9e81226

File tree

11 files changed

+36
-24
lines changed

11 files changed

+36
-24
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,7 @@
294294
UNIFORM_DISTRIBUTED_QUEUE = 'UniformDistributedQueue'
295295
UNIFORM_DISTRIBUTED_TOPIC = 'UniformDistributedTopic'
296296
UNIX_MACHINE = 'UnixMachine'
297+
UNIX_MACHINE_ATTRIBUTE = 'PostBindGID'
297298
UPDATE_MODE = 'UpdateMode'
298299
USER = 'User'
299300
VIRTUAL_TARGET = 'VirtualTarget'

core/src/main/python/wlsdeploy/tool/discover/topology_discoverer.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
from wlsdeploy.aliases.location_context import LocationContext
1717
from wlsdeploy.aliases.model_constants import MODEL_LIST_DELIMITER
1818
from wlsdeploy.aliases.model_constants import KSS_KEYSTORE_FILE_INDICATOR
19+
from wlsdeploy.aliases.model_constants import UNIX_MACHINE_ATTRIBUTE
1920
from wlsdeploy.aliases.validation_codes import ValidationCodes
2021
from wlsdeploy.aliases.wlst_modes import WlstModes
2122
from wlsdeploy.exception import exception_helper
@@ -224,15 +225,22 @@ def get_unix_machines(self):
224225
_logger.entering(class_name=_class_name, method_name=_method_name)
225226
result = OrderedDict()
226227
model_top_folder_name = model_constants.UNIX_MACHINE
228+
unix_location = LocationContext(self._base_location)
227229
location = LocationContext(self._base_location)
228230
location.append_location(model_top_folder_name)
229231
machines = self._find_names_in_folder(location)
230232
if machines is not None:
231233
_logger.info('WLSDPLY-06609', len(machines), class_name=_class_name, method_name=_method_name)
232234
name_token = self._aliases.get_name_token(location)
233235
for machine in machines:
234-
_logger.info('WLSDPLY-06610', machine, class_name=_class_name, method_name=_method_name)
235236
location.add_name_token(name_token, machine)
237+
wlst_path = self._aliases.get_wlst_attributes_path(location)
238+
self.wlst_cd(wlst_path, location)
239+
wlst_lsa_params = self._get_attributes_for_current_location(location)
240+
if not UNIX_MACHINE_ATTRIBUTE in wlst_lsa_params:
241+
location.remove_name_token(name_token)
242+
continue
243+
_logger.info('WLSDPLY-06610', machine, class_name=_class_name, method_name=_method_name)
236244
result[machine] = OrderedDict()
237245
self._populate_model_parameters(result[machine], location)
238246
self._discover_subfolders(result[machine], location)

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

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
Copyright (c) 2020, 2021, Oracle and/or its affiliates.
2+
Copyright (c) 2020, 2022, Oracle and/or its affiliates.
33
Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
44
"""
55

@@ -118,9 +118,12 @@ def check_and_tokenize(self, model_dict, attribute, location):
118118
is_string = isinstance(value, str)
119119

120120
# for discover, value is a string at this point
121+
split_value = ';'
122+
if self._model_context.is_wlst_online():
123+
split_value = ','
121124
if is_string:
122125
model_dict[attribute] = OrderedDict()
123-
split = value.split(';')
126+
split = value.split(split_value)
124127
for assign in split:
125128
halves = assign.split('=')
126129
model_dict[attribute][halves[0]] = halves[1]
@@ -133,7 +136,7 @@ def check_and_tokenize(self, model_dict, attribute, location):
133136
assigns = []
134137
for key in properties:
135138
assigns.append('%s=%s' % (key, properties[key]))
136-
model_dict[attribute] = ';'.join(assigns)
139+
model_dict[attribute] = split_value.join(assigns)
137140

138141
def get_variable_name(self, attribute_location, attribute, suffix=None):
139142
"""

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,10 +181,10 @@
181181
"ClusterMessagingMode": [ {"version": "[10,12.1.1)", "wlst_mode": "both", "wlst_name": "ClusterMessagingMode", "wlst_path": "WP001", "value": {"default": "${unicast:multicast}" }, "wlst_type": "string" } ,
182182
{"version": "[12.1.1,)", "wlst_mode": "both", "wlst_name": "ClusterMessagingMode", "wlst_path": "WP001", "value": {"default": "unicast" }, "wlst_type": "string" } ],
183183
"ClusterType": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "ClusterType", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "string", "restart_required": "true" } ],
184-
"CoherenceClusterSystemResource": [ {"version": "[12.1.2,)", "wlst_mode": "both", "wlst_name": "CoherenceClusterSystemResource", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "string", "set_method": "${:MBEAN.set_coherence_cluster_mbean}", "set_mbean_type": "${:weblogic.management.configuration.CoherenceClusterSystemResourceMBean}", "restart_required": "true" } ],
184+
"CoherenceClusterSystemResource": [ {"version": "[12.1.2,)", "wlst_mode": "both", "wlst_name": "CoherenceClusterSystemResource", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "string", "get_method": "${LSA:GET}","set_method": "${:MBEAN.set_coherence_cluster_mbean}", "set_mbean_type": "${:weblogic.management.configuration.CoherenceClusterSystemResourceMBean}", "restart_required": "true" } ],
185185
"ConcurrentSingletonActivationEnabled": [ {"version": "[12.2.1.3,)", "wlst_mode": "both", "wlst_name": "ConcurrentSingletonActivationEnabled", "wlst_path": "WP001", "value": {"default": "false" }, "wlst_type": "boolean", "restart_required": "true" } ],
186186
"ConsensusParticipants": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "ConsensusParticipants", "wlst_path": "WP001", "value": {"default": 0 }, "wlst_type": "integer", "get_method": "GET" } ],
187-
"DataSourceForAutomaticMigration": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "DataSourceForAutomaticMigration", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "string", "get_method": "${LSA:GET}", "set_method": "MBEAN.set_data_source_mbean", "set_mbean_type": "weblogic.management.configuration.JDBCSystemResourceMBean", "restart_required": "true" } ],
187+
"DataSourceForAutomaticMigration": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "DataSourceForAutomaticMigration", "wlst_path": "WP001", "value": {"default": "defaultCoherenceCluster" }, "wlst_type": "string", "get_method": "${LSA:GET}", "set_method": "MBEAN.set_data_source_mbean", "set_mbean_type": "weblogic.management.configuration.JDBCSystemResourceMBean", "restart_required": "true" } ],
188188
"DataSourceForJobScheduler": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "DataSourceForJobScheduler", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "string", "set_method": "${:MBEAN.set_data_source_mbean}", "set_mbean_type": "${:weblogic.management.configuration.JDBCSystemResourceMBean}" } ],
189189
"DataSourceForSessionPersistence": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "DataSourceForSessionPersistence", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "string", "set_method": "${:MBEAN.set_data_source_mbean}", "set_mbean_type": "${:weblogic.management.configuration.JDBCSystemResourceMBean}", "restart_required": "true" } ],
190190
"DatabaseLeasingBasisConnectionRetryCount": [ {"version": "[12.1.3,)", "wlst_mode": "both", "wlst_name": "DatabaseLeasingBasisConnectionRetryCount", "wlst_path": "WP001", "value": {"default": 1 }, "wlst_type": "integer", "get_method": "GET", "restart_required": "true" } ],

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"ListenAddress": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "ListenAddress", "wlst_path": "WP001", "value": {"default": "localhost" }, "wlst_type": "string" } ],
2323
"ListenPort": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "ListenPort", "wlst_path": "WP001", "value": {"default": 5556 }, "wlst_type": "integer" } ],
2424
"NMSocketCreateTimeoutInMillis": [ {"version": "[12.2.1.2,)", "wlst_mode": "both", "wlst_name": "NMSocketCreateTimeoutInMillis", "wlst_path": "WP001", "value": {"default": 180000 }, "wlst_type": "integer" } ],
25-
"NMType": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "NMType", "wlst_path": "WP001", "value": {"default": "${None:SSL}" }, "wlst_type": "string" } ],
25+
"NMType": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "NMType", "wlst_path": "WP001", "value": {"default": "SSL" }, "wlst_type": "string" } ],
2626
"NodeManagerHome": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "NodeManagerHome", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "string", "uses_path_tokens": "true"} ],
2727
"Notes": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "Notes", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "string" } ],
2828
"PasswordEncrypted": [ {"version": "[10.3.4,)", "wlst_mode": "both", "wlst_name": "PasswordEncrypted", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "password", "get_method": "GET"} ],

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
"JNDIName": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "JNDIName", "wlst_path": "WP001", "value": {"default": "None"}, "wlst_type": "string" } ],
1111
"Notes": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "Notes", "wlst_path": "WP001", "value": {"default": "None"}, "wlst_type": "string" } ],
1212
"SessionPasswordEncrypted": [ {"version": "[12.1.3,)", "wlst_mode": "both", "wlst_name": "SessionPasswordEncrypted", "wlst_path": "WP001", "value": {"default": "None"}, "wlst_type": "password", "get_method": "GET"} ],
13-
"Properties": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "Properties", "wlst_path": "WP001", "value": {"default": "None"}, "wlst_type": "properties", "wlst_read_type": "delimited_string[semicolon]", "get_method": "${LSA:GET}" } ],
13+
"Properties": [ {"version": "[10,)", "wlst_mode": "offline", "wlst_name": "Properties", "wlst_path": "WP001", "value": {"default": "None"}, "wlst_type": "properties", "wlst_read_type": "delimited_string[semicolon]", "get_method": "LSA" } ,
14+
{"version": "[10,)", "wlst_mode": "online", "wlst_name": "Properties", "wlst_path": "WP001", "value": {"default": "None"}, "wlst_type": "properties", "wlst_read_type": "delimited_string", "get_method": "LSA" } ],
1415
"Target": [ {"version": "[10,)", "wlst_mode": "offline", "wlst_name": "Target", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "delimited_string", "set_method": "MBEAN.set_target_mbeans" },
1516
{"version": "[10,)", "wlst_mode": "online", "wlst_name": "Targets", "wlst_path": "WP002", "value": {"default": "None" }, "wlst_type": "jarray", "get_method": "GET", "preferred_model_type": "delimited_string", "set_method": "MBEAN.set_target_mbeans", "set_mbean_type": "weblogic.management.configuration.TargetMBean"} ],
1617
"SessionUsername": [ {"version": "[12.1.3,)", "wlst_mode": "both", "wlst_name": "SessionUsername", "wlst_path": "WP001", "value": {"default": "None"}, "wlst_type": "credential" } ]

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@
99
"attributes": {
1010
"AdditionalMigrationAttempts": [ {"version": "[12.1.3,)", "wlst_mode": "both", "wlst_name": "AdditionalMigrationAttempts", "wlst_path": "WP001", "value": {"default": 2 }, "wlst_type": "integer" } ],
1111
"AllCandidateServers": [ {"version": "[12.1.3,)", "wlst_mode": "online", "wlst_name": "AllCandidateServers", "wlst_path": "WP001", "value": {"default": [] }, "wlst_type": "jarray", "preferred_model_type": "delimited_string", "get_method": "GET", "set_method": "MBEAN.set_server_mbeans", "set_mbean_type": "weblogic.management.configuration.ServerMBean"} ],
12-
"Cluster": [ {"version": "[12.1.3,)", "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" } ],
13-
"ConstrainedCandidateServer": [ {"version": "[12.1.3,)", "wlst_mode": "offline", "wlst_name": "ConstrainedCandidateServer", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "delimited_string", "get_method": "LSA"},
12+
"Cluster": [ {"version": "[12.1.3,)", "wlst_mode": "both", "wlst_name": "Cluster", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "string", "get_method": "${LSA:GET}", "set_method": "MBEAN.set_cluster_mbean", "set_mbean_type": "weblogic.management.configuration.ClusterMBean" } ],
13+
"ConstrainedCandidateServer": [ {"version": "[12.1.3,)", "wlst_mode": "offline", "wlst_name": "ConstrainedCandidateServer", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "delimited_string", "get_method": "${LSA:GET}"},
1414
{"version": "[12.1.3,)", "wlst_mode": "online", "wlst_name": "ConstrainedCandidateServers", "wlst_path": "WP002", "value": {"default": "None" }, "wlst_type": "jarray", "preferred_model_type": "list", "get_method": "GET", "set_method": "MBEAN.set_server_mbeans", "set_mbean_type": "weblogic.management.configuration.ServerMBean" } ],
1515
"Critical": [ {"version": "[12.1.3,12.2.1)", "wlst_mode": "online","wlst_name": "Critical", "wlst_path": "WP001", "value": {"default": "false" }, "wlst_type": "boolean" } ,
1616
{"version": "[12.2.1,)", "wlst_mode": "both", "wlst_name": "Critical", "wlst_path": "WP001", "value": {"default": "false" }, "wlst_type": "boolean" } ],
1717
"DestinationServer": [ {"version": "[12.1.3,)", "wlst_mode": "offline", "wlst_name": "DestinationServer", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "string", "get_method": "LSA"} ],
1818
"HostingServer": [ {"version": "[12.1.3,)", "wlst_mode": "offline", "wlst_name": "HostingServer", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "string", "get_method": "LSA" } ,
1919
{"version": "[12.1.3,)", "wlst_mode": "online", "wlst_name": "HostingServer", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "string", "access": "RO", "get_method": "GET", "set_method": "MBEAN.set_server_mbean", "set_mbean_type": "weblogic.management.configuration.ServerMBean" } ],
20-
"MigrationPolicy": [ {"version": "[12.1.3,)", "wlst_mode": "both", "wlst_name": "MigrationPolicy", "wlst_path": "WP001", "value": {"default": "${None:manual}" }, "wlst_type": "string" } ],
20+
"MigrationPolicy": [ {"version": "[12.1.3,)", "wlst_mode": "both", "wlst_name": "MigrationPolicy", "wlst_path": "WP001", "value": {"default": "manual" }, "wlst_type": "string" } ],
2121
"MillisToSleepBetweenAttempts": [ {"version": "[12.1.3,)", "wlst_mode": "both", "wlst_name": "MillisToSleepBetweenAttempts", "wlst_path": "WP001", "value": {"default": 300000 }, "wlst_type": "integer" } ],
2222
"NonLocalPostAllowed": [ {"version": "[12.1.3,)", "wlst_mode": "both", "wlst_name": "NonLocalPostAllowed", "wlst_path": "WP001", "value": {"default": "false" }, "wlst_type": "boolean" } ],
2323
"Notes": [ {"version": "[12.1.3,)", "wlst_mode": "both", "wlst_name": "Notes", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "string" } ],
@@ -27,7 +27,7 @@
2727
"PreScript": [ {"version": "[12.1.3,)", "wlst_mode": "both", "wlst_name": "PreScript", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "string" } ],
2828
"RestartOnFailure": [ {"version": "[12.1.3,)", "wlst_mode": "both", "wlst_name": "RestartOnFailure", "wlst_path": "WP001", "value": {"default": "false" }, "wlst_type": "boolean" } ],
2929
"SecondsBetweenRestarts": [ {"version": "[12.1.3,)", "wlst_mode": "both", "wlst_name": "SecondsBetweenRestarts", "wlst_path": "WP001", "value": {"default": 30 }, "wlst_type": "integer" } ],
30-
"UserPreferredServer": [ {"version": "[12.1.3,)", "wlst_mode": "both", "wlst_name": "UserPreferredServer", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "string", "get_method": "LSA", "set_method": "MBEAN.set_server_mbean", "set_mbean_type": "weblogic.management.configuration.ServerMBean" } ]
30+
"UserPreferredServer": [ {"version": "[12.1.3,)", "wlst_mode": "both", "wlst_name": "UserPreferredServer", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "string", "get_method": "${LSA:GET}", "set_method": "MBEAN.set_server_mbean", "set_mbean_type": "weblogic.management.configuration.ServerMBean" } ]
3131
},
3232
"wlst_attributes_path": "WP001",
3333
"wlst_paths": {

0 commit comments

Comments
 (0)