def cluster_leave(username, hostname):
 ret = {'comment': '', 'success': False}
 cmd = __execute_cmd('riak-admin', 'cluster leave {0}@{1}'.format(username, hostname))
 if (cmd['retcode'] != 0):
  ret['comment'] = cmd['stdout']
 else:
  ret['comment'] = cmd['stdout']
  ret['success'] = True
 return ret

def cluster_leave ( username , hostname ) : ret = { 'comment' : '' , 'success' : False } cmd = __execute_cmd ( 'riak-admin' , 'cluster leave {0}@{1}' . format ( username , hostname ) ) if ( cmd [ 'retcode' ] != 0 ) : ret [ 'comment' ] = cmd [ 'stdout' ] else : ret [ 'comment' ] = cmd [ 'stdout' ] ret [ 'success' ] = True return ret
leave a riak cluster .