@Override public String getNodeName() { return getName(); }
@Override public String getNodeName() { return getName(); }
private AbstractCanaryServiceIntegration getServiceIntegration(String deploymentName, String serviceIntegrationName) { Canary canary = canaryService.getCanary(deploymentName); return canary.getServiceIntegrations() .stream() .filter(s -> s.getName().equals(serviceIntegrationName)) .findFirst() .orElseThrow(() -> new IllegalArgumentException("Canary service integration " + serviceIntegrationName + " not found.")); }
private AbstractCanaryServiceIntegration getServiceIntegration(String deploymentName, String serviceIntegrationName) { Canary canary = canaryService.getCanary(deploymentName); return canary.getServiceIntegrations() .stream() .filter(s -> s.getName().equals(serviceIntegrationName)) .findFirst() .orElseThrow(() -> new IllegalArgumentException("Canary service integration " + serviceIntegrationName + " not found.")); }
public static AbstractCanaryServiceIntegration getServiceIntegrationByName(Canary canary, String currentDeployment, String serviceIntegrationName, boolean noValidate) { if (canary == null) { canary = new OperationHandler<Canary>() .setFailureMesssage("Failed to get canary.") .setOperation(Daemon.getCanary(currentDeployment, !noValidate)) .get(); } return canary.getServiceIntegrations() .stream() .filter(s -> s.getName().equals(serviceIntegrationName.toLowerCase())) .findFirst() .orElseThrow(() -> new IllegalArgumentException("Canary service integration " + serviceIntegrationName + " not found.")); } }
public static AbstractCanaryServiceIntegration getServiceIntegrationByName(Canary canary, String currentDeployment, String serviceIntegrationName, boolean noValidate) { if (canary == null) { canary = new OperationHandler<Canary>() .setFailureMesssage("Failed to get canary.") .setOperation(Daemon.getCanary(currentDeployment, !noValidate)) .get(); } return canary.getServiceIntegrations() .stream() .filter(s -> s.getName().equals(serviceIntegrationName.toLowerCase())) .findFirst() .orElseThrow(() -> new IllegalArgumentException("Canary service integration " + serviceIntegrationName + " not found.")); } }