mirror of
https://github.com/rancher/os.git
synced 2025-09-09 10:40:30 +00:00
Get all services via ros service list --all
This commit is contained in:
@@ -70,8 +70,14 @@ func serviceSubCommands() []cli.Command {
|
|||||||
Action: disable,
|
Action: disable,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "list",
|
Name: "list",
|
||||||
Usage: "list services and state",
|
Usage: "list services and state",
|
||||||
|
Flags: []cli.Flag{
|
||||||
|
cli.BoolFlag{
|
||||||
|
Name: "all, a",
|
||||||
|
Usage: "list all services and state",
|
||||||
|
},
|
||||||
|
},
|
||||||
Action: list,
|
Action: list,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -175,6 +181,12 @@ func list(c *cli.Context) error {
|
|||||||
|
|
||||||
services := availableService(cfg)
|
services := availableService(cfg)
|
||||||
|
|
||||||
|
if c.Bool("all") {
|
||||||
|
for service := range cfg.Rancher.Services {
|
||||||
|
fmt.Printf("enabled %s\n", service)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for _, service := range services {
|
for _, service := range services {
|
||||||
if enabled, ok := clone[service]; ok {
|
if enabled, ok := clone[service]; ok {
|
||||||
delete(clone, service)
|
delete(clone, service)
|
||||||
|
Reference in New Issue
Block a user