final Deployment actualDeployment = deployment.toBuilder().setDeployerUser(username).build(); model.deployJob(host, actualDeployment, token); return new JobDeployResponse(JobDeployResponse.Status.OK, host, jobId);
@Override protected int runWithJob(final Namespace options, final HeliosClient client, final PrintStream out, final boolean json, final Job job, final BufferedReader stdin) throws ExecutionException, InterruptedException, IOException { final JobId jobId = job.getId(); final List<String> hosts = options.getList(hostsArg.getDest()); final Deployment deployment = new Deployment.Builder() .setGoal(Goal.STOP) .setJobId(jobId) .build(); if (!json) { out.printf("Stopping %s on %s%n", jobId, hosts); } return Utils.setGoalOnHosts(client, out, json, hosts, deployment, options.getString(tokenArg.getDest())); } }
@Override protected int runWithJob(final Namespace options, final HeliosClient client, final PrintStream out, final boolean json, final Job job, final BufferedReader stdin) throws ExecutionException, InterruptedException, IOException { final JobId jobId = job.getId(); final List<String> hosts = options.getList(hostsArg.getDest()); final Deployment deployment = new Deployment.Builder() .setGoal(Goal.START) .setJobId(jobId) .build(); if (!json) { out.printf("Starting %s on %s%n", jobId, hosts); } return Utils.setGoalOnHosts(client, out, json, hosts, deployment, options.getString(tokenArg.getDest())); } }
.setGoal(Goal.STOP) .setJobId(jobId) .build();
.setGoal(Goal.START) .setJobId(jobId) .build();
final Deployment actualDeployment = deployment.toBuilder().setDeployerUser(username).build(); model.deployJob(host, actualDeployment, token); return new JobDeployResponse(JobDeployResponse.Status.OK, host, jobId);
public static Deployment of(final JobId jobId, final Goal goal, final String deployerUser) { return newBuilder() .setJobId(jobId) .setGoal(goal) .setDeployerUser(deployerUser) .build(); }
public static Deployment of(final JobId jobId, final Goal goal) { return newBuilder() .setJobId(jobId) .setGoal(goal) .build(); }
public static Deployment of(final JobId jobId, final Goal goal, final String deployerUser, final String deployerMaster, final String deploymentGroupName) { return newBuilder() .setJobId(jobId) .setGoal(goal) .setDeployerUser(deployerUser) .setDeployerMaster(deployerMaster) .setDeploymentGroupName(deploymentGroupName) .build(); }