forked from benjaminbollen/mintnet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinfo.go
35 lines (29 loc) · 734 Bytes
/
info.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package main
import (
"fmt"
. "github.com/tendermint/go-common"
"github.com/codegangsta/cli"
)
//--------------------------------------------------------------------------------
func cmdInfo(c *cli.Context) {
cli.ShowAppHelp(c)
}
//--------------------------------------------------------------------------------
func cmdPorts(c *cli.Context) {
args := c.Args()
if len(args) != 1 {
cli.ShowAppHelp(c)
return
}
appName := args[0]
machines := ParseMachines(c.GlobalString("machines"))
for _, mach := range machines {
portMap, err := getContainerPortMap(mach, fmt.Sprintf("%v_tmcore", appName))
if err != nil {
Exit(err.Error())
}
fmt.Println("Machine", mach)
fmt.Println(portMap)
fmt.Println("")
}
}