@Test public void testMarkAsStarted() throws Exception { TestTaskCommand command = new TestTaskCommand(apiFeXenonRestClient, photonControllerXenonRestClient, hostClient, housekeeperClient, taskBackend, stepCommandFactory, task, deployerClient, deployerXenonClient, housekeeperXenonClient); command.markAsStarted(); TaskEntity found = taskBackend.findById(task.getId()); assertThat(found, is(notNullValue())); assertThat(found.getState(), is(TaskEntity.State.STARTED)); assertThat(found.getEndTime(), is(nullValue())); }
@Override protected void markAsStarted() throws TaskNotFoundException, ConcurrentTaskException { taskBackend.markTaskAsStarted(task); for (BaseEntity toBeLockedEntity : task.getToBeLockedEntities()) { entityLockBackend.setTaskLock(toBeLockedEntity, task); } }
TaskCommand extends BaseCommand { @Override protected void markAsStarted() throws TaskNotFoundException, ConcurrentTaskException { taskBackend.markTaskAsStarted(task); for (BaseEntity toBeLockedEntity : task.getToBeLockedEntities()) { entityLockBackend.setTaskLock(toBeLockedEntity, task); } } }
TaskCommand extends BaseCommand { @Override protected void markAsStarted() throws TaskNotFoundException, ConcurrentTaskException { taskBackend.markTaskAsStarted(task); for (BaseEntity toBeLockedEntity : task.getToBeLockedEntities()) { entityLockBackend.setTaskLock(toBeLockedEntity, task); } } @Inject  TaskCommand(
      ApiFeXenonRestClient xenonClient,
      PhotonControllerXenonRestClient photonControllerXenonRestClient,
      HostClient hostClient,
      HousekeeperClient housekeeperClient,
      DeployerClient deployerClient,
      com.vmware.photon.controller.api.frontend.backends.clients.DeployerClient deployerXenonClient,
      com.vmware.photon.controller.api.frontend.backends.clients.HousekeeperClient housekeeperXenonClient,
      EntityLockBackend entityLockBackend,
      @Assisted TaskEntity task); }
TaskCommand extends BaseCommand { @Override protected void markAsStarted() throws TaskNotFoundException, ConcurrentTaskException { taskBackend.markTaskAsStarted(task); for (BaseEntity toBeLockedEntity : task.getToBeLockedEntities()) { entityLockBackend.setTaskLock(toBeLockedEntity, task); } } @Inject  TaskCommand(
      ApiFeXenonRestClient xenonClient,
      PhotonControllerXenonRestClient photonControllerXenonRestClient,
      HostClient hostClient,
      HousekeeperClient housekeeperClient,
      DeployerClient deployerClient,
      com.vmware.photon.controller.api.frontend.backends.clients.DeployerClient deployerXenonClient,
      com.vmware.photon.controller.api.frontend.backends.clients.HousekeeperClient housekeeperXenonClient,
      EntityLockBackend entityLockBackend,
      @Assisted TaskEntity task); void markAllStepsAsFailed(Throwable t); TaskEntity getTask(); Resource getResource(); void setResource(Resource resource); String getReservation(); void setReservation(String reservation); HostClient getHostClient(); ApiFeXenonRestClient getApiFeXenonRestClient(); PhotonControllerXenonRestClient getPhotonControllerXenonRestClient(); HousekeeperClient getHousekeeperClient(); com.vmware.photon.controller.api.frontend.backends.clients.HousekeeperClient getHousekeeperXenonClient(); DeployerClient getDeployerClient(); com.vmware.photon.controller.api.frontend.backends.clients.DeployerClient getDeployerXenonClient(); HostClient getHostClient(VmEntity vm); HostClient getHostClient(VmEntity vm, boolean useCachedHostInfo); HostClient findHost(BaseDiskEntity disk); String lookupAgentId(String hostIp); }
TaskCommand extends BaseCommand { @Override protected void markAsStarted() throws TaskNotFoundException, ConcurrentTaskException { taskBackend.markTaskAsStarted(task); for (BaseEntity toBeLockedEntity : task.getToBeLockedEntities()) { entityLockBackend.setTaskLock(toBeLockedEntity, task); } } @Inject  TaskCommand(
      ApiFeXenonRestClient xenonClient,
      PhotonControllerXenonRestClient photonControllerXenonRestClient,
      HostClient hostClient,
      HousekeeperClient housekeeperClient,
      DeployerClient deployerClient,
      com.vmware.photon.controller.api.frontend.backends.clients.DeployerClient deployerXenonClient,
      com.vmware.photon.controller.api.frontend.backends.clients.HousekeeperClient housekeeperXenonClient,
      EntityLockBackend entityLockBackend,
      @Assisted TaskEntity task); void markAllStepsAsFailed(Throwable t); TaskEntity getTask(); Resource getResource(); void setResource(Resource resource); String getReservation(); void setReservation(String reservation); HostClient getHostClient(); ApiFeXenonRestClient getApiFeXenonRestClient(); PhotonControllerXenonRestClient getPhotonControllerXenonRestClient(); HousekeeperClient getHousekeeperClient(); com.vmware.photon.controller.api.frontend.backends.clients.HousekeeperClient getHousekeeperXenonClient(); DeployerClient getDeployerClient(); com.vmware.photon.controller.api.frontend.backends.clients.DeployerClient getDeployerXenonClient(); HostClient getHostClient(VmEntity vm); HostClient getHostClient(VmEntity vm, boolean useCachedHostInfo); HostClient findHost(BaseDiskEntity disk); String lookupAgentId(String hostIp);  }