@Component public class TaskCommands extends Object implements org.springframework.shell.core.CommandMarker
Constructor and Description |
---|
TaskCommands() |
Modifier and Type | Method and Description |
---|---|
boolean |
availableWithCreateRole() |
boolean |
availableWithDeployRole() |
boolean |
availableWithDestroyRole() |
boolean |
availableWithUnDeployRole() |
boolean |
availableWithViewRole() |
String |
cleanup(long id) |
String |
create(String name,
String dsl,
String description) |
Table |
currentExecutions() |
String |
destroy(String name) |
String |
destroyAll(boolean force) |
Table |
display(long id) |
Table |
executionListByName(String name) |
String |
launch(String name,
String properties,
File propertiesFile,
String arguments,
String platformName,
String composedTaskRunnerApp) |
Table |
list() |
Table |
listPlatforms() |
String |
retrieveTaskExecutionLog(long id,
String platform) |
String |
stop(String ids,
String platform) |
List<Object> |
validate(String name) |
@Autowired protected UserInput userInput
@CliAvailabilityIndicator(value="task create") public boolean availableWithCreateRole()
@CliAvailabilityIndicator(value="task launch") public boolean availableWithDeployRole()
@CliAvailabilityIndicator(value="task execution stop") public boolean availableWithUnDeployRole()
@CliAvailabilityIndicator(value={"task destroy","task all destroy","task execution cleanup"}) public boolean availableWithDestroyRole()
@CliAvailabilityIndicator(value={"task execution list","task list","task platform-list","task execution current","task execution status","task validate"}) public boolean availableWithViewRole()
@CliCommand(value="task list", help="List created tasks") public Table list()
@CliCommand(value="task platform-list", help="List platform accounts for tasks") public Table listPlatforms()
@CliCommand(value="task validate", help="Validate apps contained in task definitions") public List<Object> validate(@CliOption(key={"","name"},help="the task definition name",mandatory=true) String name) throws OperationNotSupportedException
OperationNotSupportedException
@CliCommand(value="task create", help="Create a new task definition") public String create(@CliOption(mandatory=true,key={"","name"},help="the name to give to the task") String name, @CliOption(mandatory=true,key="definition",help="a task definition, using the DSL (e.g. \"timestamp --format=YYYY\")",optionContext="disable-string-converter completion-task") String dsl, @CliOption(mandatory=false,key="description",help="a sort description about the task",unspecifiedDefaultValue="") String description)
@CliCommand(value="task launch", help="Launch a previously created task") public String launch(@CliOption(key={"","name"},help="the name of the task to launch",mandatory=true,optionContext="existing-task disable-string-converter") String name, @CliOption(key="properties",help="the properties for this launch") String properties, @CliOption(key="propertiesFile",help="the properties for this launch (as a File)") File propertiesFile, @CliOption(key="arguments",help="the commandline arguments for this launch") String arguments, @CliOption(key="platformName",help="the platform name to use for this launch") String platformName, @CliOption(key="composedTaskRunnerName",help="Composed Task Runner app to use for this launch when not using default") String composedTaskRunnerApp) throws IOException
IOException
@CliCommand(value="task execution stop", help="Stop executing tasks") public String stop(@CliOption(key={"","ids"},help="the task execution id",mandatory=true) String ids, @CliOption(key="platformName",help="the name of the platform where the task is executing") String platform)
@CliCommand(value="task execution log", help="Retrieve task execution log") public String retrieveTaskExecutionLog(@CliOption(key={"","id"},help="the task execution id",mandatory=true) long id, @CliOption(key="platform",help="the platform of the task execution",mandatory=false) String platform) throws com.fasterxml.jackson.core.JsonProcessingException
com.fasterxml.jackson.core.JsonProcessingException
@CliCommand(value="task destroy", help="Destroy an existing task") public String destroy(@CliOption(key={"","name"},help="the name of the task to destroy",mandatory=true,optionContext="existing-task disable-string-converter") String name)
@CliCommand(value="task all destroy", help="Destroy all existing tasks") public String destroyAll(@CliOption(key="force",help="bypass confirmation prompt",unspecifiedDefaultValue="false",specifiedDefaultValue="true") boolean force)
@CliCommand(value="task execution list", help="List created task executions filtered by taskName") public Table executionListByName(@CliOption(key="name",help="the task name to be used as a filter",optionContext="existing-task disable-string-converter") String name)
@CliCommand(value="task execution status", help="Display the details of a specific task execution") public Table display(@CliOption(key={"","id"},help="the task execution id",mandatory=true) long id)
@CliCommand(value="task execution current", help="Display count of currently executin tasks and related information") public Table currentExecutions()
@CliCommand(value="task execution cleanup", help="Clean up any platform specific resources linked to a task execution") public String cleanup(@CliOption(key={"","id"},help="the task execution id",mandatory=true) long id)
Copyright © 2020 Pivotal Software, Inc.. All rights reserved.