/*
* 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.1 of the GNU Lesser 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 Lesser 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
*/
/*
* ci_camvalues.h
*
* This file contains macros for values returned by CAM/SRM and
* CAM/CMS plugins
*/
#ifndef CI_CAMVALUES_H
#define CI_CAMVALUES_H
#ident "$Id: ci_camvalues.h,v 1.2 2000/10/31 00:13:35 vasa Exp $"
#include <sys/types.h>
#include <netinet/in.h>
#include <ci_log.h>
#include <ci_param.h>
#include <ci_types.h>
#include <ci_clock.h>
#include <cms_types.h>
#include <srm.h>
/* FileSystem status */
#define CI_FS_INACTIVE 0 /* String equivalent "INACTIVE" */
#define CI_FS_DOWN 1 /* String equivalent "DOWN" */
#define CI_FS_UP 2 /* String equivalent "UP" */
#define CI_FS_UNKNOWN 3 /* String equivalent "UNKNOWN" */
/* Machine status */
#define CI_MS_INACTIVE 0 /* String equivalent "INACTIVE" */
#define CI_MS_DOWN 1 /* String equivalent "DOWN" */
#define CI_MS_UP 2 /* String equivalent "UP" */
#define CI_MS_UNKNOWN 3 /* String equivalent "UNKNOWN" */
/* Cluster status */
#define CI_CS_INACTIVE 0 /* String equivalent "INACTIVE" */
#define CI_CS_ACTIVE 1 /* String equivalent "ACTIVE" */
#define CI_CS_UNKNOWN 2 /* String equivalent "UNKNOWN */
/* Resource states (values for CICLI_RESOURCE_STATE) */
#define CI_RS_ALLOCATEREQ SRS_ALLOCATE_REQUEST /* Online pending */
#define CI_RS_ALLOCATINGPROP SRS_ALLOCATING_PROPOSAL /* Online pending */
#define CI_RS_ALLOCATING SRS_ALLOCATING /* Online pending */
#define CI_RS_ALLOCATEDPROP SRS_ALLOCATED_PROPOSAL /* Online pending */
#define CI_RS_ALLOCATED SRS_ALLOCATED /* Online */
#define CI_RS_RELEASEREQ SRS_RELEASE_REQUEST /* Offline pending */
#define CI_RS_RELEASINGPROP SRS_RELEASING_PROPOSAL /* Offline pending */
#define CI_RS_RELEASING SRS_RELEASING /* Offline pending */
#define CI_RS_RELEASEDPROP SRS_RELEASED_PROPOSAL /* Offline pending */
#define CI_RS_RELEASED SRS_RELEASED /* Offline */
#define CI_RS_NEW SRS_NEW /* Offline */
#define CI_RS_MAINTENANCE SRS_MAINTENANCE /* Online Maintenance */
/* Resource errors (values for CICLI_RESOURCE_ERROR) - bitmasks. Multiple
* values could be set */
#define CI_RE_NONE SRERR_NONE /* No resource error */
#define CI_RE_UNKNOWN SRERR_NODE_UNKNOWN /* Resource is
* allocated in a node
* that is in UNKNOWN
* state */
#define CI_RE_NOSRM SRERR_SRM_PULSEFAIL /* Resource is
* allocated in a node
* and SRM daemon
* has failed in that
* node */
#define CI_RE_MONFAIL SRERR_MONITOR_FAILURE /* Resource monitoring
* failure */
#define CI_RE_EXECFAILURE SRERR_ACTIONERROR /* Resource action
* failed */
/* Resource flags (values for CICLI_RESOURCE_FLAGS) - bitmasks. Multiple
* values could be set */
#define CI_RF_NOMONITOR SRFL_NOMONITOR /* Resource is not monitored locally */
#define CI_RF_MONITOR SRFL_MONITOR /* Resource is being monitored * locally */
#define CI_RF_FORCEREL SRFL_FORCEREL /* Resource has been released using
* force option */
#define CI_RF_RESTART SRFL_RESTART /* Resource has been failed over
* locally */
/* Prototypes */
ci_machine_status_t ci_cms_info_to_machine_status(cms_info_t *);
char * ci_machine_status_to_string(ci_machine_status_t);
char * ci_cluster_status_to_string(ci_cluster_status_t);
char * ci_filesystem_status_to_string(ci_filesystem_status_t);
#endif /* CI_CAMVALUES_H */