Commit e30fe2ba authored by Davanum Srinivas's avatar Davanum Srinivas

Deprecate in-tree OpenStack cloud provider

Warn operators and users to switch to the external cloud provider for openstack.
parent af70337f
...@@ -33,8 +33,11 @@ type Factory func(config io.Reader) (Interface, error) ...@@ -33,8 +33,11 @@ type Factory func(config io.Reader) (Interface, error)
// All registered cloud providers. // All registered cloud providers.
var ( var (
providersMutex sync.Mutex providersMutex sync.Mutex
providers = make(map[string]Factory) providers = make(map[string]Factory)
deprecatedCloudProviders = []string{
"openstack",
}
) )
const externalCloudProvider = "external" const externalCloudProvider = "external"
...@@ -95,6 +98,14 @@ func InitCloudProvider(name string, configFilePath string) (Interface, error) { ...@@ -95,6 +98,14 @@ func InitCloudProvider(name string, configFilePath string) (Interface, error) {
return nil, nil return nil, nil
} }
for _, provider := range deprecatedCloudProviders {
if provider == name {
glog.Warningf("WARNING: %s built-in cloud provider is now deprecated. "+
"Please use 'external' cloud provider for %s", name, name)
break
}
}
if configFilePath != "" { if configFilePath != "" {
var config *os.File var config *os.File
config, err = os.Open(configFilePath) config, err = os.Open(configFilePath)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment