Skip to content

Commit 07cd04d

Browse files
committed
address pull request comments by removing unused codes
1 parent 80d2145 commit 07cd04d

File tree

3 files changed

+1
-52
lines changed

3 files changed

+1
-52
lines changed

operator/src/main/java/oracle/kubernetes/operator/helpers/ServiceHelper.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -99,17 +99,10 @@ public NextAction apply(Packet packet) {
9999
List<V1ServicePort> ports = new ArrayList<>();
100100
V1ServicePort servicePort = new V1ServicePort();
101101
servicePort.setPort(port);
102-
servicePort.setName("weblogic");
103102
if (nodePort != null) {
104103
servicePort.setNodePort(nodePort);
105104
}
106105
ports.add(servicePort);
107-
108-
V1ServicePort nmPort = new V1ServicePort();
109-
nmPort.setPort(5556);
110-
nmPort.setName("node-manager");
111-
ports.add(nmPort);
112-
113106
serviceSpec.setPorts(ports);
114107
service.setSpec(serviceSpec);
115108

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
import java.util.Map;
1717

1818
/**
19-
* Contains a snapsot of configuration for a WebLogic Domain
19+
* Contains a snapshot of configuration for a WebLogic Domain
2020
*/
2121
public class WlsDomainConfig {
2222
private static final LoggingFacade LOGGER = LoggingFactory.getLogger("Operator", "Operator");

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

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -471,50 +471,6 @@ private String executePostUrlWithRetry(final String url, final String payload, f
471471
return jsonResult;
472472
}
473473

474-
/**
475-
* Update the dynamic cluster size of the WLS cluster configuration.
476-
*
477-
* @param wlsClusterConfig The WlsClusterConfig object of the WLS cluster whose cluster size needs to be updated
478-
* @param machineNamePrefix Prefix of names of new machines to be created
479-
* @param targetClusterSize The target dynamic cluster size
480-
* @return true if the request to update the cluster size is successful, false if it was not successful within the
481-
* time period, or the cluster is not a dynamic cluster
482-
*/
483-
public boolean updateDynamicClusterSize(final WlsClusterConfig wlsClusterConfig,
484-
final String machineNamePrefix,
485-
final int targetClusterSize) {
486-
487-
LOGGER.entering();
488-
489-
final long timeout = UPDATE_CONFIG_TIMEOUT_MILLIS;
490-
491-
String clusterName = wlsClusterConfig == null? "null": wlsClusterConfig.getClusterName();
492-
493-
if (wlsClusterConfig == null || !wlsClusterConfig.hasDynamicServers()) {
494-
LOGGER.warning(MessageKeys.WLS_UPDATE_CLUSTER_SIZE_INVALID_CLUSTER, clusterName);
495-
return false;
496-
}
497-
498-
ScheduledExecutorService executorService = ContainerResolver.getInstance().getContainer().getSPI(ScheduledExecutorService.class);
499-
long startTime = System.currentTimeMillis();
500-
Future<Boolean> future = executorService.submit(() -> doUpdateDynamicClusterSize(wlsClusterConfig, machineNamePrefix, targetClusterSize));
501-
boolean result = false;
502-
try {
503-
result = future.get(timeout, TimeUnit.MILLISECONDS);
504-
if (result) {
505-
LOGGER.info(MessageKeys.WLS_CLUSTER_SIZE_UPDATED, clusterName, targetClusterSize, (System.currentTimeMillis() - startTime));
506-
} else {
507-
LOGGER.warning(MessageKeys.WLS_UPDATE_CLUSTER_SIZE_FAILED, clusterName, null);
508-
}
509-
} catch (InterruptedException | ExecutionException e) {
510-
LOGGER.warning(MessageKeys.WLS_UPDATE_CLUSTER_SIZE_FAILED, clusterName, e);
511-
} catch (TimeoutException e) {
512-
LOGGER.warning(MessageKeys.WLS_UPDATE_CLUSTER_SIZE_TIMED_OUT, clusterName, timeout);
513-
}
514-
LOGGER.exiting(result);
515-
return result;
516-
}
517-
518474
/**
519475
* Method called by the Callable that is submitted from the updateDynamicClusterSize method for updating the
520476
* WLS dynamic cluster size configuration.

0 commit comments

Comments
 (0)