Skip to content

Commit fa7e664

Browse files
committed
Parse administration port from introspector
1 parent 21733ff commit fa7e664

File tree

3 files changed

+22
-1
lines changed

3 files changed

+22
-1
lines changed

operator/src/main/java/oracle/kubernetes/operator/wlsconfig/WlsServerConfig.java

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ public class WlsServerConfig {
2020
Integer sslListenPort;
2121
boolean sslPortEnabled;
2222
String machineName;
23+
Integer adminPort;
24+
boolean adminPortEnabled;
2325
List<NetworkAccessPoint> networkAccessPoints;
2426

2527
public WlsServerConfig() {}
@@ -97,6 +99,20 @@ public void setClusterName(String clusterName) {
9799
this.clusterName = clusterName;
98100
}
99101

102+
public Integer getAdminPort() {
103+
return adminPort;
104+
}
105+
106+
public void setAdminPort(Integer adminPort) {
107+
this.adminPort = adminPort;
108+
}
109+
public boolean isAdminPortEnabled() {
110+
return adminPortEnabled;
111+
}
112+
113+
public void setAdminPortEnabled(boolean adminPortEnabled) {
114+
this.adminPortEnabled = adminPortEnabled;
115+
}
100116
/**
101117
* Creates a WLSServerConfig object using an "servers" or "serverTemplates" item parsed from JSON
102118
* result from WLS REST call

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,7 @@ def addNonClusteredServer(self, server):
571571
self.writeln(" listenPort: " + str(server.getListenPort()))
572572
self.writeln(" listenAddress: " + self.quote(self.env.toDNS1123Legal(self.env.getDomainUID() + "-" + server.getName())))
573573
self.writeln(" adminPort: " + str(server.getAdministrationPort()))
574-
self.writeln(" adminPortEnabled: " + str(server.isAdministrationPortEnabled()))
574+
self.writeln(" adminPortEnabled: " + self.booleanToString(server.isAdministrationPortEnabled()))
575575
self.addSSL(server)
576576
self.addNetworkAccessPoints(server)
577577

operator/src/test/java/oracle/kubernetes/operator/helpers/ConfigMapHelperTest.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -384,6 +384,8 @@ public boolean containsAll(V1ConfigMap actual, V1ConfigMap expected) {
384384
+ " - name: \"admin-server\"\n"
385385
+ " listenPort: 7001\n"
386386
+ " listenAddress: \"domain1-admin-server\"\n"
387+
+ " adminPort: 7099\n"
388+
+ " adminPortEnabled: true\n"
387389
+ " - name: \"server1\"\n"
388390
+ " listenPort: 9003\n"
389391
+ " listenAddress: \"domain1-managed-server1\"\n"
@@ -500,6 +502,9 @@ public void parseDomainTopologyYaml() {
500502
assertTrue(serverConfigMap.containsKey("admin-server"));
501503
assertTrue(serverConfigMap.containsKey("server1"));
502504
assertTrue(serverConfigMap.containsKey("server2"));
505+
WlsServerConfig adminServerConfig = serverConfigMap.get("admin-server");
506+
assertEquals(7099, adminServerConfig.getAdminPort().intValue());
507+
assertTrue(adminServerConfig.isAdminPortEnabled());
503508

504509
WlsServerConfig server2Config = serverConfigMap.get("server2");
505510
assertEquals("domain1-managed-server2", server2Config.getListenAddress());

0 commit comments

Comments
 (0)