Added the required attributes for the cmd parser mixins after changes in Salt 0.15.9.

See Salt commits c3bfde339a and 92da051c00. Also moved the default logging location to /var/log/salt to bring it inline with the rest of the Salt logs.
This commit is contained in:
Sam 2013-06-27 00:16:31 +10:00
parent dfa3179189
commit b4928ef555
2 changed files with 7 additions and 2 deletions

View File

@ -33,8 +33,13 @@ class SaltAPI(OptionParser, ConfigDirMixIn, LogLevelMixIn, PidfileMixin,
VERSION = saltapi.version.__version__
# ConfigDirMixIn config filename attribute
_config_filename_ = 'master'
# LogLevelMixIn attributes
_default_logging_logfile_ = '/var/log/salt/api'
def setup_config(self):
return saltapi.config.api_config(self.get_config_file_path('master'))
return saltapi.config.api_config(self.get_config_file_path())
def run(self):
'''

View File

@ -8,7 +8,7 @@ import salt.config
DEFAULT_API_OPTS = {
# ----- Salt master settings overridden by Salt-API --------------------->
'pidfile': '/var/run/salt-api.pid',
'logfile': '/var/log/api',
'logfile': '/var/log/salt/api',
# <---- Salt master settings overridden by Salt-API ----------------------
}