Add virtual functions to influxdb state modules

Fixes #24301
This commit is contained in:
Wolodja Wentland 2015-06-30 10:05:31 +02:00 committed by rallytime
parent 3599b8abab
commit 1eeefbd2ab
2 changed files with 18 additions and 0 deletions

View file

@ -10,6 +10,15 @@ Management of InfluxDB databases
'''
def __virtual__():
'''
Only load if the influxdb module is available
'''
if 'influxdb.db_exists' in __salt__:
return 'influxdb_database'
return False
def present(name, user=None, password=None, host=None, port=None):
'''
Ensure that the named database is present

View file

@ -10,6 +10,15 @@ Management of InfluxDB users
'''
def __virtual__():
'''
Only load if the influxdb module is available
'''
if 'influxdb.db_exists' in __salt__:
return 'influxdb_user'
return False
def present(name, passwd, database=None, user=None, password=None, host=None,
port=None):
'''