Only warn about digital ocean deprecation if digital ocean is configured

This commit is contained in:
rallytime 2015-06-25 16:00:33 -06:00
parent a71c1b7c8b
commit 6b544227ab

View File

@ -81,19 +81,22 @@ def get_configured_provider():
'''
Return the first configured instance.
'''
warn_until(
'Beryllium',
'The digital_ocean driver is deprecated and will be removed in Salt Beryllium. '
'Please convert your digital ocean provider configs to use the digital_ocean_v2 '
'driver.'
)
return config.is_provider_configured(
configuration = config.is_provider_configured(
__opts__,
__active_provider_name__ or 'digital_ocean',
('api_key',)
)
if configuration:
warn_until(
'Beryllium',
'The digital_ocean driver is deprecated and will be removed in Salt Beryllium. '
'Please convert your digital ocean provider configs to use the digital_ocean_v2 '
'driver.'
)
return configuration
def avail_locations(call=None):
'''