1 /*****************************************************************************\
2  *  as_mysql_federation.h - functions dealing with federations.
3  *****************************************************************************
4  *
5  *  Copyright (C) 2016 SchedMD LLC.
6  *  Written by Brian Christiansen <brian@schedmd.com>
7  *
8  *  This file is part of Slurm, a resource management program.
9  *  For details, see <https://slurm.schedmd.com/>.
10  *  Please also read the included file: DISCLAIMER.
11  *
12  *  Slurm is free software; you can redistribute it and/or modify it under
13  *  the terms of the GNU General Public License as published by the Free
14  *  Software Foundation; either version 2 of the License, or (at your option)
15  *  any later version.
16  *
17  *  In addition, as a special exception, the copyright holders give permission
18  *  to link the code of portions of this program with the OpenSSL library under
19  *  certain conditions as described in each individual source file, and
20  *  distribute linked combinations including the two. You must obey the GNU
21  *  General Public License in all respects for all of the code used other than
22  *  OpenSSL. If you modify file(s) with this exception, you may extend this
23  *  exception to your version of the file(s), but you are not obligated to do
24  *  so. If you do not wish to do so, delete this exception statement from your
25  *  version.  If you delete this exception statement from all source files in
26  *  the program, then also delete it here.
27  *
28  *  Slurm is distributed in the hope that it will be useful, but WITHOUT ANY
29  *  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
30  *  FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
31  *  details.
32  *
33  *  You should have received a copy of the GNU General Public License along
34  *  with Slurm; if not, write to the Free Software Foundation, Inc.,
35  *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA.
36 \*****************************************************************************/
37 #ifndef _HAVE_MYSQL_FEDERATION_H
38 #define _HAVE_MYSQL_FEDERATION_H
39 
40 #include "accounting_storage_mysql.h"
41 
42 extern int as_mysql_add_feds_to_update_list(mysql_conn_t *mysql_conn);
43 
44 extern int as_mysql_add_federations(mysql_conn_t *mysql_conn, uint32_t uid,
45 				    List federation_list);
46 
47 extern List as_mysql_get_federations(
48 				mysql_conn_t *mysql_conn, uid_t uid,
49 				slurmdb_federation_cond_t *federation_cond);
50 
51 extern List as_mysql_modify_federations(
52 				mysql_conn_t *mysql_conn, uint32_t uid,
53 				slurmdb_federation_cond_t *fed_cond,
54 				slurmdb_federation_rec_t *fed);
55 
56 extern List as_mysql_remove_federations(mysql_conn_t *mysql_conn, uint32_t uid,
57 					slurmdb_federation_cond_t *fed_cond);
58 #endif
59