@Component public class StreamCommands extends Object implements org.springframework.shell.core.CommandMarker
| Modifier and Type | Field and Description |
|---|---|
protected DataFlowShell |
dataFlowShell |
| Constructor and Description |
|---|
StreamCommands() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
availableWithCreateRole() |
boolean |
availableWithDeployRole() |
boolean |
availableWithDestroyRole() |
boolean |
availableWithModifyRole() |
boolean |
availableWithViewRole() |
String |
createStream(String name,
String dsl,
String description,
boolean deploy) |
String |
deployStream(String name,
String deploymentProperties,
File propertiesFile,
String packageVersion,
String platformName,
String repoName) |
String |
destroyAllStreams(boolean force) |
String |
destroyStream(String name) |
String |
getManifest(String name,
int releaseVersion) |
org.springframework.shell.table.Table |
history(String name) |
org.springframework.shell.table.Table |
listPlatforms() |
org.springframework.shell.table.Table |
listStreams() |
String |
rollbackStreamUsingSkipper(String name,
int releaseVersion) |
String |
scaleStream(String name,
String applicationName,
Integer count,
String scaleProperties) |
void |
setDataFlowShell(DataFlowShell dataFlowShell) |
void |
setUserInput(UserInput userInput) |
List<Object> |
streamInfo(String name) |
protected StreamOperations |
streamOperations() |
String |
undeployAllStreams(boolean force) |
String |
undeployStream(String name) |
String |
updateStream(String name,
String properties,
File propertiesFile,
String packageVersion,
String repoName,
boolean force,
String appNames) |
List<Object> |
validateStream(String name) |
protected DataFlowShell dataFlowShell
@Autowired public void setDataFlowShell(DataFlowShell dataFlowShell)
@Autowired public void setUserInput(UserInput userInput)
@CliAvailabilityIndicator(value="stream create") public boolean availableWithCreateRole()
@CliAvailabilityIndicator(value={"stream deploy","stream undeploy","stream all undeploy"})
public boolean availableWithDeployRole()
@CliAvailabilityIndicator(value={"stream destroy","stream all destroy"})
public boolean availableWithDestroyRole()
@CliAvailabilityIndicator(value={"stream rollback","stream update","stream scale app instances"})
public boolean availableWithModifyRole()
@CliAvailabilityIndicator(value={"stream info","stream list","stream history","stream manifest","stream platform-list","stream validate"})
public boolean availableWithViewRole()
@CliCommand(value="stream deploy",
help="Deploy a previously created stream using Skipper")
public String deployStream(@CliOption(key={"","name"},help="the name of the stream to deploy",mandatory=true,optionContext="existing-stream disable-string-converter")
String name,
@CliOption(key="properties",help="the properties for this deployment")
String deploymentProperties,
@CliOption(key="propertiesFile",help="the properties for this deployment (as a File)")
File propertiesFile,
@CliOption(key="packageVersion",help="the package version of the package to deploy. Default is 1.0.0",unspecifiedDefaultValue="1.0.0")
String packageVersion,
@CliOption(key="platformName",help="the name of the target platform to deploy to")
String platformName,
@CliOption(key="repoName",help="the name of the local repository to upload the package to")
String repoName)
throws IOException
IOException@CliCommand(value="stream manifest",
help="Get manifest for the stream deployed using Skipper")
public String getManifest(@CliOption(key={"","name"},help="the name of the stream",mandatory=true,optionContext="existing-stream disable-string-converter")
String name,
@CliOption(key="releaseVersion",help="the Skipper release version to get the manifest for",unspecifiedDefaultValue="0")
int releaseVersion)
@CliCommand(value="stream history",
help="Get history for the stream deployed using Skipper")
public org.springframework.shell.table.Table history(@CliOption(key={"","name"},help="the name of the stream",mandatory=true,optionContext="existing-stream disable-string-converter")
String name)
@CliCommand(value="stream platform-list",
help="List Skipper platforms")
public org.springframework.shell.table.Table listPlatforms()
@CliCommand(value="stream update",
help="Update a previously created stream using Skipper")
public String updateStream(@CliOption(key={"","name"},help="the name of the stream to update",mandatory=true,optionContext="existing-stream disable-string-converter")
String name,
@CliOption(key="properties",help="Flattened YAML style properties to update the stream",mandatory=false)
String properties,
@CliOption(key="propertiesFile",help="the properties for the stream update (as a File)",mandatory=false)
File propertiesFile,
@CliOption(key="packageVersion",help="the package version of the package to update when using Skipper")
String packageVersion,
@CliOption(key="repoName",help="the name of the local repository to upload the package when using Skipper")
String repoName,
@CliOption(key="force",help="force the update",mandatory=false,specifiedDefaultValue="true",unspecifiedDefaultValue="false")
boolean force,
@CliOption(key="appNames",help="the application names to force update",mandatory=false)
String appNames)
throws IOException
IOException@CliCommand(value="stream scale app instances",
help="Scale app instances in a stream")
public String scaleStream(@CliOption(key={"","name"},help="the name of the stream to scale",mandatory=true,optionContext="existing-stream disable-string-converter")
String name,
@CliOption(key="applicationName",help="the name/label of the application to scale",mandatory=true)
String applicationName,
@CliOption(key="count",help="desired number of application instances",mandatory=true)
Integer count,
@CliOption(key="properties",help="the properties for this scale")
String scaleProperties)
throws IOException
IOException@CliCommand(value="stream rollback",
help="Rollback a stream using Skipper")
public String rollbackStreamUsingSkipper(@CliOption(key={"","name"},help="the name of the stream to rollback",mandatory=true,optionContext="existing-stream disable-string-converter")
String name,
@CliOption(key="releaseVersion",help="the Skipper release version to rollback to",unspecifiedDefaultValue="0")
int releaseVersion)
@CliCommand(value="stream create",
help="Create a new stream definition")
public String createStream(@CliOption(mandatory=true,key={"","name"},help="the name to give to the stream")
String name,
@CliOption(mandatory=true,key="definition",help="a stream definition, using the DSL (e.g. \"http --port=9000 | hdfs\")",optionContext="disable-string-converter completion-stream")
String dsl,
@CliOption(mandatory=false,key="description",help="a short description about the stream",unspecifiedDefaultValue="")
String description,
@CliOption(key="deploy",help="whether to deploy the stream immediately",unspecifiedDefaultValue="false",specifiedDefaultValue="true")
boolean deploy)
@CliCommand(value="stream list",
help="List created streams")
public org.springframework.shell.table.Table listStreams()
@CliCommand(value="stream info",
help="Show information about a specific stream")
public List<Object> streamInfo(@CliOption(key={"","name"},help="the name of the stream to show",mandatory=true,optionContext="existing-stream disable-string-converter")
String name)
@CliCommand(value="stream undeploy",
help="Un-deploy a previously deployed stream")
public String undeployStream(@CliOption(key={"","name"},help="the name of the stream to un-deploy",mandatory=true,optionContext="existing-stream disable-string-converter")
String name)
@CliCommand(value="stream all undeploy",
help="Un-deploy all previously deployed stream")
public String undeployAllStreams(@CliOption(key="force",help="bypass confirmation prompt",unspecifiedDefaultValue="false",specifiedDefaultValue="true")
boolean force)
@CliCommand(value="stream destroy",
help="Destroy an existing stream")
public String destroyStream(@CliOption(key={"","name"},help="the name of the stream to destroy",mandatory=true,optionContext="existing-stream disable-string-converter")
String name)
@CliCommand(value="stream all destroy",
help="Destroy all existing streams")
public String destroyAllStreams(@CliOption(key="force",help="bypass confirmation prompt",unspecifiedDefaultValue="false",specifiedDefaultValue="true")
boolean force)
@CliCommand(value="stream validate",
help="Verify that apps contained in the stream are valid.")
public List<Object> validateStream(@CliOption(key={"","name"},help="the name of the stream to validate",mandatory=true,optionContext="existing-stream disable-string-converter")
String name)
throws OperationNotSupportedException
OperationNotSupportedExceptionprotected StreamOperations streamOperations()
Copyright © 2021 Pivotal Software, Inc.. All rights reserved.