Files
docker-docs/commands/status.go
Sergio Botero 87cf7e222e Add status command
closes #1471 by adding the status command that prints the state of a
machine.

Signed-off-by: Sergio Botero <sergiobuj@gmail.com>
2015-07-14 19:10:40 -07:00

19 lines
317 B
Go

package commands
import (
"fmt"
"github.com/docker/machine/log"
"github.com/codegangsta/cli"
)
func cmdStatus(c *cli.Context) {
host := getHost(c)
currentState, err := host.Driver.GetState()
if err != nil {
log.Errorf("error getting state for host %s: %s", host.Name, err)
}
fmt.Println(currentState)
}