Пример #1
0
// ValidateConfig performs storage provider config validation, including
// any common validation.
func ValidateConfig(p storage.Provider, cfg *storage.Config) error {
	if p.Scope() == storage.ScopeMachine && cfg.IsPersistent() {
		return errors.Errorf("machine scoped storage provider %q does not support persistent storage", cfg.Name())
	}
	return p.ValidateConfig(cfg)
}