mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-06-12 17:30:19 +00:00
Merge pull request #2623 from cxhong/2615
Handle bad return code from pdu commands
This commit is contained in:
@ -50,13 +50,13 @@ passwd Attributes:
|
||||
|
||||
\ **password**\
|
||||
|
||||
The default password for this type of component. On Linux, a crypted form could be provided. Hashes starting with $1$, $5$ and $6$ (md5, sha256 and sha512 respectively) are supported.
|
||||
The default password for this type of component
|
||||
|
||||
|
||||
|
||||
\ **cryptmethod**\
|
||||
|
||||
Indicates the method to use to encrypt the password attribute. On AIX systems, if a value is provided for this attribute it indicates that the password attribute is encrypted. If the cryptmethod value is not set it indicates the password is a simple string value. On Linux systems, the cryptmethod can be set to md5, sha256 or sha512. If not set, sha256 will be used as default to encrypt plain-text passwords.
|
||||
Indicates the method that was used to encrypt the password attribute. On AIX systems, if a value is provided for this attribute it indicates that the password attribute is encrypted. If the cryptmethod value is not set it indicates the password is a simple string value. On Linux systems, the cryptmethod can be set to md5, sha256 or sha512. If not set, sha256 will be used as default.
|
||||
|
||||
|
||||
|
||||
|
@ -19,7 +19,7 @@ SYNOPSIS
|
||||
********
|
||||
|
||||
|
||||
\ **pdu Attributes:**\ \ *pdu*\ , \ *machinetype*\ , \ *modelnum*\ , \ *serialnum*\ , \ *outletCount*\ , \ *comments*\ , \ *disable*\
|
||||
\ **pdu Attributes:**\ \ *node*\ , \ *nodetype*\ , \ *outlet*\ , \ *machinetype*\ , \ *modelnum*\ , \ *serialnum*\ , \ *comments*\ , \ *disable*\
|
||||
|
||||
|
||||
***********
|
||||
@ -36,12 +36,24 @@ pdu Attributes:
|
||||
|
||||
|
||||
|
||||
\ **pdu**\
|
||||
\ **node**\
|
||||
|
||||
The hostname/address of the pdu to which the settings apply
|
||||
|
||||
|
||||
|
||||
\ **nodetype**\
|
||||
|
||||
The node type should be pdu
|
||||
|
||||
|
||||
|
||||
\ **outlet**\
|
||||
|
||||
The pdu outlet count
|
||||
|
||||
|
||||
|
||||
\ **machinetype**\
|
||||
|
||||
The pdu machine type
|
||||
@ -60,16 +72,16 @@ pdu Attributes:
|
||||
|
||||
|
||||
|
||||
\ **outletCount**\
|
||||
|
||||
|
||||
|
||||
\ **comments**\
|
||||
|
||||
|
||||
Any user-written notes.
|
||||
|
||||
|
||||
|
||||
\ **disable**\
|
||||
|
||||
|
||||
Set to 'yes' or '1' to comment out this row.
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -288,6 +288,10 @@ osimage(7)|osimage.7
|
||||
|
||||
|
||||
|
||||
pdu(7)|pdu.7
|
||||
|
||||
|
||||
|
||||
policy(7)|policy.7
|
||||
|
||||
|
||||
|
@ -19,7 +19,7 @@ SYNOPSIS
|
||||
********
|
||||
|
||||
|
||||
\ **group Attributes:**\ \ *addkcmdline*\ , \ *arch*\ , \ *authdomain*\ , \ *bmc*\ , \ *bmcpassword*\ , \ *bmcport*\ , \ *bmcusername*\ , \ *bmcvlantag*\ , \ *cfgmgr*\ , \ *cfgmgtroles*\ , \ *cfgserver*\ , \ *chain*\ , \ *chassis*\ , \ *cmdmapping*\ , \ *cons*\ , \ *conserver*\ , \ *consoleondemand*\ , \ *cpucount*\ , \ *cputype*\ , \ *currchain*\ , \ *currstate*\ , \ *dhcpinterfaces*\ , \ *disksize*\ , \ *displayname*\ , \ *dockercpus*\ , \ *dockerflag*\ , \ *dockerhost*\ , \ *dockermemory*\ , \ *dockernics*\ , \ *domainadminpassword*\ , \ *domainadminuser*\ , \ *domaintype*\ , \ *getmac*\ , \ *groupname*\ , \ *grouptype*\ , \ *hcp*\ , \ *height*\ , \ *hostcluster*\ , \ *hostinterface*\ , \ *hostmanager*\ , \ *hostnames*\ , \ *hosttype*\ , \ *hwtype*\ , \ *id*\ , \ *initrd*\ , \ *installnic*\ , \ *interface*\ , \ *ip*\ , \ *iscsipassword*\ , \ *iscsiserver*\ , \ *iscsitarget*\ , \ *iscsiuserid*\ , \ *kcmdline*\ , \ *kernel*\ , \ *linkports*\ , \ *mac*\ , \ *machinetype*\ , \ *membergroups*\ , \ *members*\ , \ *memory*\ , \ *mgt*\ , \ *micbridge*\ , \ *michost*\ , \ *micid*\ , \ *miconboot*\ , \ *micpowermgt*\ , \ *micvlog*\ , \ *migrationdest*\ , \ *modelnum*\ , \ *monserver*\ , \ *mpa*\ , \ *mtm*\ , \ *nameservers*\ , \ *netboot*\ , \ *nfsdir*\ , \ *nfsserver*\ , \ *nicaliases*\ , \ *niccustomscripts*\ , \ *nicdevices*\ , \ *nicextraparams*\ , \ *nichostnameprefixes*\ , \ *nichostnamesuffixes*\ , \ *nicips*\ , \ *nicnetworks*\ , \ *nicsadapter*\ , \ *nictypes*\ , \ *nimserver*\ , \ *nodetype*\ , \ *ondiscover*\ , \ *os*\ , \ *osvolume*\ , \ *otherinterfaces*\ , \ *ou*\ , \ *outletcount*\ , \ *parent*\ , \ *passwd.HMC*\ , \ *passwd.admin*\ , \ *passwd.celogin*\ , \ *passwd.general*\ , \ *passwd.hscroot*\ , \ *password*\ , \ *pdu*\ , \ *postbootscripts*\ , \ *postscripts*\ , \ *power*\ , \ *pprofile*\ , \ *prescripts-begin*\ , \ *prescripts-end*\ , \ *primarynic*\ , \ *productkey*\ , \ *profile*\ , \ *protocol*\ , \ *provmethod*\ , \ *rack*\ , \ *room*\ , \ *routenames*\ , \ *serial*\ , \ *serialflow*\ , \ *serialnum*\ , \ *serialport*\ , \ *serialspeed*\ , \ *servicenode*\ , \ *setupconserver*\ , \ *setupdhcp*\ , \ *setupftp*\ , \ *setupipforward*\ , \ *setupldap*\ , \ *setupnameserver*\ , \ *setupnfs*\ , \ *setupnim*\ , \ *setupntp*\ , \ *setupproxydhcp*\ , \ *setuptftp*\ , \ *sfp*\ , \ *side*\ , \ *slot*\ , \ *slotid*\ , \ *slots*\ , \ *snmpauth*\ , \ *snmppassword*\ , \ *snmpprivacy*\ , \ *snmpusername*\ , \ *snmpversion*\ , \ *storagcontroller*\ , \ *storagetype*\ , \ *supernode*\ , \ *supportedarchs*\ , \ *supportproxydhcp*\ , \ *switch*\ , \ *switchinterface*\ , \ *switchport*\ , \ *switchtype*\ , \ *switchvlan*\ , \ *syslog*\ , \ *termport*\ , \ *termserver*\ , \ *tftpdir*\ , \ *tftpserver*\ , \ *unit*\ , \ *urlpath*\ , \ *usercomment*\ , \ *userid*\ , \ *username*\ , \ *vmbeacon*\ , \ *vmbootorder*\ , \ *vmcfgstore*\ , \ *vmcluster*\ , \ *vmcpus*\ , \ *vmhost*\ , \ *vmmanager*\ , \ *vmmaster*\ , \ *vmmemory*\ , \ *vmnicnicmodel*\ , \ *vmnics*\ , \ *vmothersetting*\ , \ *vmphyslots*\ , \ *vmstorage*\ , \ *vmstoragecache*\ , \ *vmstorageformat*\ , \ *vmstoragemodel*\ , \ *vmtextconsole*\ , \ *vmvirtflags*\ , \ *vmvncport*\ , \ *webport*\ , \ *wherevals*\ , \ *xcatmaster*\
|
||||
\ **group Attributes:**\ \ *addkcmdline*\ , \ *arch*\ , \ *authdomain*\ , \ *bmc*\ , \ *bmcpassword*\ , \ *bmcport*\ , \ *bmcusername*\ , \ *bmcvlantag*\ , \ *cfgmgr*\ , \ *cfgmgtroles*\ , \ *cfgserver*\ , \ *chain*\ , \ *chassis*\ , \ *cmdmapping*\ , \ *cons*\ , \ *conserver*\ , \ *consoleondemand*\ , \ *cpucount*\ , \ *cputype*\ , \ *currchain*\ , \ *currstate*\ , \ *dhcpinterfaces*\ , \ *disksize*\ , \ *displayname*\ , \ *dockercpus*\ , \ *dockerflag*\ , \ *dockerhost*\ , \ *dockermemory*\ , \ *dockernics*\ , \ *domainadminpassword*\ , \ *domainadminuser*\ , \ *domaintype*\ , \ *getmac*\ , \ *groupname*\ , \ *grouptype*\ , \ *hcp*\ , \ *height*\ , \ *hostcluster*\ , \ *hostinterface*\ , \ *hostmanager*\ , \ *hostnames*\ , \ *hosttype*\ , \ *hwtype*\ , \ *id*\ , \ *initrd*\ , \ *installnic*\ , \ *interface*\ , \ *ip*\ , \ *iscsipassword*\ , \ *iscsiserver*\ , \ *iscsitarget*\ , \ *iscsiuserid*\ , \ *kcmdline*\ , \ *kernel*\ , \ *linkports*\ , \ *mac*\ , \ *machinetype*\ , \ *membergroups*\ , \ *members*\ , \ *memory*\ , \ *mgt*\ , \ *micbridge*\ , \ *michost*\ , \ *micid*\ , \ *miconboot*\ , \ *micpowermgt*\ , \ *micvlog*\ , \ *migrationdest*\ , \ *modelnum*\ , \ *monserver*\ , \ *mpa*\ , \ *mtm*\ , \ *nameservers*\ , \ *netboot*\ , \ *nfsdir*\ , \ *nfsserver*\ , \ *nicaliases*\ , \ *niccustomscripts*\ , \ *nicdevices*\ , \ *nicextraparams*\ , \ *nichostnameprefixes*\ , \ *nichostnamesuffixes*\ , \ *nicips*\ , \ *nicnetworks*\ , \ *nicsadapter*\ , \ *nictypes*\ , \ *nimserver*\ , \ *nodetype*\ , \ *ondiscover*\ , \ *os*\ , \ *osvolume*\ , \ *otherinterfaces*\ , \ *ou*\ , \ *outlet*\ , \ *parent*\ , \ *passwd.HMC*\ , \ *passwd.admin*\ , \ *passwd.celogin*\ , \ *passwd.general*\ , \ *passwd.hscroot*\ , \ *password*\ , \ *pdu*\ , \ *postbootscripts*\ , \ *postscripts*\ , \ *power*\ , \ *pprofile*\ , \ *prescripts-begin*\ , \ *prescripts-end*\ , \ *primarynic*\ , \ *productkey*\ , \ *profile*\ , \ *protocol*\ , \ *provmethod*\ , \ *rack*\ , \ *room*\ , \ *routenames*\ , \ *serial*\ , \ *serialflow*\ , \ *serialnum*\ , \ *serialport*\ , \ *serialspeed*\ , \ *servicenode*\ , \ *setupconserver*\ , \ *setupdhcp*\ , \ *setupftp*\ , \ *setupipforward*\ , \ *setupldap*\ , \ *setupnameserver*\ , \ *setupnfs*\ , \ *setupnim*\ , \ *setupntp*\ , \ *setupproxydhcp*\ , \ *setuptftp*\ , \ *sfp*\ , \ *side*\ , \ *slot*\ , \ *slotid*\ , \ *slots*\ , \ *snmpauth*\ , \ *snmppassword*\ , \ *snmpprivacy*\ , \ *snmpusername*\ , \ *snmpversion*\ , \ *storagcontroller*\ , \ *storagetype*\ , \ *supernode*\ , \ *supportedarchs*\ , \ *supportproxydhcp*\ , \ *switch*\ , \ *switchinterface*\ , \ *switchport*\ , \ *switchtype*\ , \ *switchvlan*\ , \ *syslog*\ , \ *termport*\ , \ *termserver*\ , \ *tftpdir*\ , \ *tftpserver*\ , \ *unit*\ , \ *urlpath*\ , \ *usercomment*\ , \ *userid*\ , \ *username*\ , \ *vmbeacon*\ , \ *vmbootorder*\ , \ *vmcfgstore*\ , \ *vmcluster*\ , \ *vmcpus*\ , \ *vmhost*\ , \ *vmmanager*\ , \ *vmmaster*\ , \ *vmmemory*\ , \ *vmnicnicmodel*\ , \ *vmnics*\ , \ *vmothersetting*\ , \ *vmphyslots*\ , \ *vmstorage*\ , \ *vmstoragecache*\ , \ *vmstorageformat*\ , \ *vmstoragemodel*\ , \ *vmtextconsole*\ , \ *vmvirtflags*\ , \ *vmvncport*\ , \ *webport*\ , \ *wherevals*\ , \ *xcatmaster*\
|
||||
|
||||
|
||||
***********
|
||||
@ -663,10 +663,14 @@ group Attributes:
|
||||
|
||||
|
||||
|
||||
\ **nodetype**\ (nodetype.nodetype)
|
||||
\ **nodetype**\ (nodetype.nodetype, pdu.nodetype)
|
||||
|
||||
A comma-delimited list of characteristics of this node. Valid values: ppc, blade, vm (virtual machine), osi (OS image), mm, mn, rsa, switch.
|
||||
|
||||
or
|
||||
|
||||
The node type should be pdu
|
||||
|
||||
|
||||
|
||||
\ **ondiscover**\ (chain.ondiscover)
|
||||
@ -707,7 +711,7 @@ group Attributes:
|
||||
|
||||
|
||||
|
||||
\ **outletcount**\ (pdu.outletcount)
|
||||
\ **outlet**\ (pdu.outlet)
|
||||
|
||||
The pdu outlet count
|
||||
|
||||
|
@ -19,7 +19,7 @@ SYNOPSIS
|
||||
********
|
||||
|
||||
|
||||
\ **node Attributes:**\ \ *addkcmdline*\ , \ *appstatus*\ , \ *appstatustime*\ , \ *arch*\ , \ *authdomain*\ , \ *bmc*\ , \ *bmcpassword*\ , \ *bmcport*\ , \ *bmcusername*\ , \ *bmcvlantag*\ , \ *cfgmgr*\ , \ *cfgmgtroles*\ , \ *cfgserver*\ , \ *chain*\ , \ *chassis*\ , \ *cmdmapping*\ , \ *cons*\ , \ *conserver*\ , \ *consoleondemand*\ , \ *cpucount*\ , \ *cputype*\ , \ *currchain*\ , \ *currstate*\ , \ *dhcpinterfaces*\ , \ *disksize*\ , \ *displayname*\ , \ *dockercpus*\ , \ *dockerflag*\ , \ *dockerhost*\ , \ *dockermemory*\ , \ *dockernics*\ , \ *domainadminpassword*\ , \ *domainadminuser*\ , \ *domaintype*\ , \ *getmac*\ , \ *groups*\ , \ *hcp*\ , \ *height*\ , \ *hidden*\ , \ *hostcluster*\ , \ *hostinterface*\ , \ *hostmanager*\ , \ *hostnames*\ , \ *hosttype*\ , \ *hwtype*\ , \ *id*\ , \ *initrd*\ , \ *installnic*\ , \ *interface*\ , \ *ip*\ , \ *iscsipassword*\ , \ *iscsiserver*\ , \ *iscsitarget*\ , \ *iscsiuserid*\ , \ *kcmdline*\ , \ *kernel*\ , \ *linkports*\ , \ *mac*\ , \ *machinetype*\ , \ *memory*\ , \ *mgt*\ , \ *micbridge*\ , \ *michost*\ , \ *micid*\ , \ *miconboot*\ , \ *micpowermgt*\ , \ *micvlog*\ , \ *migrationdest*\ , \ *modelnum*\ , \ *monserver*\ , \ *mpa*\ , \ *mtm*\ , \ *nameservers*\ , \ *netboot*\ , \ *nfsdir*\ , \ *nfsserver*\ , \ *nicaliases*\ , \ *niccustomscripts*\ , \ *nicdevices*\ , \ *nicextraparams*\ , \ *nichostnameprefixes*\ , \ *nichostnamesuffixes*\ , \ *nicips*\ , \ *nicnetworks*\ , \ *nicsadapter*\ , \ *nictypes*\ , \ *nimserver*\ , \ *node*\ , \ *nodetype*\ , \ *ondiscover*\ , \ *os*\ , \ *osvolume*\ , \ *otherinterfaces*\ , \ *ou*\ , \ *outletcount*\ , \ *parent*\ , \ *passwd.HMC*\ , \ *passwd.admin*\ , \ *passwd.celogin*\ , \ *passwd.general*\ , \ *passwd.hscroot*\ , \ *password*\ , \ *pdu*\ , \ *postbootscripts*\ , \ *postscripts*\ , \ *power*\ , \ *pprofile*\ , \ *prescripts-begin*\ , \ *prescripts-end*\ , \ *primarynic*\ , \ *primarysn*\ , \ *productkey*\ , \ *profile*\ , \ *protocol*\ , \ *provmethod*\ , \ *rack*\ , \ *room*\ , \ *routenames*\ , \ *serial*\ , \ *serialflow*\ , \ *serialnum*\ , \ *serialport*\ , \ *serialspeed*\ , \ *servicenode*\ , \ *setupconserver*\ , \ *setupdhcp*\ , \ *setupftp*\ , \ *setupipforward*\ , \ *setupldap*\ , \ *setupnameserver*\ , \ *setupnfs*\ , \ *setupnim*\ , \ *setupntp*\ , \ *setupproxydhcp*\ , \ *setuptftp*\ , \ *sfp*\ , \ *side*\ , \ *slot*\ , \ *slotid*\ , \ *slots*\ , \ *snmpauth*\ , \ *snmppassword*\ , \ *snmpprivacy*\ , \ *snmpusername*\ , \ *snmpversion*\ , \ *status*\ , \ *statustime*\ , \ *storagcontroller*\ , \ *storagetype*\ , \ *supernode*\ , \ *supportedarchs*\ , \ *supportproxydhcp*\ , \ *switch*\ , \ *switchinterface*\ , \ *switchport*\ , \ *switchtype*\ , \ *switchvlan*\ , \ *syslog*\ , \ *termport*\ , \ *termserver*\ , \ *tftpdir*\ , \ *tftpserver*\ , \ *unit*\ , \ *updatestatus*\ , \ *updatestatustime*\ , \ *urlpath*\ , \ *usercomment*\ , \ *userid*\ , \ *username*\ , \ *vmbeacon*\ , \ *vmbootorder*\ , \ *vmcfgstore*\ , \ *vmcluster*\ , \ *vmcpus*\ , \ *vmhost*\ , \ *vmmanager*\ , \ *vmmaster*\ , \ *vmmemory*\ , \ *vmnicnicmodel*\ , \ *vmnics*\ , \ *vmothersetting*\ , \ *vmphyslots*\ , \ *vmstorage*\ , \ *vmstoragecache*\ , \ *vmstorageformat*\ , \ *vmstoragemodel*\ , \ *vmtextconsole*\ , \ *vmvirtflags*\ , \ *vmvncport*\ , \ *webport*\ , \ *xcatmaster*\ , \ *zonename*\
|
||||
\ **node Attributes:**\ \ *addkcmdline*\ , \ *appstatus*\ , \ *appstatustime*\ , \ *arch*\ , \ *authdomain*\ , \ *bmc*\ , \ *bmcpassword*\ , \ *bmcport*\ , \ *bmcusername*\ , \ *bmcvlantag*\ , \ *cfgmgr*\ , \ *cfgmgtroles*\ , \ *cfgserver*\ , \ *chain*\ , \ *chassis*\ , \ *cmdmapping*\ , \ *cons*\ , \ *conserver*\ , \ *consoleondemand*\ , \ *cpucount*\ , \ *cputype*\ , \ *currchain*\ , \ *currstate*\ , \ *dhcpinterfaces*\ , \ *disksize*\ , \ *displayname*\ , \ *dockercpus*\ , \ *dockerflag*\ , \ *dockerhost*\ , \ *dockermemory*\ , \ *dockernics*\ , \ *domainadminpassword*\ , \ *domainadminuser*\ , \ *domaintype*\ , \ *getmac*\ , \ *groups*\ , \ *hcp*\ , \ *height*\ , \ *hidden*\ , \ *hostcluster*\ , \ *hostinterface*\ , \ *hostmanager*\ , \ *hostnames*\ , \ *hosttype*\ , \ *hwtype*\ , \ *id*\ , \ *initrd*\ , \ *installnic*\ , \ *interface*\ , \ *ip*\ , \ *iscsipassword*\ , \ *iscsiserver*\ , \ *iscsitarget*\ , \ *iscsiuserid*\ , \ *kcmdline*\ , \ *kernel*\ , \ *linkports*\ , \ *mac*\ , \ *machinetype*\ , \ *memory*\ , \ *mgt*\ , \ *micbridge*\ , \ *michost*\ , \ *micid*\ , \ *miconboot*\ , \ *micpowermgt*\ , \ *micvlog*\ , \ *migrationdest*\ , \ *modelnum*\ , \ *monserver*\ , \ *mpa*\ , \ *mtm*\ , \ *nameservers*\ , \ *netboot*\ , \ *nfsdir*\ , \ *nfsserver*\ , \ *nicaliases*\ , \ *niccustomscripts*\ , \ *nicdevices*\ , \ *nicextraparams*\ , \ *nichostnameprefixes*\ , \ *nichostnamesuffixes*\ , \ *nicips*\ , \ *nicnetworks*\ , \ *nicsadapter*\ , \ *nictypes*\ , \ *nimserver*\ , \ *node*\ , \ *nodetype*\ , \ *ondiscover*\ , \ *os*\ , \ *osvolume*\ , \ *otherinterfaces*\ , \ *ou*\ , \ *outlet*\ , \ *parent*\ , \ *passwd.HMC*\ , \ *passwd.admin*\ , \ *passwd.celogin*\ , \ *passwd.general*\ , \ *passwd.hscroot*\ , \ *password*\ , \ *pdu*\ , \ *postbootscripts*\ , \ *postscripts*\ , \ *power*\ , \ *pprofile*\ , \ *prescripts-begin*\ , \ *prescripts-end*\ , \ *primarynic*\ , \ *primarysn*\ , \ *productkey*\ , \ *profile*\ , \ *protocol*\ , \ *provmethod*\ , \ *rack*\ , \ *room*\ , \ *routenames*\ , \ *serial*\ , \ *serialflow*\ , \ *serialnum*\ , \ *serialport*\ , \ *serialspeed*\ , \ *servicenode*\ , \ *setupconserver*\ , \ *setupdhcp*\ , \ *setupftp*\ , \ *setupipforward*\ , \ *setupldap*\ , \ *setupnameserver*\ , \ *setupnfs*\ , \ *setupnim*\ , \ *setupntp*\ , \ *setupproxydhcp*\ , \ *setuptftp*\ , \ *sfp*\ , \ *side*\ , \ *slot*\ , \ *slotid*\ , \ *slots*\ , \ *snmpauth*\ , \ *snmppassword*\ , \ *snmpprivacy*\ , \ *snmpusername*\ , \ *snmpversion*\ , \ *status*\ , \ *statustime*\ , \ *storagcontroller*\ , \ *storagetype*\ , \ *supernode*\ , \ *supportedarchs*\ , \ *supportproxydhcp*\ , \ *switch*\ , \ *switchinterface*\ , \ *switchport*\ , \ *switchtype*\ , \ *switchvlan*\ , \ *syslog*\ , \ *termport*\ , \ *termserver*\ , \ *tftpdir*\ , \ *tftpserver*\ , \ *unit*\ , \ *updatestatus*\ , \ *updatestatustime*\ , \ *urlpath*\ , \ *usercomment*\ , \ *userid*\ , \ *username*\ , \ *vmbeacon*\ , \ *vmbootorder*\ , \ *vmcfgstore*\ , \ *vmcluster*\ , \ *vmcpus*\ , \ *vmhost*\ , \ *vmmanager*\ , \ *vmmaster*\ , \ *vmmemory*\ , \ *vmnicnicmodel*\ , \ *vmnics*\ , \ *vmothersetting*\ , \ *vmphyslots*\ , \ *vmstorage*\ , \ *vmstoragecache*\ , \ *vmstorageformat*\ , \ *vmstoragemodel*\ , \ *vmtextconsole*\ , \ *vmvirtflags*\ , \ *vmvncport*\ , \ *webport*\ , \ *xcatmaster*\ , \ *zonename*\
|
||||
|
||||
|
||||
***********
|
||||
@ -669,10 +669,14 @@ node Attributes:
|
||||
|
||||
|
||||
|
||||
\ **nodetype**\ (nodetype.nodetype)
|
||||
\ **nodetype**\ (nodetype.nodetype, pdu.nodetype)
|
||||
|
||||
A comma-delimited list of characteristics of this node. Valid values: ppc, blade, vm (virtual machine), osi (OS image), mm, mn, rsa, switch.
|
||||
|
||||
or
|
||||
|
||||
The node type should be pdu
|
||||
|
||||
|
||||
|
||||
\ **ondiscover**\ (chain.ondiscover)
|
||||
@ -713,7 +717,7 @@ node Attributes:
|
||||
|
||||
|
||||
|
||||
\ **outletcount**\ (pdu.outletcount)
|
||||
\ **outlet**\ (pdu.outlet)
|
||||
|
||||
The pdu outlet count
|
||||
|
||||
|
85
docs/source/guides/admin-guides/references/man7/pdu.7.rst
Normal file
85
docs/source/guides/admin-guides/references/man7/pdu.7.rst
Normal file
@ -0,0 +1,85 @@
|
||||
|
||||
#####
|
||||
pdu.7
|
||||
#####
|
||||
|
||||
.. highlight:: perl
|
||||
|
||||
|
||||
****
|
||||
NAME
|
||||
****
|
||||
|
||||
|
||||
\ **pdu**\ - a logical object definition in the xCAT database.
|
||||
|
||||
|
||||
********
|
||||
SYNOPSIS
|
||||
********
|
||||
|
||||
|
||||
\ **pdu Attributes:**\ \ *machinetype*\ , \ *modelnum*\ , \ *node*\ , \ *nodetype*\ , \ *outlet*\ , \ *serialnum*\
|
||||
|
||||
|
||||
***********
|
||||
DESCRIPTION
|
||||
***********
|
||||
|
||||
|
||||
Logical objects of this type are stored in the xCAT database in one or more tables. Use the following commands
|
||||
to manipulate the objects: \ **mkdef**\ , \ **chdef**\ , \ **lsdef**\ , and \ **rmdef**\ . These commands will take care of
|
||||
knowing which tables the object attributes should be stored in. The attribute list below shows, in
|
||||
parentheses, what tables each attribute is stored in.
|
||||
|
||||
|
||||
***************
|
||||
pdu Attributes:
|
||||
***************
|
||||
|
||||
|
||||
|
||||
\ **machinetype**\ (pdu.machinetype)
|
||||
|
||||
The pdu machine type
|
||||
|
||||
|
||||
|
||||
\ **modelnum**\ (pdu.modelnum)
|
||||
|
||||
The pdu model number
|
||||
|
||||
|
||||
|
||||
\ **node**\ (pdu.node)
|
||||
|
||||
The hostname/address of the pdu to which the settings apply
|
||||
|
||||
|
||||
|
||||
\ **nodetype**\ (pdu.nodetype)
|
||||
|
||||
The node type should be pdu
|
||||
|
||||
|
||||
|
||||
\ **outlet**\ (pdu.outlet)
|
||||
|
||||
The pdu outlet count
|
||||
|
||||
|
||||
|
||||
\ **serialnum**\ (pdu.serialnum)
|
||||
|
||||
The pdu serial number
|
||||
|
||||
|
||||
|
||||
|
||||
********
|
||||
SEE ALSO
|
||||
********
|
||||
|
||||
|
||||
\ **mkdef(1)**\ , \ **chdef(1)**\ , \ **lsdef(1)**\ , \ **rmdef(1)**\
|
||||
|
@ -692,17 +692,19 @@ passed as argument rather than by table value',
|
||||
},
|
||||
},
|
||||
pdu => {
|
||||
cols => [qw(node nodetype machinetype modelnum serialnum outletCount comments disable)],
|
||||
cols => [qw(node nodetype outlet machinetype modelnum serialnum comments disable)],
|
||||
keys => [qw(node)],
|
||||
nodecol => "node",
|
||||
table_desc => 'Parameters to use when interrogating pdus',
|
||||
descriptions => {
|
||||
node => 'The hostname/address of the pdu to which the settings apply',
|
||||
nodetype => 'The node type should be pdu ',
|
||||
outlet => 'The pdu outlet count',
|
||||
machinetype => 'The pdu machine type',
|
||||
modelnum => 'The pdu model number',
|
||||
serialnum => 'The pdu serial number',
|
||||
outletcount => 'The pdu outlet count',
|
||||
comments => 'Any user-written notes.',
|
||||
disable => "Set to 'yes' or '1' to comment out this row.",
|
||||
},
|
||||
},
|
||||
switches => {
|
||||
@ -2892,6 +2894,11 @@ my @nodeattrs = (
|
||||
tabentry => 'pdu.nodetype',
|
||||
access_tabentry => 'pdu.node=attr:node',
|
||||
},
|
||||
{ attr_name => 'outlet',
|
||||
only_if => 'nodetype=pdu',
|
||||
tabentry => 'pdu.outlet',
|
||||
access_tabentry => 'pdu.node=attr:node',
|
||||
},
|
||||
{ attr_name => 'machinetype',
|
||||
only_if => 'nodetype=pdu',
|
||||
tabentry => 'pdu.machinetype',
|
||||
@ -2907,11 +2914,6 @@ my @nodeattrs = (
|
||||
tabentry => 'pdu.serialnum',
|
||||
access_tabentry => 'pdu.node=attr:node',
|
||||
},
|
||||
{ attr_name => 'outletcount',
|
||||
only_if => 'nodetype=pdu',
|
||||
tabentry => 'pdu.outletcount',
|
||||
access_tabentry => 'pdu.node=attr:node',
|
||||
},
|
||||
|
||||
#########################
|
||||
## switches table #
|
||||
@ -4133,6 +4135,11 @@ push(@{ $defspec{group}->{'attrs'} }, @nodeattrs);
|
||||
tabentry => 'pdu.nodetype',
|
||||
access_tabentry => 'pdu.node=attr:node',
|
||||
},
|
||||
{ attr_name => 'outlet',
|
||||
only_if => 'nodetype=pdu',
|
||||
tabentry => 'pdu.outlet',
|
||||
access_tabentry => 'pdu.node=attr:node',
|
||||
},
|
||||
{ attr_name => 'machinetype',
|
||||
only_if => 'nodetype=pdu',
|
||||
tabentry => 'pdu.machinetype',
|
||||
@ -4148,11 +4155,6 @@ push(@{ $defspec{group}->{'attrs'} }, @nodeattrs);
|
||||
tabentry => 'pdu.serialnum',
|
||||
access_tabentry => 'pdu.node=attr:node',
|
||||
},
|
||||
{ attr_name => 'outletcount',
|
||||
only_if => 'nodetype=pdu',
|
||||
tabentry => 'pdu.outletcount',
|
||||
access_tabentry => 'pdu.node=attr:node',
|
||||
},
|
||||
);
|
||||
|
||||
|
||||
|
@ -40,6 +40,10 @@ use SNMP;
|
||||
my $VERBOSE = 0;
|
||||
my %allerrornodes = ();
|
||||
my $callback;
|
||||
my $pdutab;
|
||||
my @pduents;
|
||||
my $pdunodes;
|
||||
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
@ -126,6 +130,11 @@ sub process_request
|
||||
@exargs = @$extrargs;
|
||||
}
|
||||
|
||||
#fill in the total outlet count for each pdu
|
||||
$pdutab = xCAT::Table->new('pdu');
|
||||
@pduents = $pdutab->getAllNodeAttribs(['node', 'outlet']);
|
||||
fill_outletCount(\@pduents, $callback);
|
||||
|
||||
if( $command eq "rinv") {
|
||||
#for higher performance, handle node in batch
|
||||
return powerstat($noderange, $callback);
|
||||
@ -154,8 +163,8 @@ sub process_request
|
||||
if(($subcmd eq 'on') || ($subcmd eq 'off') || ($subcmd eq 'stat') || ($subcmd eq 'state')){
|
||||
return powerpdu(\@allpdunodes, $subcmd, $callback);
|
||||
} else {
|
||||
my $pdunodes = join (",", @allpdunodes);
|
||||
$callback->({ errorcode => [1],error => "The option $subcmd is not support for pdu node(s) $pdunodes."});
|
||||
my $pdunode = join (",", @allpdunodes);
|
||||
$callback->({ errorcode => [1],error => "The option $subcmd is not support for pdu node(s) $pdunode."});
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -168,6 +177,31 @@ sub process_request
|
||||
return;
|
||||
}
|
||||
|
||||
sub fill_outletCount {
|
||||
my $pduentries = shift;
|
||||
my $callback = shift;
|
||||
my $outletoid = ".1.3.6.1.4.1.2.6.223.8.2.1.0";
|
||||
my $pdutab = xCAT::Table->new('pdu');
|
||||
|
||||
foreach my $pdu (@$pduentries) {
|
||||
my $cur_pdu = $pdu->{node};
|
||||
my $count = $pdu->{outlet};
|
||||
#get total outlet number for the pdu
|
||||
if (!$count) {
|
||||
my $session = connectTopdu($cur_pdu,$callback);
|
||||
#will not log this error to output
|
||||
if (!$session) {
|
||||
next;
|
||||
}
|
||||
$count = $session->get("$outletoid");
|
||||
if ($count) {
|
||||
$pdutab->setNodeAttribs($cur_pdu, {outlet => $count});
|
||||
}
|
||||
}
|
||||
$pdunodes->{$cur_pdu}->{outlet}=$count;
|
||||
}
|
||||
}
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head3 powerpdu
|
||||
@ -181,7 +215,6 @@ sub powerpdu {
|
||||
my $noderange = shift;
|
||||
my $subcmd = shift;
|
||||
my $callback = shift;
|
||||
my $outletnum = ".1.3.6.1.4.1.2.6.223.8.2.1.0";
|
||||
|
||||
if (($subcmd eq "stat") || ($subcmd eq "state")){
|
||||
return powerstat($noderange, $callback);
|
||||
@ -190,9 +223,10 @@ sub powerpdu {
|
||||
foreach my $node (@$noderange) {
|
||||
my $session = connectTopdu($node,$callback);
|
||||
if (!$session) {
|
||||
$callback->({ errorcode => [1],error => "Couldn't connect to $node"});
|
||||
next;
|
||||
}
|
||||
my $count = $session->get("$outletnum");
|
||||
my $count = $pdunodes->{$node}->{outlet};
|
||||
my $value;
|
||||
my $statstr;
|
||||
if ($subcmd eq "off") {
|
||||
@ -207,7 +241,7 @@ sub powerpdu {
|
||||
{
|
||||
outletpower($session, $outlet, $value);
|
||||
if ($session->{ErrorStr}) {
|
||||
$callback->({ error => "$session->{ErrorStr}"});
|
||||
$callback->({ errorcode => [1],error => "Failed to get outlet status for $node"});
|
||||
} else {
|
||||
my $output = " outlet $outlet is $statstr";
|
||||
xCAT::SvrUtils::sendmsg($output, $callback, $node, %allerrornodes);
|
||||
@ -252,6 +286,11 @@ sub powerpduoutlet {
|
||||
my ($pdu, $outlet) = split /:/, $pdu_outlet;
|
||||
my $session = connectTopdu($pdu,$callback);
|
||||
if (!$session) {
|
||||
$callback->({ errorcode => [1],error => "Couldn't connect to $pdu"});
|
||||
next;
|
||||
}
|
||||
if ($outlet > $pdunodes->{$pdu}->{outlet} ) {
|
||||
$callback->({ errorcode => [1],error => "outlet number $outlet is invalid for $pdu"});
|
||||
next;
|
||||
}
|
||||
my $cmd;
|
||||
@ -270,7 +309,7 @@ sub powerpduoutlet {
|
||||
}
|
||||
|
||||
if ($session->{ErrorStr}) {
|
||||
$callback->({ error => "$session->{ErrorStr}"});
|
||||
$callback->({ errorcode => [1],error => "$session->{ErrorStr} for $pdu outlet $outlet"});
|
||||
} else {
|
||||
$output = "$pdu outlet $outlet is $statstr";
|
||||
xCAT::SvrUtils::sendmsg($output, $callback, $node, %allerrornodes);
|
||||
@ -314,13 +353,13 @@ sub powerstat {
|
||||
my $callback = shift;
|
||||
my $output;
|
||||
|
||||
my $outletnum = ".1.3.6.1.4.1.2.6.223.8.2.1.0";
|
||||
foreach my $pdu (@$noderange) {
|
||||
my $session = connectTopdu($pdu,$callback);
|
||||
if (!$session) {
|
||||
$callback->({ errorcode => [1],error => "Couldn't connect to $pdu"});
|
||||
next;
|
||||
}
|
||||
my $count = $session->get("$outletnum");
|
||||
my $count = $pdunodes->{$pdu}->{outlet};
|
||||
for (my $outlet =1; $outlet <= $count; $outlet++)
|
||||
{
|
||||
my $statstr = outletstat($session, $outlet);
|
||||
@ -350,8 +389,10 @@ sub outletstat {
|
||||
$output = $session->get("$oid.$outlet");
|
||||
if ($output eq 1) {
|
||||
$statstr = "on";
|
||||
} else {
|
||||
} elsif ($output eq 0) {
|
||||
$statstr = "off";
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
return $statstr;
|
||||
}
|
||||
@ -381,8 +422,6 @@ sub connectTopdu {
|
||||
UseSprintValue => 1,
|
||||
);
|
||||
unless ($session) {
|
||||
$msg = "Failed to connect to $pdu";
|
||||
xCAT::SvrUtils::sendmsg($msg, $callback, $pdu, %allerrornodes);
|
||||
return;
|
||||
}
|
||||
return $session;
|
||||
|
Reference in New Issue
Block a user