@@ -332,6 +332,7 @@ def validateClusters(self):
332
332
self .validateCluster (cluster )
333
333
334
334
def validateCluster (self , cluster ):
335
+ self .validateClusterServersHaveSameCustomChannels (cluster )
335
336
if self .getDynamicServersWA (cluster ) is None :
336
337
self .validateNonDynamicCluster (cluster )
337
338
else :
@@ -404,6 +405,7 @@ def validateServerCustomChannelName(self):
404
405
405
406
#def validateClusterServersHaveSameCustomChannels():
406
407
408
+
407
409
def isValid (self ):
408
410
return len (self .env .getErrors ()) == 0
409
411
@@ -486,16 +488,18 @@ def getClusteredServers(self, cluster):
486
488
def addClusteredServer (self , cluster , server ):
487
489
name = self .name (server )
488
490
self .writeln ("- name: " + name )
489
- self .writeln (" listenPort: " + str (server .getListenPort ()))
491
+ if server .isListenPortEnabled ():
492
+ self .writeln (" listenPort: " + str (server .getListenPort ()))
490
493
self .writeln (" listenAddress: " + self .quote (self .env .toDNS1123Legal (self .env .getDomainUID () + "-" + server .getName ())))
491
- self .writeln (" adminPort: " + str (server .getAdministrationPort ()))
492
- self .writeln (" adminPortEnabled: " + self .booleanToString (server .isAdministrationPortEnabled ()))
494
+ if server .isAdministrationPortEnabled ():
495
+ self .writeln (" adminPort: " + str (server .getAdministrationPort ()))
496
+ self .writeln (" adminPortEnabled: " + self .booleanToString (server .isAdministrationPortEnabled ()))
493
497
self .addSSL (server )
494
498
self .addNetworkAccessPoints (server )
495
499
496
500
def addSSL (self , server ):
497
501
ssl = server .getSSL ()
498
- if ssl is not None :
502
+ if ssl is not None and ssl . isEnabled () :
499
503
self .indent ()
500
504
self .writeln ("sslListenPort: " + str (ssl .getListenPort ()))
501
505
self .writeln ("sslPortEnabled: " + self .booleanToString (ssl .isEnabled ()))
@@ -514,7 +518,8 @@ def addServerTemplates(self):
514
518
def addServerTemplate (self , serverTemplate ):
515
519
name = self .name (serverTemplate )
516
520
self .writeln ("- name: " + name )
517
- self .writeln (" listenPort: " + str (serverTemplate .getListenPort ()))
521
+ if serverTemplate .isListenPortEnabled ():
522
+ self .writeln (" listenPort: " + str (serverTemplate .getListenPort ()))
518
523
self .writeln (" clusterName: " + self .quote (serverTemplate .getCluster ().getName ()))
519
524
listenAddress = serverTemplate .getListenAddress ()
520
525
if listenAddress is not None :
@@ -568,10 +573,12 @@ def addNonClusteredServers(self):
568
573
def addNonClusteredServer (self , server ):
569
574
name = self .name (server )
570
575
self .writeln ("- name: " + name )
571
- self .writeln (" listenPort: " + str (server .getListenPort ()))
576
+ if server .isListenPortEnabled ():
577
+ self .writeln (" listenPort: " + str (server .getListenPort ()))
572
578
self .writeln (" listenAddress: " + self .quote (self .env .toDNS1123Legal (self .env .getDomainUID () + "-" + server .getName ())))
573
- self .writeln (" adminPort: " + str (server .getAdministrationPort ()))
574
- self .writeln (" adminPortEnabled: " + self .booleanToString (server .isAdministrationPortEnabled ()))
579
+ if server .isAdministrationPortEnabled ():
580
+ self .writeln (" adminPort: " + str (server .getAdministrationPort ()))
581
+ self .writeln (" adminPortEnabled: " + self .booleanToString (server .isAdministrationPortEnabled ()))
575
582
self .addSSL (server )
576
583
self .addNetworkAccessPoints (server )
577
584
0 commit comments