Skip to content

Commit 904832b

Browse files
committed
Cherry-pick 'introspector-fix-cie-securemode' into 'release/4.1'
1 parent 291d1b1 commit 904832b

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

operator/src/main/resources/scripts/introspectDomain.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ def getDynamicServersOrNone(self,cluster):
284284
ret = cmo
285285
except:
286286
trace("Ignoring cd() exception for cluster '" + cluster.getName() + "' in getDynamicServerOrNone() and returning None.")
287-
return ret;
287+
return ret
288288

289289
def addGeneratedFile(self, filePath):
290290
self.generatedFiles.append(filePath)
@@ -2046,10 +2046,13 @@ def isSecureModeEnabledForDomain(domain):
20462046
cd('/SecurityConfiguration/' + domain.getName())
20472047
childs = ls(returnType='c', returnMap='true')
20482048
if 'SecureMode' in childs:
2049-
cd('SecureMode/NO_NAME_0')
2050-
attributes = ls(returnType='a', returnMap='true')
2051-
if attributes['SecureModeEnabled']:
2052-
secureModeEnabled = True
2049+
cd('SecureMode')
2050+
child_objs = ls(returnMap='true', returnType='c')
2051+
if not child_objs.isEmpty():
2052+
cd(child_objs[0])
2053+
attributes = ls(returnType='a', returnMap='true')
2054+
if attributes['SecureModeEnabled']:
2055+
secureModeEnabled = True
20532056
else:
20542057
secureModeEnabled = domain.isProductionModeEnabled() and not LegalHelper.versionEarlierThan(domain.getDomainVersion(), "14.1.2.0")
20552058

0 commit comments

Comments
 (0)