2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-29 09:13:08 +00:00

update cases for pdu support

This commit is contained in:
litingt@cn.ibm.com 2017-02-23 01:54:16 -05:00
parent c1e0e43b7a
commit 00ebd014c1
2 changed files with 163 additions and 0 deletions

View File

@ -115,6 +115,11 @@ bmcusername=USERID
bmcpasswd=PASSW0RD
#For bmc case u need to set username and passwd first
#End
#For pdu support
PDU=f5pdu3
PDUIP=50.0.0.8
PORT=6
#End
[Custom]
#commands run before test

View File

@ -0,0 +1,158 @@
start:lsdef_pdu_object
description:list pdu object and it's attribute
cmd:lsdef -h
check:output=~pdu
cmd:mkdef $$PDU mgt=pdu nodetype=pdu groups=pdu
check:rc==0
cmd:lsdef -t pdu
check:rc==0
check:output=~$$PDU
check:output=~pdu
cmd:tabdump pdu
check:rc==0
check:output=~$$PDU
cmd:rmdef $$PDU
check:rc==0
end
start:mkdef_pdu_object
description:create a pdu object and list it's attribute
cmd:mkdef $$PDU groups=pdu ip=$$PDUIP mgt=pdu nodetype=pdu
check:rc==0
cmd:lsdef -t pdu
check:rc==0
check:output=~$$PDU
check:output=~pdu
cmd:rmdef $$PDU
check:rc==0
cmd:lsdef $$PDU
check:rc!=0
check:output=~Error: Could not find an object named '$$PDU'
cmd:mkdef $$PDU groups=pdu ip=$$PDUIP mgt=pdu nodetype=pdu
check:rc==0
cmd:chdef $$PDU machinetype=1u
check:rc==0
cmd:lsdef $$PDU
check:output=~1u
cmd:rmdef $$PDU
check:rc==0
end
start:noderm_pdu_object
description:create a pdu object and use noderm to remove it
cmd:mkdef $$PDU groups=pdu ip=$$PDUIP mgt=pdu nodetype=pdu
check:rc==0
cmd:lsdef -t pdu
check:rc==0
check:output=~$$PDU
check:output=~pdu
cmd:tabdump pdu
check:rc==0
check:output=~$$PDU
cmd:noderm $$PDU
check:rc==0
cmd:nodels
check:output!~$$PDU
cmd:tabdump pdu
check:output!~$$PDU
end
start:pdu_communication
description:Verify a pdu snmp communication
cmd:mkdef $$PDU groups=pdu ip=$$PDUIP mgt=pdu nodetype=pdu
check:rc==0
cmd:lsdef -t pdu
check:rc==0
cmd:makehosts $$PDU
check:rc==0
cmd:grep $$PDUIP /etc/hosts
check:rc==0
cmd:snmpwalk -v1 -cpublic -mALL $$PDU .1.3.6.1.2.1.1
check:rc==0
check:output=~PDU
check:output=~$$PDU
cmd:rmdef $$PDU
check:rc==0
end
start:pdu_rinv
description:Verify rinv works for pdu object
cmd:mkdef $$PDU groups=pdu ip=$$PDUIP mgt=pdu nodetype=pdu
check:rc==0
cmd:makehosts $$PDU
check:rc==0
cmd:grep $$PDUIP /etc/hosts
check:rc==0
cmd:snmpwalk -v1 -cpublic -mALL $$PDU .1.3.6.1.2.1.1
check:rc==0
cmd:rinv $$PDU
check:rc==0
check:output=~$$PDU
cmd:rmdef $$PDU
check:rc==0
end
start:pdu_rpower
description:Verify rpower works for pdu object
cmd:mkdef $$PDU groups=pdu ip=$$PDUIP mgt=pdu nodetype=pdu
check:rc==0
cmd:makehosts $$PDU
check:rc==0
cmd:grep $$PDUIP /etc/hosts
check:rc==0
cmd:snmpwalk -v1 -cpublic -mALL $$PDU .1.3.6.1.2.1.1
check:rc==0
cmd:rpower $$PDU off
check:rc==0
check:output=~$$PDU
check:output=~off
check:output!~on
cmd:rpower $$PDU on
check:rc==0
check:output=~$$PDU
check:output=~on
check:output!~off
cmd:rpower $$PDU stat
check:rc==0
check:output=~$$PDU
check:output=~on
check:output!~off
cmd:rmdef $$PDU
check:rc==0
end
start:pdu_node_operation
description:Verify operate node's pdu attribute could operate pdu
cmd:mkdef $$PDU groups=pdu ip=$$PDUIP mgt=pdu nodetype=pdu
check:rc==0
cmd:makehosts $$PDU
check:rc==0
cmd:grep $$PDUIP /etc/hosts
check:rc==0
cmd:snmpwalk -v1 -cpublic -mALL $$PDU .1.3.6.1.2.1.1
check:rc==0
cmd:lsdef $$CN |grep pdu|awk -F= '{print $2}' > /tmp/pduvalue
cmd:oldpdu=`lsdef $$CN |grep pdu|awk -F= '{print $2}'`;chdef $$CN pdu=$$PDU:$$PORT,$oldpdu
check:rc==0
cmd:lsdef $$CN -i pdu
check:rc==0
cmd:rpower $$CN pdustat
check:rc==0
check:output=~$$CN: $$PDU outlet $$PORT is
cmd:rpower $$CN pduoff
check:rc==0
check:output=~$$CN: $$PDU outlet $$PORT is off
cmd:rpower $$CN pduon
check:rc==0
check:output=~$$CN: $$PDU outlet $$PORT is on
cmd:oldpdu=`cat /tmp/pduvalue`;chdef $$CN pdu=$oldpdu
cmd:rmdef $$PDU
check:rc==0
cmd:rm -rf /tmp/pduvalue
end