/*
* Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of version 2 of the GNU General Public License as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it would be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* Further, this software is distributed without any warranty that it is
* free of the rightful claim of any third person regarding infringement
* or the like. Any license provided herein, whether implied or
* otherwise, applies only to this software file. Patent licenses, if
* any, provided herein do not apply to combinations of this program with
* other software, or any other product whatsoever.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write the Free Software Foundation,
* Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
*
* Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
* Mountain View, CA 94043, or:
*
* http://www.sgi.com
*
* For further information regarding this notice, see:
*
* http://oss.sgi.com/projects/GenInfo/NoticeExplan
*/
/*
* fs_cdbconfig.h
*
* This file contains generic FailSafe cdb constants.
*/
#ifndef FS_CDBCONFIG_H
#define FS_CDBCONFIG_H
#ident "$Id: fs_cdbconfig.h,v 1.1 2000/08/31 19:55:34 vasa Exp $"
/*
* Failover Policy structure
*
* Passed back for query/enumerate operations. All fields are malloced()
* by the library. char ** points to arrays of pointers to malloced()
* strings. The arrays are themselves malloced to a size + 1 above the
* size needed.
*/
typedef struct fs_config_failover_s {
char *cfp_policy_name;
uint32_t cfp_version;
char *cfp_script;
ci_nlist_t *cfp_attr_nlist;
ci_nlist_t *cfp_afd_nlist;
char **cfp_attributes;
char **cfp_initialAFD;
} fs_config_failover_t;
typedef struct fs_config_resgroup_s {
char *crg_resgroup_name;
char *crg_cluster;
char *crg_failover_policy;
boolean_t crg_enable;
} fs_config_resgroup_t;
/* Functions defined in libfs/src/config/failover.c */
boolean_t fscdb_failover_policy_isdefined(cdb_handle_t db,
char *, boolean_t,
char *);
ci_err_t fscdb_failover_policy_create_modify(cdb_handle_t db,
char *, uint32_t,
char *, char **,
char **, char *);
ci_err_t fscdb_failover_policy_delete(cdb_handle_t db, char *,
char *);
void fscdb_failover_policy_free(fs_config_failover_t *);
void fscdb_failover_policy_print(fs_config_failover_t *);
fs_config_failover_t *fscdb_failover_policy_query(cdb_handle_t db, char *,
ci_err_t *, char *);
ci_err_t fscdb_failover_policy_attribute_enumerate(cdb_handle_t,
ci_nlist_t *,
char *);
ci_err_t fscdb_failover_policy_enumerate(cdb_handle_t db,
ci_nlist_t *, char *);
ci_err_t fscdb_failover_policy_script_enumerate(cdb_handle_t db,
ci_nlist_t *,
char *);
/* Functions defined in libfs/src/config/resgroups.c */
ci_err_t fscdb_resgroup_add_resources(cdb_handle_t db,
char *, char *,
ci_nlist_t *, ci_nlist_t *,
char *);
ci_err_t fscdb_resgroup_delete_resources(cdb_handle_t db,
char *arg_cluster,
char *arg_resgroup,
ci_nlist_t *res_nlist,
char *errorstr);
boolean_t fscdb_resgroup_isdefined(cdb_handle_t db, char *,
char *, char *);
ci_err_t fscdb_resgroup_create_modify(cdb_handle_t db, char *,
char *, char *, char *);
ci_err_t fscdb_resgroup_delete(cdb_handle_t db, char *, char *,
char *);
fs_config_resgroup_t * fscdb_resgroup_query(cdb_handle_t db, char *, char *,
ci_err_t *, char *);
void fscdb_resgroup_free(fs_config_resgroup_t *);
void fscdb_resgroup_print(fs_config_resgroup_t *);
ci_err_t fscdb_resgroup_enumerate_resources(cdb_handle_t db,
char *, char *,
ci_nlist_t *,char *);
ci_err_t fscdb_resgroups_enumerate(cdb_handle_t db, char *,
ci_nlist_t *, char *);
#endif /* FS_CDBCONFIG_H */