storageminer: Cleanup CLI

This commit is contained in:
Łukasz Magiera 2020-03-23 13:29:24 +01:00
parent cb1e7bd1b1
commit 80d0f1f2c1
4 changed files with 24 additions and 15 deletions

View File

@ -209,6 +209,14 @@ func ReqContext(cctx *cli.Context) context.Context {
return ctx
}
var CommonCommands = []*cli.Command{
authCmd,
fetchParamCmd,
netCmd,
versionCmd,
logCmd,
}
var Commands = []*cli.Command{
authCmd,
chainCmd,

View File

@ -25,7 +25,6 @@ func main() {
dealsCmd,
infoCmd,
initCmd,
pledgeSectorCmd,
rewardsCmd,
runCmd,
sectorsCmd,
@ -71,7 +70,7 @@ func main() {
},
},
Commands: append(local, lcli.Commands...),
Commands: append(local, lcli.CommonCommands...),
}
app.Setup()
app.Metadata["repoType"] = repo.StorageMiner

View File

@ -18,8 +18,20 @@ import (
lcli "github.com/filecoin-project/lotus/cli"
)
var pledgeSectorCmd = &cli.Command{
Name: "pledge-sector",
var sectorsCmd = &cli.Command{
Name: "sectors",
Usage: "interact with sector store",
Subcommands: []*cli.Command{
sectorsStatusCmd,
sectorsListCmd,
sectorsRefsCmd,
sectorsUpdateCmd,
sectorsPledgeCmd,
},
}
var sectorsPledgeCmd = &cli.Command{
Name: "pledge",
Usage: "store random data in a sector",
Action: func(cctx *cli.Context) error {
nodeApi, closer, err := lcli.GetStorageMinerAPI(cctx)
@ -33,17 +45,6 @@ var pledgeSectorCmd = &cli.Command{
},
}
var sectorsCmd = &cli.Command{
Name: "sectors",
Usage: "interact with sector store",
Subcommands: []*cli.Command{
sectorsStatusCmd,
sectorsListCmd,
sectorsRefsCmd,
sectorsUpdateCmd,
},
}
var sectorsStatusCmd = &cli.Command{
Name: "status",
Usage: "Get the seal status of a sector by its ID",

View File

@ -0,0 +1 @@
package main