@Test(expectedExceptions = InternalException.class) public void testError() throws Throwable { step = new StepEntity(); step.setId("step-1"); command = spy(new SystemPauseBackgroundTasksStepCmd(taskCommand, stepBackend, step)); command.execute(); }
@Override protected void execute() throws ApiFeException, InterruptedException, RpcException { try { logger.info("Pausing APIFE service background tasks..."); DeploymentService.State state = new DeploymentService.State(); state.state = DeploymentState.BACKGROUND_PAUSED; state.documentSelfLink = DeploymentServiceFactory.SELF_LINK + "/" + deploymentId; com.vmware.xenon.common.Operation operation = taskCommand.getApiFeXenonRestClient().patch(state.documentSelfLink, state, EnumSet.of(XenonClient.HeaderOption.HEADER_OPTION_FULL_QUORUM)); logger.info("Paused APIFE service background tasks..."); } catch (DocumentNotFoundException ex) { throw new InternalException(ex); } }
SystemPauseBackgroundTasksStepCmd extends StepCommand { @Override protected void execute() throws ApiFeException, InterruptedException, RpcException { try { logger.info("Pausing APIFE service background tasks..."); DeploymentService.State state = new DeploymentService.State(); state.state = DeploymentState.BACKGROUND_PAUSED; state.documentSelfLink = DeploymentServiceFactory.SELF_LINK + "/" + deploymentId; com.vmware.xenon.common.Operation operation = taskCommand.getApiFeXenonRestClient().patch(state.documentSelfLink, state, EnumSet.of(XenonClient.HeaderOption.HEADER_OPTION_FULL_QUORUM)); logger.info("Paused APIFE service background tasks..."); } catch (DocumentNotFoundException ex) { throw new InternalException(ex); } } }
SystemPauseBackgroundTasksStepCmd extends StepCommand { @Override protected void execute() throws ApiFeException, InterruptedException, RpcException { try { logger.info("Pausing APIFE service background tasks..."); DeploymentService.State state = new DeploymentService.State(); state.state = DeploymentState.BACKGROUND_PAUSED; state.documentSelfLink = DeploymentServiceFactory.SELF_LINK + "/" + deploymentId; com.vmware.xenon.common.Operation operation = taskCommand.getApiFeXenonRestClient().patch(state.documentSelfLink, state, EnumSet.of(XenonClient.HeaderOption.HEADER_OPTION_FULL_QUORUM)); logger.info("Paused APIFE service background tasks..."); } catch (DocumentNotFoundException ex) { throw new InternalException(ex); } } SystemPauseBackgroundTasksStepCmd(TaskCommand taskCommand,
                                           StepBackend stepBackend,
                                           StepEntity step); }
SystemPauseBackgroundTasksStepCmd extends StepCommand { @Override protected void execute() throws ApiFeException, InterruptedException, RpcException { try { logger.info("Pausing APIFE service background tasks..."); DeploymentService.State state = new DeploymentService.State(); state.state = DeploymentState.BACKGROUND_PAUSED; state.documentSelfLink = DeploymentServiceFactory.SELF_LINK + "/" + deploymentId; com.vmware.xenon.common.Operation operation = taskCommand.getApiFeXenonRestClient().patch(state.documentSelfLink, state, EnumSet.of(XenonClient.HeaderOption.HEADER_OPTION_FULL_QUORUM)); logger.info("Paused APIFE service background tasks..."); } catch (DocumentNotFoundException ex) { throw new InternalException(ex); } } SystemPauseBackgroundTasksStepCmd(TaskCommand taskCommand,
                                           StepBackend stepBackend,
                                           StepEntity step);  }
SystemPauseBackgroundTasksStepCmd extends StepCommand { @Override protected void execute() throws ApiFeException, InterruptedException, RpcException { try { logger.info("Pausing APIFE service background tasks..."); DeploymentService.State state = new DeploymentService.State(); state.state = DeploymentState.BACKGROUND_PAUSED; state.documentSelfLink = DeploymentServiceFactory.SELF_LINK + "/" + deploymentId; com.vmware.xenon.common.Operation operation = taskCommand.getApiFeXenonRestClient().patch(state.documentSelfLink, state, EnumSet.of(XenonClient.HeaderOption.HEADER_OPTION_FULL_QUORUM)); logger.info("Paused APIFE service background tasks..."); } catch (DocumentNotFoundException ex) { throw new InternalException(ex); } } SystemPauseBackgroundTasksStepCmd(TaskCommand taskCommand,
                                           StepBackend stepBackend,
                                           StepEntity step);  static final String DEPLOYMENT_ID_RESOURCE_KEY; }