mirror of
https://codeberg.org/scip/esctl.git
synced 2026-08-24 04:54:18 +02:00
add ilm management support (#43)
This commit is contained in:
22
cmd/index.go
22
cmd/index.go
@@ -42,6 +42,7 @@ func Index(conf *cfg.Config) *cli.Command {
|
||||
IndexAllocation(conf),
|
||||
IndexModify(conf),
|
||||
IndexFields(conf),
|
||||
IndexIlm(conf),
|
||||
|
||||
// sub commands
|
||||
IndexAlias(conf),
|
||||
@@ -300,3 +301,24 @@ func IndexFields(conf *cfg.Config) *cli.Command {
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
func IndexIlm(conf *cfg.Config) *cli.Command {
|
||||
return &cli.Command{
|
||||
Name: "ilm",
|
||||
Usage: "show ilm status",
|
||||
UsageText: "index ilm <index>",
|
||||
|
||||
ShellComplete: func(ctx context.Context, cmd *cli.Command) {
|
||||
complete(cmd, Cindex)
|
||||
},
|
||||
|
||||
Action: func(ctx context.Context, cmd *cli.Command) error {
|
||||
index := cmd.Args().Get(0)
|
||||
if index == "" {
|
||||
return errors.New("no index specified")
|
||||
}
|
||||
|
||||
return es.IlmExplain(conf, index)
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user