@Test public void testDeploymentGroupStatusJson() throws Exception { final List<DeploymentGroupStatusResponse.HostStatus> hostStatuses = Lists.newArrayList(); hostStatuses.add(new DeploymentGroupStatusResponse.HostStatus( "host1", JOB_ID, TaskStatus.State.RUNNING)); hostStatuses.add(new DeploymentGroupStatusResponse.HostStatus( "host2", JOB_ID, TaskStatus.State.RUNNING)); hostStatuses.add(new DeploymentGroupStatusResponse.HostStatus( "host3", JOB_ID, TaskStatus.State.PULLING_IMAGE)); final DeploymentGroupStatusResponse status = new DeploymentGroupStatusResponse( DEPLOYMENT_GROUP, DeploymentGroupStatusResponse.Status.ROLLING_OUT, null, hostStatuses, null); when(client.deploymentGroupStatus(GROUP_NAME)).thenReturn(Futures.immediateFuture(status)); when(options.getString("name")).thenReturn(GROUP_NAME); final int ret = command.run(options, client, out, true, null); assertEquals(0, ret); final DeploymentGroupStatusResponse output = Json.read( baos.toString(), DeploymentGroupStatusResponse.class); assertEquals(status, output); }
@Override int run(final Namespace options, final HeliosClient client, final PrintStream out, final boolean json, final BufferedReader stdin) throws ExecutionException, InterruptedException { final String name = options.getString(nameArg.getDest()); final boolean full = options.getBoolean(fullArg.getDest()); return run0(client, out, json, name, full); }
DeploymentGroupStatusCommand extends ControlCommand { @Override int run(final Namespace options, final HeliosClient client, final PrintStream out, final boolean json, final BufferedReader stdin) throws ExecutionException, InterruptedException { final String name = options.getString(nameArg.getDest()); final boolean full = options.getBoolean(fullArg.getDest()); return run0(client, out, json, name, full); } }
DeploymentGroupStatusCommand extends ControlCommand { @Override int run(final Namespace options, final HeliosClient client, final PrintStream out, final boolean json, final BufferedReader stdin) throws ExecutionException, InterruptedException { final String name = options.getString(nameArg.getDest()); final boolean full = options.getBoolean(fullArg.getDest()); return run0(client, out, json, name, full); } DeploymentGroupStatusCommand(final Subparser parser); }
DeploymentGroupStatusCommand extends ControlCommand { @Override int run(final Namespace options, final HeliosClient client, final PrintStream out, final boolean json, final BufferedReader stdin) throws ExecutionException, InterruptedException { final String name = options.getString(nameArg.getDest()); final boolean full = options.getBoolean(fullArg.getDest()); return run0(client, out, json, name, full); } DeploymentGroupStatusCommand(final Subparser parser);  }
DeploymentGroupStatusCommand extends ControlCommand { @Override int run(final Namespace options, final HeliosClient client, final PrintStream out, final boolean json, final BufferedReader stdin) throws ExecutionException, InterruptedException { final String name = options.getString(nameArg.getDest()); final boolean full = options.getBoolean(fullArg.getDest()); return run0(client, out, json, name, full); } DeploymentGroupStatusCommand(final Subparser parser);   }