def get_sd_auth(val, sd_auth_pillar_name='serverdensity'):
 sd_pillar = __pillar__.get(sd_auth_pillar_name)
 log.debug('Server Density Pillar: {0}'.format(sd_pillar))
 if (not sd_pillar):
  log.error('Could not load {0} pillar'.format(sd_auth_pillar_name))
  raise CommandExecutionError('{0} pillar is required for authentication'.format(sd_auth_pillar_name))
 try:
  return sd_pillar[val]
 except KeyError:
  log.error('Could not find value {0} in pillar'.format(val))
  raise CommandExecutionError('{0} value was not found in pillar'.format(val))

def get_sd_auth ( val , sd_auth_pillar_name = 'serverdensity' ) : sd_pillar = __pillar__ . get ( sd_auth_pillar_name ) log . debug ( 'Server Density Pillar: {0}' . format ( sd_pillar ) ) if ( not sd_pillar ) : log . error ( 'Could not load {0} pillar' . format ( sd_auth_pillar_name ) ) raise CommandExecutionError ( '{0} pillar is required for authentication' . format ( sd_auth_pillar_name ) ) try : return sd_pillar [ val ] except KeyError : log . error ( 'Could not find value {0} in pillar' . format ( val ) ) raise CommandExecutionError ( '{0} value was not found in pillar' . format ( val ) )
returns requested server density authentication value from pillar .