#NEWLINE# def discoverable( dev ) : #NEWLINE# #INDENT# "\n    Enable this bluetooth device to be discoverable.\n\n    CLI Example:\n\n    .. code-block:: bash\n\n        salt '*' bluetooth.discoverable hci0\n    " #NEWLINE# if ( out not in address_ ( ) ) : #NEWLINE# #INDENT# raise CommandExecutionError ( 'Invalid dev passed to bluetooth.discoverable' ) #NEWLINE# #UNINDENT# cmd = 'hciconfig {0} iscan' . format ( dev ) #NEWLINE# __salt__ [ 'cmd.run' ] ( cmd ) . splitlines ( ) #NEWLINE# cmd = 'hciconfig {0}' . format ( dev ) #NEWLINE# out = __salt__ [ 'cmd.run' ] ( cmd ) #NEWLINE# if ( 'UP RUNNING ISCAN' in out ) : #NEWLINE# #INDENT# return True #NEWLINE# #UNINDENT# return False