Beispiel #1
0
// UpdateController implements ControllerUpdater.UpdateController
func (c *MemStore) UpdateController(name string, one jujuclient.ControllerDetails) error {
	if err := jujuclient.ValidateControllerName(name); err != nil {
		return err
	}
	if err := jujuclient.ValidateControllerDetails(one); err != nil {
		return err
	}
	c.Controllers[name] = one
	return nil
}
func (s *ControllerValidationSuite) assertValidateControllerDetailsFails(c *gc.C, failureMessage string) {
	err := jujuclient.ValidateControllerDetails(s.controller)
	c.Assert(err, gc.ErrorMatches, failureMessage)
}