2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-08-26 13:10:35 +00:00
Files
xcat-core/xCAT-test/autotest/testcase/confignetwork/cases1
Gᴏɴɢ Jie 14f993bc14 Merge master branch to RHEL 8 branch (#5953)
* rpower for redfish support

* rsetboot for redfish support

* recover

* modify depending on discussion and comments

* refine test case xcatd_start (#5932)

* Update small text in the diskful support example for cuda_power9_setup

Fix small issue mentioned in 5852

* rsetboot for redfish support

* Fix issue 5933: xCAT-openbmc-py build failed

* Fix remoteshell compatibility with custom Match (#5936)

If a user has a custom Match directive, remoteshell would
create an invalid configuration.  Fix by ensuring we are
outside of a match context by doing Match all explicitly.

* fix issue PR #5936 resulted in remoteshell failed in rhels6.10 #5944

* refine xcat-inventory backend testcase (#5946)

* add test case for issue 3602: confignetwork cannot work when regular expression is used in nics table

* add lsdef to get more debug info

* Revert "fix issue PR #5936 resulted in remoteshell failed in rhels6.10 #5944"

* revert PR Fix remoteshell compatibility with custom Match #5936
2019-01-15 17:33:59 +08:00

48 lines
3.7 KiB
Plaintext

start:confignetwork_secondarynic_third_regex_updatenode
description:this case is to verify if confignetwork could config serveral nics with regex patten.This case is to verify defect 3602.
label:others,network
cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi
check:rc==0
cmd:xdsh $$CN "rm -rf /tmp/backupnet/"
cmd:xdsh $$CN "mkdir -p /tmp/backupnet/"
check:rc==0
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network/ifcfg-* /tmp/backupnet/"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network-scripts/ifcfg-* /tmp/backupnet/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /etc/network/interfaces.d/* /tmp/backupnet/";else echo "Sorry,this is not supported os"; fi
check:rc==0
cmd:mkdef -t network -o 30_0_0_0-255_255_0_0 net=30.0.0.0 mask=255.0.0.0 mgtifname=$$SECONDNIC
check:rc==0
cmd:mkdef -t network -o 40_0_0_0-255_255_0_0 net=40.0.0.0 mask=255.0.0.0 mgtifname=$$THIRDNIC
check:rc==0
cmd:chdef $$CN nicips.$$SECONDNIC="|\D+\d+\D+\d+\D+\d+\D+(\d+)|30.0.0.(\$1/1000+9)|" nictypes.$$SECONDNIC=Ethernet nicnetworks.$$SECONDNIC="30_0_0_0-255_255_0_0"
check:rc==0
cmd:chdef $$CN nicips.$$THIRDNIC="|\D+\d+\D+\d+\D+\d+\D+(\d+)|40.0.0.(\$1/1000+8)|" nictypes.$$THIRDNIC=Ethernet nicnetworks.$$THIRDNIC="40_0_0_0-255_255_0_0"
check:rc==0
cmd:lsdef $$CN
cmd:cp /etc/hosts /etc/hosts.bak
cmd:rc==0
cmd:makehosts $$CN
check:rc==0
cmd:cat /etc/hosts
check:output=~$$CN-$$SECONDNIC
check:output=~$$CN-$$THIRDNIC
cmd:updatenode $$CN -P confignetwork
check:rc==0
cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 30.0.0.9 /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "grep 30.0.0.9 /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 30.0.0.9 /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi
check:output=~30.0.0.9
cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 40.0.0.8 /etc/sysconfig/network/ifcfg-$$THIRDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "grep 40.0.0.8 /etc/sysconfig/network-scripts/ifcfg-$$THIRDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 40.0.0.8 /etc/network/interfaces.d/$$THIRDNIC";else echo "Sorry,this is not supported os"; fi
check:output=~40.0.0.8
cmd:rmdef -t network -o 30_0_0_0-255_255_0_0
cmd:rmdef -t network -o 40_0_0_0-255_255_0_0
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi
check:rc==0
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$THIRDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$THIRDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$THIRDNIC";else echo "Sorry,this is not supported os"; fi
check:rc==0
cmd:xdsh $$CN "ip addr del 30.0.0.9/8 dev $$SECONDNIC"
cmd:xdsh $$CN "ip addr del 40.0.0.8/8 dev $$THIRDNIC"
cmd:if [ -e /tmp/CN.standa ]; then rmdef $$CN; cat /tmp/CN.standa | mkdef -z; rm -rf /tmp/CN.standa; fi
check:rc==0
cmd:mv -f /etc/hosts.bak /etc/hosts
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network/"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network-scripts/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/network/interfaces.d/";else echo "Sorry,this is not supported os"; fi
cmd:xdsh $$CN "rm -rf /tmp/backupnet/"
end