2 * global.c: Library for Virtualized Super Computer Management
4 * Copyright (C) 2009 Matthias Bolte <matthias.bolte@googlemail.com>
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
28 vsc_mgmt_global_init (struct VscMgmtError *error, const char *backend_config)
30 VSC_MGMT__ASSERT (error != NULL);
31 VSC_MGMT__ASSERT (! error->occured);
33 vsc_mgmt_backend_init (error, backend_config);
36 VSC_MGMT__APPEND_ERROR0 (error, VSC_MGMT__CODE__TRACE);
42 vsc_mgmt_global_cleanup (void)
44 vsc_mgmt_backend_cleanup();
48 vsc_mgmt_global_backup (struct VscMgmtError *error)
50 VSC_MGMT__ASSERT (error != NULL);
51 VSC_MGMT__ASSERT (! error->occured);
53 vsc_mgmt_backend_backup (error);
56 VSC_MGMT__APPEND_ERROR0 (error, VSC_MGMT__CODE__TRACE);
62 vsc_mgmt_global_recover (struct VscMgmtError *error)
64 VSC_MGMT__ASSERT (error != NULL);
65 VSC_MGMT__ASSERT (! error->occured);
67 vsc_mgmt_backend_recover (error);
70 VSC_MGMT__APPEND_ERROR0 (error, VSC_MGMT__CODE__TRACE);
80 vsc_mgmt_get_version (int *major, int *minor, int *patch)
83 *major = VSC_MGMT__VERION__MAJOR;
87 *minor = VSC_MGMT__VERION__MINOR;
91 *patch = VSC_MGMT__VERION__PATCH;