2007-12-05 22:14:56 +00:00
|
|
|
#!/usr/bin/env perl
|
|
|
|
# IBM(c) 2007 EPL license http://www.eclipse.org/legal/epl-v10.html
|
|
|
|
package xCAT::GlobalDef;
|
|
|
|
|
|
|
|
#--------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
=head1 xCAT::GlobalDef
|
|
|
|
|
|
|
|
=head2 Package Description
|
|
|
|
|
|
|
|
This module contains all the global info for xCAT.
|
|
|
|
|
|
|
|
|
|
|
|
=cut
|
|
|
|
|
|
|
|
#--------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
2011-06-30 09:56:14 +00:00
|
|
|
# valid values for nodelist.hwtype column
|
2008-02-14 19:44:53 +00:00
|
|
|
$::NODETYPE_LPAR="lpar";
|
2008-02-14 19:15:37 +00:00
|
|
|
$::NODETYPE_BPA="bpa";
|
|
|
|
$::NODETYPE_FSP="fsp";
|
2008-03-28 15:41:33 +00:00
|
|
|
$::NODETYPE_HMC="hmc";
|
|
|
|
$::NODETYPE_IVM="ivm";
|
2010-12-07 05:50:21 +00:00
|
|
|
$::NODETYPE_FRAME="frame";
|
|
|
|
$::NODETYPE_CEC="cec";
|
2012-03-05 01:50:47 +00:00
|
|
|
$::NODETYPE_BLADE="blade";
|
2011-12-28 10:15:54 +00:00
|
|
|
$::NODETYPE_CMM="cmm";
|
2007-12-05 22:14:56 +00:00
|
|
|
|
2011-06-30 09:56:14 +00:00
|
|
|
# valid values for nodelist.nodetype column
|
|
|
|
$::NODETYPE_OSI="osi";
|
|
|
|
$::NODETYPE_PPC="ppc";
|
|
|
|
$::NODETYPE_ZVM="zvm";
|
2011-12-28 10:15:54 +00:00
|
|
|
$::NODETYPE_MP="mp";
|
2011-06-30 09:56:14 +00:00
|
|
|
|
2012-10-11 08:48:20 +00:00
|
|
|
#valid values for nodelist.updatestatus
|
|
|
|
$::STATUS_SYNCING="syncing";
|
|
|
|
$::STATUS_OUT_OF_SYNC="out-of-sync";
|
|
|
|
$::STATUS_SYNCED="synced";
|
2013-05-29 11:31:59 +00:00
|
|
|
$::STATUS_FAILED="failed";
|
2012-10-11 08:48:20 +00:00
|
|
|
|
|
|
|
|
2007-12-05 22:14:56 +00:00
|
|
|
# valid values for nodelist.status columns or other status
|
2008-09-17 19:06:45 +00:00
|
|
|
$::STATUS_ACTIVE="alive";
|
|
|
|
$::STATUS_INACTIVE="unreachable";
|
|
|
|
$::STATUS_INSTALLING="installing";
|
|
|
|
$::STATUS_INSTALLED="installed";
|
|
|
|
$::STATUS_BOOTING="booting";
|
|
|
|
$::STATUS_NETBOOTING="netbooting";
|
|
|
|
$::STATUS_BOOTED="booted";
|
|
|
|
$::STATUS_POWERING_OFF="powering-off";
|
|
|
|
$::STATUS_DISCOVERING="discovering";
|
2008-09-30 20:00:46 +00:00
|
|
|
$::STATUS_CONFIGURING="configuring";
|
|
|
|
$::STATUS_STANDING_BY="standingby";
|
|
|
|
$::STATUS_SHELL="shell";
|
2008-09-25 03:04:56 +00:00
|
|
|
$::STATUS_DEFINED="defined";
|
2007-12-05 22:14:56 +00:00
|
|
|
$::STATUS_UNKNOWN="unknown";
|
2012-09-14 03:07:13 +00:00
|
|
|
$::STATUS_FAILED="failed";
|
2014-01-13 12:54:05 +00:00
|
|
|
$::STATUS_BMCREADY="bmcready";
|
2012-08-24 17:12:57 +00:00
|
|
|
%::VALID_STATUS_VALUES = (
|
|
|
|
$::STATUS_ACTIVE=>1,
|
|
|
|
$::STATUS_INACTIVE=>1,
|
|
|
|
$::STATUS_INSTALLING=>1,
|
|
|
|
$::STATUS_INSTALLED=>1,
|
|
|
|
$::STATUS_BOOTING=>1,
|
|
|
|
$::STATUS_NETBOOTING=>1,
|
|
|
|
$::STATUS_BOOTED=>1,
|
|
|
|
$::STATUS_POWERING_OFF=>1,
|
|
|
|
$::STATUS_DISCOVERING=>1,
|
|
|
|
$::STATUS_CONFIGURING=>1,
|
|
|
|
$::STATUS_STANDING_BY=>1,
|
|
|
|
$::STATUS_SHELL=>1,
|
|
|
|
$::STATUS_DEFINED=>1,
|
|
|
|
$::STATUS_UNKNOWN=>1,
|
2012-09-14 03:07:13 +00:00
|
|
|
$::STATUS_FAILED=>1,
|
2014-01-13 12:54:05 +00:00
|
|
|
$::STATUS_BMCREADY=>1,
|
2012-10-11 08:48:20 +00:00
|
|
|
|
|
|
|
$::STATUS_SYNCING=>1,
|
|
|
|
$::STATUS_OUT_OF_SYNC=>1,
|
|
|
|
$::STATUS_SYNCED=>1,
|
2012-08-24 17:12:57 +00:00
|
|
|
);
|
2007-12-05 22:14:56 +00:00
|
|
|
|
2008-09-30 20:00:46 +00:00
|
|
|
#defined->[discovering]->[configuring]->[standingby]->installing->[installed]->booting->alive, defined->[discovering]->[configuring]-[standingby]->netbooting->booted->alive, alive/unreachable->booting->alive, powering-off->unreachable, alive->unreachable
|
2008-09-25 03:04:56 +00:00
|
|
|
%::NEXT_NODESTAT_VAL=(
|
2008-09-30 20:00:46 +00:00
|
|
|
$::STATUS_DEFINED=>{$::STATUS_DISCOVERING=>1, $::STATUS_INSTALLING=>1, $::STATUS_NETBOOTING=>1, $::STATUS_POWERING_OFF=>1, $::STATUS_BOOTING=>1, $::STATUS_CONFIGURING=>1},
|
|
|
|
$::STATUS_DISCOVERING=>{$::STATUS_INSTALLING=>1, $::STATUS_NETBOOTING=>1, $::STATUS_CONFIGURING=>1, $::STATUS_BOOTING=>1},
|
|
|
|
$::STATUS_CONFIGURING=>{$::STATUS_INSTALLING=>1, $::STATUS_NETBOOTING=>1, $::STATUS_STANDING_BY=>1},
|
|
|
|
$::STATUS_INSTALLING =>{$::STATUS_INSTALLED=>1, $::STATUS_BOOTING=>1},
|
2008-09-29 14:53:58 +00:00
|
|
|
$::STATUS_INSTALLED =>{$::STATUS_BOOTING=>1},
|
2008-09-30 20:00:46 +00:00
|
|
|
$::STATUS_BOOTING=>{$::STATUS_BOOTED=>1, $::STATUS_ACTIVE=>1, $::STATUS_INACTIVE=>1},
|
2008-09-25 03:04:56 +00:00
|
|
|
$::STATUS_NETBOOTING=>{$::STATUS_BOOTED=>1},
|
|
|
|
$::STATUS_BOOTED=>{$::STATUS_ACTIVE=>1, $::STATUS_INACTIVE=>1},
|
2008-09-30 20:00:46 +00:00
|
|
|
$::STATUS_ACTIVE=>{$::STATUS_INACTIVE=>1, $::STATUS_DISCOVERING=>1, $::STATUS_CONFIGURING=>1, $::STATUS_INSTALLING=>1, $::STATUS_NETBOOTING=>1, $::STATUS_POWERING_OFF=>1, $::STATUS_BOOTING=>1},
|
|
|
|
$::STATUS_INACTIVE=>{$::STATUS_ACTIVE=>1, $::STATUS_DISCOVERING=>1, $::STATUS_CONFIGURING=>1, $::STATUS_INSTALLING=>1, $::STATUS_NETBOOTING=>1, $::STATUS_POWERING_OFF=>1, $::STATUS_BOOTING=>1},
|
2008-09-25 03:04:56 +00:00
|
|
|
$::STATUS_POWERING_OFF=>{$::STATUS_INACTIVE=>1}
|
|
|
|
);
|
|
|
|
|
|
|
|
|
2007-12-05 22:14:56 +00:00
|
|
|
1;
|
|
|
|
|