"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "salt/cli/api.py" between
salt-2019.2.0.tar.gz and salt-2019.2.1.tar.gz

About: SaltStack is a systems management software for data center automation, cloud orchestration, server provisioning, configuration management and more. Community version.

api.py  (salt-2019.2.0):api.py  (salt-2019.2.1)
skipping to change at line 18 skipping to change at line 18
''' '''
# Import Python libs # Import Python libs
from __future__ import absolute_import, print_function, unicode_literals from __future__ import absolute_import, print_function, unicode_literals
import logging import logging
# Import Salt libs # Import Salt libs
import salt.client.netapi import salt.client.netapi
import salt.utils.files import salt.utils.files
import salt.utils.parsers as parsers import salt.utils.parsers as parsers
from salt.utils.verify import check_user, verify_files, verify_log from salt.utils.verify import check_user, verify_log_files, verify_log
log = logging.getLogger(__name__) log = logging.getLogger(__name__)
class SaltAPI(parsers.SaltAPIParser): class SaltAPI(parsers.SaltAPIParser):
''' '''
The cli parser object used to fire up the salt api system. The cli parser object used to fire up the salt api system.
''' '''
def prepare(self): def prepare(self):
''' '''
skipping to change at line 40 skipping to change at line 40
If sub-classed, don't **ever** forget to run: If sub-classed, don't **ever** forget to run:
super(YourSubClass, self).prepare() super(YourSubClass, self).prepare()
''' '''
super(SaltAPI, self).prepare() super(SaltAPI, self).prepare()
try: try:
if self.config['verify_env']: if self.config['verify_env']:
logfile = self.config['log_file'] logfile = self.config['log_file']
if logfile is not None and not logfile.startswith(('tcp://', if logfile is not None:
'udp://',
'file://')):
# Logfile is not using Syslog, verify # Logfile is not using Syslog, verify
with salt.utils.files.set_umask(0o027): with salt.utils.files.set_umask(0o027):
verify_files([logfile], self.config['user']) verify_log_files([logfile], self.config['user'])
except OSError as err: except OSError as err:
log.exception('Failed to prepare salt environment') log.exception('Failed to prepare salt environment')
self.shutdown(err.errno) self.shutdown(err.errno)
self.setup_logfile_logger() self.setup_logfile_logger()
verify_log(self.config) verify_log(self.config)
log.info('Setting up the Salt API') log.info('Setting up the Salt API')
self.api = salt.client.netapi.NetapiClient(self.config) self.api = salt.client.netapi.NetapiClient(self.config)
self.daemonize_if_required() self.daemonize_if_required()
self.set_pidfile() self.set_pidfile()
 End of changes. 3 change blocks. 
5 lines changed or deleted 3 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)