mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-06-21 13:35:32 +00:00
modify rspconfig testcase for get more debug information
This commit is contained in:
@ -91,6 +91,13 @@ Attribute: $$CN-The operation object of rspconfig command
|
||||
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/rspconfig/rspconfig.sh -v $$CN vlan
|
||||
check:rc==0
|
||||
end
|
||||
|
||||
start:rspconfig_set_all
|
||||
description:rspconfig change openbmc ip/netmask/gateway/vlan
|
||||
Attribute: $$CN-The operation object of rspconfig command
|
||||
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/rspconfig/rspconfig.sh -a $$CN
|
||||
check:rc==0
|
||||
end
|
||||
|
||||
start:rspconfig_gateway_invalid
|
||||
despcription:rspconfig could not change openbmc gatway using invalid gateway
|
||||
@ -99,6 +106,20 @@ cmd:rspconfig $$CN gateway=ddd
|
||||
check:rc!=0
|
||||
end
|
||||
|
||||
start:rspconfig_set_vlan_invalid
|
||||
despcription:rspconfig could not change openbmc gatway using invalid vlan
|
||||
Attribute: $$CN-The operation object of rspconfig command
|
||||
cmd:rspconfig $$CN vlan=dddsdsdfs
|
||||
check:rc!=0
|
||||
end
|
||||
|
||||
start:rspconfig_set_all_invalid
|
||||
despcription:rspconfig could not change openbmc gatway using invalid vlan
|
||||
Attribute: $$CN-The operation object of rspconfig command
|
||||
cmd:rspconfig $$CN ip=dsd gateway=ooo netmask=asfsf vlan=dddsdsdfs
|
||||
check:rc!=0
|
||||
end
|
||||
|
||||
start:rspconfig_node_invalid
|
||||
despcription:rspconfig could not do any action using invalid node
|
||||
cmd:test=$(lsdef testnode);if [[ $? -eq 0 ]]; then lsdef -l testnode -z >/tmp/testnode.stanza ;rmdef testnode;fi
|
||||
@ -109,6 +130,16 @@ cmd:if [[ -e /tmp/testnode.stanza ]]; then cat /tmp/testnode.stanza | chdef -z;r
|
||||
check:rc==0
|
||||
end
|
||||
|
||||
start:rspconfig_noderange_invalid
|
||||
despcription:rspconfig could not do any action using invalid node
|
||||
cmd:test=$(lsdef testnode);if [[ $? -eq 0 ]]; then lsdef -l testnode -z >/tmp/testnode.stanza ;rmdef testnode;fi
|
||||
check:rc==0
|
||||
cmd:rspconfig testnode,$$CN ip
|
||||
check:rc!=0
|
||||
cmd:if [[ -e /tmp/testnode.stanza ]]; then cat /tmp/testnode.stanza | chdef -z;rm -rf /tmp/testnode.stanza;fi
|
||||
check:rc==0
|
||||
end
|
||||
|
||||
start:rspconfig_list_ip
|
||||
despcription:rspconfig list bmc ip
|
||||
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/rspconfig/rspconfig.sh -lip $$CN
|
||||
|
@ -180,19 +180,20 @@ function change_all
|
||||
{
|
||||
echo "Prepare to change all for bmc."
|
||||
echo "Start to change all for bmc."
|
||||
rspconfig $2 gateway netmask vlan ip
|
||||
rspconfig $1 gateway netmask vlan ip
|
||||
if [[ $? -eq 0 ]];then
|
||||
BMCIP=`rspconfig $2 ip |awk -F":" '{print $3}'`;
|
||||
BMCNETMASK=`rspconfig $2 netmask |awk -F":" '{print $3}'`;
|
||||
BMCGGATEWAY=`rspconfig $2 gateway |awk -F":" '{print $3}'`;
|
||||
output=`rspconfig $2 vlan`
|
||||
BMCIP=`rspconfig $1 ip |awk -F":" '{print $3}'|sed s/[[:space:]]//g`;
|
||||
BMCNETMASK=`rspconfig $1 netmask |awk -F":" '{print $3}'|sed s/[[:space:]]//g`;
|
||||
BMCGGATEWAY=`rspconfig $1 gateway |awk -F":" '{print $3}'|sed s/[[:space:]]//g`;
|
||||
output=`rspconfig $1 vlan`
|
||||
if [[ $output =~ "BMC VLAN ID enabled" ]];then
|
||||
BMCVLAN=`rspconfig $2 vlan |awk -F":" '{print $3}'`
|
||||
BMCVLAN=`rspconfig $1 vlan |awk -F":" '{print $3}'|sed s/[[:space:]]//g`
|
||||
else
|
||||
echo "------------------Bmc vlan disabled so could not change vlan id using rspconfig.--------------------"
|
||||
return 1;
|
||||
fi
|
||||
rspconfig $2 ip=$BMCIP netmask=$BMCNETMASK gateway=$BMCGGATEWAY vlan=$BMCVLAN
|
||||
|
||||
rspconfig $1 ip=$BMCIP netmask=$BMCNETMASK gateway=$BMCGGATEWAY vlan=$BMCVLAN
|
||||
if [[ $? -eq 0 ]];then
|
||||
echo "Could set BMC IP/netmask/gateway/vlan.";
|
||||
else
|
||||
|
Reference in New Issue
Block a user