func (info *ControllerInfo) Validate() error {
	if !names.IsValidController(info.ControllerTag.Id()) {
		return errors.NotValidf("ControllerTag")
	}

	if len(info.Addrs) < 1 {
		return errors.NotValidf("empty controller api addresses")
	}
	for _, addr := range info.Addrs {
		_, err := network.ParseMachineHostPort(addr)
		if err != nil {
			return errors.NotValidf("controller api address %q", addr)
		}
	}
	return nil
}
// Validate returns an error if the ControllerInfo contains bad data.
Validate returns an error if the ControllerInfo contains bad data.
// Validate returns an error if the ControllerInfo contains bad data .
func (info *ControllerInfo) Validate() error {
	if !names.IsValidController(info.ControllerTag.Id()) {
		return errors.NotValidf("ControllerTag")
	}
	if len(info.Addrs) < 1 {
		return errors.NotValidf("empty controller api addresses")
	}
	for _, addr := range info.Addrs {
		_, err := network.ParseMachineHostPort(addr)
		if err != nil {
			return errors.NotValidf("controller api address %q", addr)
		}
	}
	return nil
}
func ( info * ControllerInfo ) Validate ( ) error { if ! names . IsValidController ( info . ControllerTag . Id ( ) ) { return errors . NotValidf ( " " ) } if len ( info . Addrs ) < 1 { return errors . NotValidf ( " " ) } for _ , addr := range info . Addrs { _ , err := network . ParseMachineHostPort ( addr ) if err != nil { return errors . NotValidf ( " " , addr ) } } return nil }
Validate returns an error if the ControllerInfo contains bad data.
Validate returns an error if the ControllerInfo contains bad data .