@Override public String toString() { return "Staging [command=" + getCommand() + " buildpack=" + getBuildpackUrl() + " stack=" + getStack() + " healthCheckTimeout=" + getHealthCheckTimeout() + " healthCheckType" + getHealthCheckType() + " healthCheckHttpEndpoint=" + getHealthCheckHttpEndpoint() + " sshEnabled=" + isSshEnabled() + "]"; } }
public Staging build() { return new Staging(this); }
@Override public String toString() { return "Staging [command=" + getCommand() + " buildpack=" + getBuildpackUrl() + " stack=" + getStack() + " healthCheckTimeout=" + getHealthCheckTimeout() + "]"; } }
if (staging != null && staging.getBuildpackUrl() != null) { application.put(BUILDPACK_PROP, staging.getBuildpackUrl());
private void addStagingToRequest(Staging staging, HashMap<String, Object> appRequest) { if (staging.getBuildpackUrl() != null) { appRequest.put("buildpack", staging.getBuildpackUrl()); } if (staging.getCommand() != null) { appRequest.put("command", staging.getCommand()); } if (staging.getStack() != null) { appRequest.put("stack_guid", getStack(staging.getStack()).getMeta().getGuid()); } if (staging.getHealthCheckTimeout() != null) { appRequest.put("health_check_timeout", staging.getHealthCheckTimeout()); } }
private boolean hasChanged(Staging staging, Staging existingStaging) { String buildpackUrl = staging.getBuildpackUrl(); String command = staging.getCommand(); String stack = staging.getStack(); Integer healthCheckTimeout = staging.getHealthCheckTimeout(); String healthCheckType = staging.getHealthCheckType(); String healthCheckHttpEndpoint = staging.getHealthCheckHttpEndpoint(); Boolean sshEnabled = staging.isSshEnabled(); return (buildpackUrl != null && !buildpackUrl.equals(existingStaging.getBuildpackUrl())) || (command != null && !command.equals(existingStaging.getCommand())) || (stack != null && !stack.equals(existingStaging.getStack())) || (healthCheckTimeout != null && !healthCheckTimeout.equals(existingStaging.getHealthCheckTimeout())) || (healthCheckType != null && !healthCheckType.equals(existingStaging.getHealthCheckType())) || (healthCheckHttpEndpoint != null && !healthCheckHttpEndpoint.equals(existingStaging.getHealthCheckHttpEndpoint())) || (sshEnabled != null && !sshEnabled.equals(existingStaging.isSshEnabled()) || isDockerInfoModified(existingStaging.getDockerInfo(), staging.getDockerInfo())); }
public CloudApplication(String name, String command, String buildpackUrl, int memory, int instances, List<String> uris, List<String> serviceNames, AppState state) { super(CloudEntity.Meta.defaultMeta(), name); this.staging = new Staging(command, buildpackUrl); this.memory = memory; this.instances = instances; this.uris = uris; this.services = serviceNames; this.state = state; }
private boolean hasChanged(Staging staging, Staging existingStaging) { String buildpackUrl = staging.getBuildpackUrl(); String command = staging.getCommand(); String stack = staging.getStack(); Integer healthCheckTimeout = staging.getHealthCheckTimeout(); String healthCheckType = staging.getHealthCheckType(); String healthCheckHttpEndpoint = staging.getHealthCheckHttpEndpoint(); Boolean sshEnabled = staging.isSshEnabled(); return (buildpackUrl != null && !buildpackUrl.equals(existingStaging.getBuildpackUrl())) || (command != null && !command.equals(existingStaging.getCommand())) || (stack != null && !stack.equals(existingStaging.getStack())) || (healthCheckTimeout != null && !healthCheckTimeout.equals(existingStaging.getHealthCheckTimeout())) || (healthCheckType != null && !healthCheckType.equals(existingStaging.getHealthCheckType())) || (healthCheckHttpEndpoint != null && !healthCheckHttpEndpoint.equals(existingStaging.getHealthCheckHttpEndpoint())) || (sshEnabled != null && !sshEnabled.equals(existingStaging.isSshEnabled()) || isDockerInfoModified(existingStaging.getDockerInfo(), staging.getDockerInfo())); }
public static void deployTunnelApp(CloudFoundryClient client) { ClassPathResource cpr = new ClassPathResource("caldecott_helper.zip"); try { File temp = copyCaldecottZipFile(cpr); client.createApplication(TUNNEL_APP_NAME, new Staging("ruby19", "sinatra"), 64, Arrays.asList(new String[]{getRandomUrl(client, TUNNEL_APP_NAME)}), Arrays.asList(new String[] {}), false); client.uploadApplication(TUNNEL_APP_NAME, temp); client.updateApplicationEnv(TUNNEL_APP_NAME, Collections.singletonMap("CALDECOTT_AUTH", UUID.randomUUID().toString())); client.startApplication(TUNNEL_APP_NAME); temp.delete(); } catch (IOException e) { throw new TunnelException("Unable to deploy the Caldecott server application", e); } }
private Map<String, Object> createStagingParameters(Staging staging) { Map<String, Object> stagingParameters = new HashMap<>(); if (staging.getBuildpackUrl() != null) { stagingParameters.put(BUILDPACK_PARAMETER, staging.getBuildpackUrl()); } if (staging.getCommand() != null) { stagingParameters.put(COMMAND_PARAMETER, staging.getCommand()); } if (staging.getHealthCheckTimeout() != null) { stagingParameters.put(HEALTH_CHECK_TIMEOUT_PARAMETER, staging.getHealthCheckTimeout()); } if (staging.getHealthCheckType() != null) { stagingParameters.put(HEALTH_CHECK_TYPE_PARAMETER, staging.getHealthCheckType()); } if (staging.getHealthCheckHttpEndpoint() != null) { stagingParameters.put(HEALTH_CHECK_HTTP_ENDPOINT_PARAMETER, staging.getHealthCheckHttpEndpoint()); } if (staging.isSshEnabled() != null) { stagingParameters.put(ENABLE_SSH_PARAMETER, staging.isSshEnabled()); } if (staging.getDockerInfo() != null) { stagingParameters.put(DOCKER_IMAGE, staging.getDockerInfo().getImage()); if (staging.getDockerInfo().getDockerCredentials() != null) { stagingParameters.put(DOCKER_CREDENTIALS, staging.getDockerInfo().getDockerCredentials()); } } return stagingParameters; }
setStaging(new Staging(command, buildpackUrl, detectedBuildpack));
private void addStagingToRequest(Staging staging, HashMap<String, Object> appRequest) { if (staging.getBuildpackUrl() != null) { appRequest.put("buildpack", staging.getBuildpackUrl()); if (staging.getCommand() != null) { appRequest.put("command", staging.getCommand()); if (staging.getStack() != null) { appRequest.put("stack_guid", getStack(staging.getStack()).getMeta() .getGuid()); if (staging.getHealthCheckTimeout() != null) { appRequest.put("health_check_timeout", staging.getHealthCheckTimeout()); if (staging.getHealthCheckType() != null) { appRequest.put("health_check_type", staging.getHealthCheckType()); if (staging.getHealthCheckHttpEndpoint() != null) { appRequest.put("health_check_http_endpoint", staging.getHealthCheckHttpEndpoint()); if (staging.isSshEnabled() != null) { appRequest.put("enable_ssh", staging.isSshEnabled()); if (staging.getDockerInfo() != null) { appRequest.put("docker_image", staging.getDockerInfo() .getImage()); if (staging.getDockerInfo() .getDockerCredentials() != null) { appRequest.put("docker_credentials", staging.getDockerInfo() .getDockerCredentials());
private Map<String, Object> getStagingMap(Staging staging) { Map<String, Object> stagingParameters = new HashMap<>(); if (staging.getBuildpackUrl() != null) { stagingParameters.put("buildpack", staging.getBuildpackUrl()); } if (staging.getCommand() != null) { stagingParameters.put("command", staging.getCommand()); } if (staging.getHealthCheckTimeout() != null) { stagingParameters.put("health_check_timeout", staging.getHealthCheckTimeout()); } if (staging.getHealthCheckType() != null) { stagingParameters.put("health_check_type", staging.getHealthCheckType()); } if (staging.getHealthCheckHttpEndpoint() != null) { stagingParameters.put("health_check_http_endpoint", staging.getHealthCheckHttpEndpoint()); } if (staging.isSshEnabled() != null) { stagingParameters.put("enable_ssh", staging.isSshEnabled()); } return stagingParameters; }
CloudStack stack = mapStackResource(stackResource); Integer healthCheckTimeout = getEntityAttribute(resource, "health_check_timeout", Integer.class); Staging staging = new Staging(command, buildpack, stack.getName(), healthCheckTimeout, detectedBuildpack); app.setStaging(staging);
Staging staging = new Staging(null, buildpackurl); workingCopy.setStaging(staging);
staging = new Staging();