mirror of
https://codeberg.org/scip/esctl.git
synced 2026-08-24 21:54:17 +02:00
enhance ilm show, add ilm update, rename modify to update everywhere (#58)
This commit is contained in:
23
cmd/ilm.go
23
cmd/ilm.go
@@ -36,7 +36,8 @@ func Ilm(conf *cfg.Config) *cli.Command {
|
||||
IlmStatus(conf),
|
||||
IlmList(conf),
|
||||
IlmShow(conf),
|
||||
IlmCreate(conf),
|
||||
IlmCreate(conf, false),
|
||||
IlmCreate(conf, true),
|
||||
IlmForecast(conf),
|
||||
IlmExplain(conf),
|
||||
},
|
||||
@@ -127,12 +128,22 @@ func IlmShow(conf *cfg.Config) *cli.Command {
|
||||
}
|
||||
}
|
||||
|
||||
func IlmCreate(conf *cfg.Config) *cli.Command {
|
||||
func IlmCreate(conf *cfg.Config, modify bool) *cli.Command {
|
||||
name := "create"
|
||||
alias := "+"
|
||||
usage := "create a new lifecycle policy"
|
||||
|
||||
if modify {
|
||||
name = "update"
|
||||
usage = "update an lifecycle policy"
|
||||
alias = "upd"
|
||||
}
|
||||
|
||||
return &cli.Command{
|
||||
Name: "create",
|
||||
Aliases: []string{"+"},
|
||||
Usage: "create a index lifecycle policy",
|
||||
UsageText: "create [options] <policy>",
|
||||
Name: name,
|
||||
Aliases: []string{alias},
|
||||
Usage: usage,
|
||||
UsageText: name + " [options] <policy>",
|
||||
|
||||
Flags: []cli.Flag{
|
||||
&cli.StringFlag{
|
||||
|
||||
Reference in New Issue
Block a user