Skip to content

Commit 3db84d5

Browse files
jshum2479rjeberhard
authored andcommitted
Fix admin port and secure mode detection, wlst jython can accept boolean, number and text for values.
1 parent 032b0ee commit 3db84d5

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

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

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
import sys, traceback
5050

5151
from java.lang import System
52+
from java.lang import Boolean
5253

5354
tmp_callerframerecord = inspect.stack()[0] # 0 represents this line # 1 represents line at caller
5455
tmp_info = inspect.getframeinfo(tmp_callerframerecord[0])
@@ -406,7 +407,8 @@ def isAdministrationPortEnabledForServer(server, model):
406407
administrationPortEnabled = server['AdministrationPortEnabled']
407408
else:
408409
administrationPortEnabled = isAdministrationPortEnabledForDomain(model)
409-
return administrationPortEnabled
410+
411+
return Boolean.valueOf(administrationPortEnabled)
410412

411413

412414
def isAdministrationPortEnabledForDomain(model):
@@ -418,7 +420,9 @@ def isAdministrationPortEnabledForDomain(model):
418420
# AdministrationPortEnabled is not explicitly set so going with the default
419421
# Starting with 14.1.2.0, the domain's AdministrationPortEnabled default is derived from the domain's SecureMode
420422
administrationPortEnabled = isSecureModeEnabledForDomain(model)
421-
return administrationPortEnabled
423+
424+
return Boolean.valueOf(administrationPortEnabled)
425+
422426

423427

424428
# Derive the default value for SecureMode of a domain
@@ -438,7 +442,8 @@ def isSecureModeEnabledForDomain(model):
438442
if 'ProductionModeEnabled' in topology:
439443
is_production_mode_enabled = topology['ProductionModeEnabled']
440444
secureModeEnabled = is_production_mode_enabled and not env.wlsVersionEarlierThan("14.1.2.0")
441-
return secureModeEnabled
445+
446+
return Boolean.valueOf(secureModeEnabled)
442447

443448

444449
def getSSLOrNone(server):

0 commit comments

Comments
 (0)