github.com/mwhudson/juju@v0.0.0-20160512215208-90ff01f3497f/storage/provider/common.go (about) 1 // Copyright 2015 Canonical Ltd. 2 // Licensed under the AGPLv3, see LICENCE file for details. 3 4 package provider 5 6 import ( 7 "github.com/juju/errors" 8 9 "github.com/juju/juju/storage" 10 ) 11 12 var errNoMountPoint = errors.New("filesystem mount point not specified") 13 14 // CommonProviders returns the storage providers used by all environments. 15 func CommonProviders() map[storage.ProviderType]storage.Provider { 16 return map[storage.ProviderType]storage.Provider{ 17 LoopProviderType: &loopProvider{logAndExec}, 18 RootfsProviderType: &rootfsProvider{logAndExec}, 19 TmpfsProviderType: &tmpfsProvider{logAndExec}, 20 } 21 } 22 23 // ValidateConfig performs storage provider config validation, including 24 // any common validation. 25 func ValidateConfig(p storage.Provider, cfg *storage.Config) error { 26 return p.ValidateConfig(cfg) 27 }