@Component @UserDocumentation(title="Commands for Storage Management", description="These commands provide CRUD for Storages") public class LensStorageCommands extends LensCRUDCommand<XStorage> implements org.springframework.shell.core.CommandMarker
DATE_FMT, DATE_PARSER
Constructor and Description |
---|
LensStorageCommands() |
Modifier and Type | Method and Description |
---|---|
String |
createStorage(File path)
Creates the storage.
|
String |
describeStorage(String name)
Describe storage.
|
APIResult |
doUpdate(String name,
String path) |
String |
dropStorage(String name)
Drop storage.
|
List<String> |
getAll() |
String |
getStorages() |
String |
updateStorage(String name,
File path)
Update storage.
|
create, describe, drop, getSingleObjectName, showAll, update
afterReturningInvocation, afterThrowingInvocation, beforeInvocation, formatDate, formatJson, getClient, getClientWrapper, getOrDefaultQueryHandleString, getValidPath, removePrefixBeforeURI, setClient
@CliCommand(value="show storages", help="list all storages") public String getStorages()
@CliCommand(value="create storage", help="Create a new Storage from file") public String createStorage(@CliOption(key={"","path"},mandatory=true,help=" ")@NonNull File path)
path
- the storage spec path@CliCommand(value="drop storage", help="drop storage") public String dropStorage(@CliOption(key={"","name"},mandatory=true,help=" ") String name)
name
- the storage name@CliCommand(value="update storage", help="update storagewith storage spec from ") public String updateStorage(@CliOption(key={"","name"},mandatory=true,help=" ") String name, @CliOption(key={"","path"},mandatory=true,help=" ")@NonNull File path)
name
- the storage namepath
- the new storage spec path@CliCommand(value="describe storage", help="describe storage") public String describeStorage(@CliOption(key={"","name"},mandatory=true,help=" ") String name)
name
- the storage namepublic List<String> getAll()
getAll
in class LensCRUDCommand<XStorage>
Copyright © 2014–2016 Apache Software Foundation. All rights reserved.