72
72
func (c *SSHCommon) hostFromTarget(target string) (string, error) {
73
73
// is the target the id of a machine ?
74
74
if state.IsMachineId(target) {
76
76
// TODO(dfc) maybe we should have machine.PublicAddress() ?
77
77
return c.machinePublicAddress(target)
79
79
// maybe the target is a unit ?
80
80
if state.IsUnitName(target) {
82
82
unit, err := c.State.Unit(target)