mirror of https://github.com/helm/helm
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
526 B
28 lines
526 B
package main
|
|
|
|
import (
|
|
"os"
|
|
|
|
"github.com/codegangsta/cli"
|
|
"github.com/deis/helm-dm/dm"
|
|
"github.com/deis/helm-dm/format"
|
|
)
|
|
|
|
func listCmd() cli.Command {
|
|
return cli.Command{
|
|
Name: "list",
|
|
Usage: "Lists the deployments in the cluster",
|
|
Action: func(c *cli.Context) {
|
|
if err := list(c.GlobalString("host")); err != nil {
|
|
format.Err("%s (Is the cluster running?)", err)
|
|
os.Exit(1)
|
|
}
|
|
},
|
|
}
|
|
}
|
|
|
|
func list(host string) error {
|
|
client := dm.NewClient(host).SetDebug(true)
|
|
return client.ListDeployments()
|
|
}
|