def get_agent_settings():
 ret = dict()
 sorted_types = sorted(_SERVICE_TYPES.items(), key=(lambda x: ((- x[1]), x[0])))
 ret['services'] = list()
 ret['contact'] = __salt__['reg.read_value'](_HKEY, _AGENT_KEY, 'sysContact')['vdata']
 ret['location'] = __salt__['reg.read_value'](_HKEY, _AGENT_KEY, 'sysLocation')['vdata']
 current_bitmask = __salt__['reg.read_value'](_HKEY, _AGENT_KEY, 'sysServices')['vdata']
 if (current_bitmask == 0):
  ret['services'].append(sorted_types[(-1)][0])
 else:
  for (service, bitmask) in sorted_types:
   if (current_bitmask > 0):
    remaining_bitmask = (current_bitmask - bitmask)
    if (remaining_bitmask >= 0):
     current_bitmask = remaining_bitmask
     ret['services'].append(service)
   else:
    break
 ret['services'] = sorted(ret['services'])
 return ret

def get_agent_settings ( ) : ret = dict ( ) sorted_types = sorted ( _SERVICE_TYPES . items ( ) , key = ( lambda x : ( ( - x [ 1 ] ) , x [ 0 ] ) ) ) ret [ 'services' ] = list ( ) ret [ 'contact' ] = __salt__ [ 'reg.read_value' ] ( _HKEY , _AGENT_KEY , 'sysContact' ) [ 'vdata' ] ret [ 'location' ] = __salt__ [ 'reg.read_value' ] ( _HKEY , _AGENT_KEY , 'sysLocation' ) [ 'vdata' ] current_bitmask = __salt__ [ 'reg.read_value' ] ( _HKEY , _AGENT_KEY , 'sysServices' ) [ 'vdata' ] if ( current_bitmask == 0 ) : ret [ 'services' ] . append ( sorted_types [ ( - 1 ) ] [ 0 ] ) else : for ( service , bitmask ) in sorted_types : if ( current_bitmask > 0 ) : remaining_bitmask = ( current_bitmask - bitmask ) if ( remaining_bitmask >= 0 ) : current_bitmask = remaining_bitmask ret [ 'services' ] . append ( service ) else : break ret [ 'services' ] = sorted ( ret [ 'services' ] ) return ret
determine the value of the snmp syscontact .