1
0
mirror of https://github.com/rancher/os.git synced 2025-05-19 05:20:07 +00:00
os/cmd/control/cli.go
Ivan Mikushin b7b52c65a1 ros dev spec
find device using blkid spec
2015-07-21 13:34:55 +05:00

72 lines
1.4 KiB
Go

package control
import (
"os"
"github.com/codegangsta/cli"
"github.com/rancherio/os/config"
)
func Main() {
app := cli.NewApp()
app.Name = os.Args[0]
app.Usage = "Control and configure RancherOS"
app.Version = config.VERSION
app.Author = "Rancher Labs, Inc."
app.EnableBashCompletion = true
app.Commands = []cli.Command{
{
Name: "config",
ShortName: "c",
Usage: "configure settings",
HideHelp: true,
Subcommands: configSubcommands(),
},
{
Name: "dev",
ShortName: "d",
Usage: "dev spec",
HideHelp: true,
SkipFlagParsing: true,
Action: devAction,
},
{
Name: "env",
ShortName: "e",
Usage: "env command",
HideHelp: true,
SkipFlagParsing: true,
Action: envAction,
},
{
Name: "service",
ShortName: "s",
Usage: "service settings",
HideHelp: true,
Subcommands: serviceSubCommands(),
},
//{
// Name: "reload",
// ShortName: "a",
// Usage: "reload configuration of a service and restart the container",
// Action: reload,
//},
{
Name: "os",
Usage: "operating system upgrade/downgrade",
HideHelp: true,
Subcommands: osSubcommands(),
},
{
Name: "tls",
Usage: "setup tls configuration",
HideHelp: true,
Subcommands: tlsConfCommands(),
},
}
app.Run(os.Args)
}