@ShellComponent public class TaskCommands extends Object
Constructor and Description |
---|
TaskCommands() |
Modifier and Type | Method and Description |
---|---|
Availability |
availableWithCreateRole() |
Availability |
availableWithDeployRole() |
Availability |
availableWithDestroyRole() |
Availability |
availableWithUnDeployRole() |
Availability |
availableWithViewRole() |
String |
cleanup(Long id,
boolean all,
boolean includeNonCompleted,
String taskName,
boolean force) |
String |
create(String name,
String dsl,
String description) |
Table |
currentExecutions() |
String |
destroy(String name,
boolean cleanup) |
String |
destroyAll(boolean force) |
Table |
display(long id) |
Table |
executionListByName(String name) |
String |
launch(String name,
String properties,
File propertiesFile,
String arguments,
String platformName) |
Table |
list() |
Table |
listPlatforms() |
String |
retrieveTaskExecutionLog(long id,
String platform) |
String |
stop(String ids,
String platform) |
TablesInfo |
validate(String name) |
@Autowired protected UserInput userInput
public Availability availableWithViewRole()
public Availability availableWithCreateRole()
public Availability availableWithDeployRole()
public Availability availableWithUnDeployRole()
public Availability availableWithDestroyRole()
@ShellMethod(key="task list", value="List created tasks") @ShellMethodAvailability(value="availableWithViewRole") public Table list()
@ShellMethod(key="task platform-list", value="List platform accounts for tasks") @ShellMethodAvailability(value="availableWithViewRole") public Table listPlatforms()
@ShellMethod(key="task validate", value="Validate apps contained in task definitions") public TablesInfo validate(@ShellOption(value={"","--name"},help="the task definition name") String name) throws OperationNotSupportedException
OperationNotSupportedException
@ShellMethod(key="task create", value="Create a new task definition") @ShellMethodAvailability(value="availableWithCreateRole") public String create(@ShellOption(value={"","--name"},help="the name to give to the task") String name, @ShellOption(value="--definition",help="a task definition, using the DSL (e.g. \"timestamp --format=YYYY\")") String dsl, @ShellOption(help="a sort description about the task",defaultValue="") String description)
@ShellMethod(key="task launch", value="Launch a previously created task") @ShellMethodAvailability(value="availableWithDeployRole") public String launch(@ShellOption(value={"","--name"},help="the name of the task to launch") String name, @ShellOption(help="the properties for this launch",defaultValue="__NULL__") String properties, @ShellOption(value="--propertiesFile",help="the properties for this launch (as a File)",defaultValue="__NULL__") File propertiesFile, @ShellOption(help="the commandline arguments for this launch",defaultValue="__NULL__") String arguments, @ShellOption(value="--platformName",help="the platform name to use for this launch",defaultValue="__NULL__") String platformName) throws IOException
IOException
@ShellMethod(key="task execution stop", value="Stop executing tasks") @ShellMethodAvailability(value="availableWithUnDeployRole") public String stop(@ShellOption(value={"","--ids"},help="the task execution id") String ids, @ShellOption(value="--platformName",help="the name of the platform where the task is executing",defaultValue="__NULL__") String platform)
@ShellMethod(key="task execution log", value="Retrieve task execution log") public String retrieveTaskExecutionLog(@ShellOption(value={"","--id"},help="the task execution id") long id, @ShellOption(help="the platform of the task execution",defaultValue="__NULL__") String platform)
@ShellMethod(key="task destroy", value="Destroy an existing task") @ShellMethodAvailability(value="availableWithDestroyRole") public String destroy(@ShellOption(value={"","--name"},help="the name of the task to destroy",valueProvider=TaskNameValueProvider.class) String name, @ShellOption(help="the boolean flag to set if task executions and related resources should NOT also be cleaned up",defaultValue="false") boolean cleanup)
@ShellMethod(key="task all destroy", value="Destroy all existing tasks") @ShellMethodAvailability(value="availableWithDestroyRole") public String destroyAll(@ShellOption(help="bypass confirmation prompt",defaultValue="false") boolean force)
@ShellMethod(key="task execution list", value="List created task executions filtered by taskName") @ShellMethodAvailability(value="availableWithViewRole") public Table executionListByName(@ShellOption(value={"","--name"},help="the task name to be used as a filter",valueProvider=TaskNameValueProvider.class,defaultValue="__NULL__") String name)
@ShellMethod(key="task execution status", value="Display the details of a specific task execution") @ShellMethodAvailability(value="availableWithViewRole") public Table display(@ShellOption(value={"","--id"},help="the task execution id") long id)
@ShellMethod(key="task execution current", value="Display count of currently executin tasks and related information") @ShellMethodAvailability(value="availableWithViewRole") public Table currentExecutions()
@ShellMethod(key="task execution cleanup", value="Clean up any platform specific resources linked to a task execution") @ShellMethodAvailability(value="availableWithDestroyRole") public String cleanup(@ShellOption(value={"","--id"},help="the task execution id",defaultValue="__NULL__") Long id, @ShellOption(help="all task execution IDs",defaultValue="false") boolean all, @ShellOption(help="include non-completed task executions",defaultValue="false") boolean includeNonCompleted, @ShellOption(value="--task-name",help="the name of the task to cleanup",defaultValue="__NULL__") String taskName, @ShellOption(help="bypass confirmation prompt",defaultValue="false") boolean force)
Copyright © 2022 Pivotal Software, Inc.. All rights reserved.