def delete_stream(client, stream_name, wait=False, wait_timeout=300, check_mode=False):
 success = False
 changed = False
 err_msg = ''
 results = dict()
 (stream_found, stream_msg, current_stream) = find_stream(client, stream_name, check_mode=check_mode)
 if stream_found:
  (success, err_msg) = stream_action(client, stream_name, action='delete', check_mode=check_mode)
  if success:
   changed = True
   if wait:
    (success, err_msg, results) = wait_for_status(client, stream_name, 'DELETING', wait_timeout, check_mode=check_mode)
    err_msg = 'Stream {0} deleted successfully'.format(stream_name)
    if (not success):
     return (success, True, err_msg, results)
   else:
    err_msg = 'Stream {0} is in the process of being deleted'.format(stream_name)
 else:
  success = True
  changed = False
  err_msg = 'Stream {0} does not exist'.format(stream_name)
 return (success, changed, err_msg, results)

def delete_stream ( client , stream_name , wait = False , wait_timeout = 300 , check_mode = False ) : success = False changed = False err_msg = '' results = dict ( ) ( stream_found , stream_msg , current_stream ) = find_stream ( client , stream_name , check_mode = check_mode ) if stream_found : ( success , err_msg ) = stream_action ( client , stream_name , action = 'delete' , check_mode = check_mode ) if success : changed = True if wait : ( success , err_msg , results ) = wait_for_status ( client , stream_name , 'DELETING' , wait_timeout , check_mode = check_mode ) err_msg = 'Stream {0} deleted successfully' . format ( stream_name ) if ( not success ) : return ( success , True , err_msg , results ) else : err_msg = 'Stream {0} is in the process of being deleted' . format ( stream_name ) else : success = True changed = False err_msg = 'Stream {0} does not exist' . format ( stream_name ) return ( success , changed , err_msg , results )
delete the stream with name stream_name .