#NEWLINE# def get_enabled( limit = '' ) : #NEWLINE# #INDENT# "\n    Return the enabled services. Use the ``limit`` param to restrict results\n    to services of that type.\n\n    CLI Examples:\n\n    .. code-block:: bash\n\n        salt '*' service.get_enabled\n        salt '*' service.get_enabled limit=upstart\n        salt '*' service.get_enabled limit=sysvinit\n    " #NEWLINE# limit = limit . lower ( ) #NEWLINE# if ( limit == 'upstart' ) : #NEWLINE# #INDENT# return sorted ( ( name for name in _upstart_services ( ) if _upstart_is_enabled ( name ) ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( limit == 'sysvinit' ) : #NEWLINE# #INDENT# runlevel = _runlevel ( ) #NEWLINE# return sorted ( ( name for name in _sysv_services ( ) if _sysv_is_enabled ( name , runlevel ) ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# runlevel = _runlevel ( ) #NEWLINE# return sorted ( ( [ name for name in _upstart_services ( ) if _upstart_is_enabled ( name ) ] + [ name for name in _sysv_services ( ) if _sysv_is_enabled ( name , runlevel ) ] ) )