Skip to content

Commit ec58713

Browse files
authored
Merge pull request #521 from oracle/domain-introspector-OWLS-69881
OLWS 69881
2 parents a772d45 + 58992e2 commit ec58713

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed

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

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -649,6 +649,20 @@ def customizeServer(self, server):
649649
self.indent()
650650
self.writeln("<d:name>" + name + "</d:name>")
651651
self.writeln("<d:listen-address f:combine-mode=\"replace\">" + listen_address + "</d:listen-address>")
652+
if server.getSSL():
653+
self.writeln("<d:ssl>")
654+
self.indent()
655+
self.writeln("<d:listen-address f:combine-mode=\"replace\">" + listen_address + "</d:listen-address>")
656+
self.undent()
657+
self.writeln("</d:ssl>")
658+
for nap in server.getNetworkAccessPoints():
659+
nap_name=nap.getName()
660+
self.writeln("<d:network-access-point>")
661+
self.indent()
662+
self.writeln("<d:name f:combine-mode=\"replace\">" + nap_name + "</d:name>")
663+
self.writeln("<d:listen-address f:combine-mode=\"replace\">" + listen_address + "</d:listen-address>")
664+
self.undent()
665+
self.writeln("</d:network-access-point>")
652666
self.customizeLog(name)
653667
self.undent()
654668
self.writeln("</d:server>")

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

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
import oracle.kubernetes.operator.KubernetesConstants;
4141
import oracle.kubernetes.operator.LabelConstants;
4242
import oracle.kubernetes.operator.VersionConstants;
43+
import oracle.kubernetes.operator.wlsconfig.NetworkAccessPoint;
4344
import oracle.kubernetes.operator.wlsconfig.WlsClusterConfig;
4445
import oracle.kubernetes.operator.wlsconfig.WlsDomainConfig;
4546
import oracle.kubernetes.operator.wlsconfig.WlsDynamicServersConfig;
@@ -493,6 +494,22 @@ public void parseDomainTopologyYaml() {
493494
assertEquals(3, serverConfigMap.size());
494495

495496
assertTrue(serverConfigMap.containsKey("admin-server"));
497+
assertTrue(serverConfigMap.containsKey("server1"));
498+
assertTrue(serverConfigMap.containsKey("server2"));
499+
500+
WlsServerConfig server2Config = serverConfigMap.get("server2");
501+
assertEquals("domain1-managed-server2", server2Config.getListenAddress());
502+
assertEquals(9004, server2Config.getListenPort().intValue());
503+
assertEquals(8004, server2Config.getSslListenPort().intValue());
504+
assertFalse(server2Config.isSslPortEnabled());
505+
List<NetworkAccessPoint> server2ConfigNAPs = server2Config.getNetworkAccessPoints();
506+
assertEquals(1, server2ConfigNAPs.size());
507+
508+
NetworkAccessPoint server2ConfigNAP = server2ConfigNAPs.get(0);
509+
assertEquals("nap2", server2ConfigNAP.getName());
510+
assertEquals("t3", server2ConfigNAP.getProtocol());
511+
assertEquals(8005, server2ConfigNAP.getListenPort().intValue());
512+
assertEquals(8005, server2ConfigNAP.getPublicPort().intValue());
496513
}
497514

498515
@Test

0 commit comments

Comments
 (0)