def spm_config(path):
 defaults = DEFAULT_MASTER_OPTS.copy()
 defaults.update(DEFAULT_SPM_OPTS)
 overrides = load_config(path, 'SPM_CONFIG', DEFAULT_SPM_OPTS['spm_conf_file'])
 default_include = overrides.get('spm_default_include', defaults['spm_default_include'])
 include = overrides.get('include', [])
 overrides.update(include_config(default_include, path, verbose=False))
 overrides.update(include_config(include, path, verbose=True))
 defaults = apply_master_config(overrides, defaults)
 defaults = apply_spm_config(overrides, defaults)
 return client_config(path, env_var='SPM_CONFIG', defaults=defaults)

def spm_config ( path ) : defaults = DEFAULT_MASTER_OPTS . copy ( ) defaults . update ( DEFAULT_SPM_OPTS ) overrides = load_config ( path , 'SPM_CONFIG' , DEFAULT_SPM_OPTS [ 'spm_conf_file' ] ) default_include = overrides . get ( 'spm_default_include' , defaults [ 'spm_default_include' ] ) include = overrides . get ( 'include' , [ ] ) overrides . update ( include_config ( default_include , path , verbose = False ) ) overrides . update ( include_config ( include , path , verbose = True ) ) defaults = apply_master_config ( overrides , defaults ) defaults = apply_spm_config ( overrides , defaults ) return client_config ( path , env_var = 'SPM_CONFIG' , defaults = defaults )
read in the salt master config file and add additional configs that need to be stubbed out for spm .