|
|
|
@ -157,7 +157,7 @@ end
|
|
|
|
|
start:confignetwork_s_installnic_secondarynic_updatenode
|
|
|
|
|
description: this case is to test confignetwork -s could configure installnic and secondarynic successfully with updatenode.
|
|
|
|
|
label:others,network
|
|
|
|
|
cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi
|
|
|
|
|
cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.stanza ;fi
|
|
|
|
|
check:rc==0
|
|
|
|
|
cmd:xdsh $$CN "rm -rf /tmp/backupnet/"
|
|
|
|
|
cmd:xdsh $$CN "mkdir -p /tmp/backupnet/"
|
|
|
|
@ -171,7 +171,7 @@ check:rc==0
|
|
|
|
|
cmd:updatenode $$CN -P "confignetwork -s"
|
|
|
|
|
check:rc==0
|
|
|
|
|
cmd:rmdef -t network -o confignetworks_test1
|
|
|
|
|
cmd:if [ -e /tmp/CN.standa ]; then rmdef $$CN; cat /tmp/CN.standa | mkdef -z; rm -rf /tmp/CN.standa; fi
|
|
|
|
|
cmd:if [ -e /tmp/CN.stanza ]; then rmdef $$CN; cat /tmp/CN.stanza | mkdef -z; rm -rf /tmp/CN.stanza; fi
|
|
|
|
|
check:rc==0
|
|
|
|
|
cmd:cnip=__GETNODEATTR($$CN,ip)__;echo $cnip;var1=100;var2=`echo $cnip |sed -r 's/[^\.]{1,3}(\..*)/\1/'`;second1ip=$var1$var2;if grep SUSE /etc/*release;then xdsh $$CN "grep $second1ip /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "grep $second1ip /etc/sysconfig/network-scripts/ifcfg-*$$SECONDNIC*"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep $second1ip /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi
|
|
|
|
|
check:rc==0
|
|
|
|
@ -190,7 +190,7 @@ end
|
|
|
|
|
start:confignetwork_secondarynic_updatenode
|
|
|
|
|
description: this case is to test confignetwork could configure secondarynic successfully with updatenode.
|
|
|
|
|
label:others,network
|
|
|
|
|
cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi
|
|
|
|
|
cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.stanza ;fi
|
|
|
|
|
check:rc==0
|
|
|
|
|
cmd:xdsh $$CN "rm -rf /tmp/backupnet/"
|
|
|
|
|
cmd:xdsh $$CN "mkdir -p /tmp/backupnet/"
|
|
|
|
@ -204,7 +204,7 @@ check:rc==0
|
|
|
|
|
cmd:updatenode $$CN -P confignetwork
|
|
|
|
|
check:rc==0
|
|
|
|
|
cmd:rmdef -t network -o 11_1_0_0-255_255_0_0
|
|
|
|
|
cmd:if [ -e /tmp/CN.standa ]; then rmdef $$CN; cat /tmp/CN.standa | mkdef -z; rm -rf /tmp/CN.standa; fi
|
|
|
|
|
cmd:if [ -e /tmp/CN.stanza ]; then rmdef $$CN; cat /tmp/CN.stanza | mkdef -z; rm -rf /tmp/CN.stanza; fi
|
|
|
|
|
check:rc==0
|
|
|
|
|
cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/sysconfig/network-scripts/ifcfg-*$$SECONDNIC*"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi
|
|
|
|
|
check:output=~11.1.0.100
|
|
|
|
@ -221,7 +221,7 @@ end
|
|
|
|
|
start: confignetwork_secondarynic_nicaliases_updatenode
|
|
|
|
|
description: this case is to test confignetwork could config secondarynic nicaliases successfully with updatenode.
|
|
|
|
|
label:others,network
|
|
|
|
|
cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi
|
|
|
|
|
cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.stanza ;fi
|
|
|
|
|
check:rc==0
|
|
|
|
|
cmd:xdsh $$CN "rm -rf /tmp/backupnet/"
|
|
|
|
|
cmd:xdsh $$CN "mkdir -p /tmp/backupnet/"
|
|
|
|
@ -257,7 +257,7 @@ check:rc==0
|
|
|
|
|
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$SECONDNIC";xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network/"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts";xdsh $$CN "cp -rf /tmp/backupnet/network-scripts /etc/sysconfig/";elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -f /etc/network/interfaces.d/$$SECONDNIC /etc/network/interfaces.d/$$SECONDNIC:1";xdsh $$CN "cp -f /tmp/backupnet/* /etc/network/interfaces.d/;cp -f /tmp/interfaces /etc/network/";else echo "Sorry,this is not supported os"; fi
|
|
|
|
|
check:rc==0
|
|
|
|
|
cmd:xdsh $$CN "systemctl status NetworkManager >/dev/null 2>/dev/null && which nmcli >/dev/null 2>/dev/null && nmcli con reload"
|
|
|
|
|
cmd:if [ -e /tmp/CN.standa ]; then rmdef $$CN; cat /tmp/CN.standa | mkdef -z; rm -rf /tmp/CN.standa; fi
|
|
|
|
|
cmd:if [ -e /tmp/CN.stanza ]; then rmdef $$CN; cat /tmp/CN.stanza | mkdef -z; rm -rf /tmp/CN.stanza; fi
|
|
|
|
|
check:rc==0
|
|
|
|
|
cmd:mv -f /etc/hosts.bak /etc/hosts
|
|
|
|
|
check:rc==0
|
|
|
|
@ -268,7 +268,7 @@ end
|
|
|
|
|
start:confignetwork_secondarynic_nicextraparams_updatenode
|
|
|
|
|
description: this case is to test confignetwork could configure secondarynic nicextraparams successfully with updatenode.
|
|
|
|
|
label:others,network
|
|
|
|
|
cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi
|
|
|
|
|
cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.stanza ;fi
|
|
|
|
|
check:rc==0
|
|
|
|
|
cmd:xdsh $$CN "rm -rf /tmp/backupnet/"
|
|
|
|
|
cmd:xdsh $$CN "mkdir -p /tmp/backupnet/"
|
|
|
|
@ -305,7 +305,7 @@ cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifc
|
|
|
|
|
check:rc==0
|
|
|
|
|
cmd:cnip=__GETNODEATTR($$CN,ip)__;echo $cnip;var1=100;var2=`echo $cnip |sed -r 's/[^\.]{1,3}(\..*)/\1/'`;second1ip=$var1$var2;xdsh $$CN "ip addr del $second1ip/16 dev $$SECONDNIC"
|
|
|
|
|
cmd:cnip=__GETNODEATTR($$CN,ip)__;echo $cnip;var1=101;var2=`echo $cnip |sed -r 's/[^\.]{1,3}(\..*)/\1/'`;second1ip=$var1$var2;xdsh $$CN "ip addr del $second1ip/16 dev $$SECONDNIC"
|
|
|
|
|
cmd:if [ -e /tmp/CN.standa ]; then rmdef $$CN; cat /tmp/CN.standa | mkdef -z; rm -rf /tmp/CN.standa; fi
|
|
|
|
|
cmd:if [ -e /tmp/CN.stanza ]; then rmdef $$CN; cat /tmp/CN.stanza | mkdef -z; rm -rf /tmp/CN.stanza; 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 -rf /tmp/backupnet/network-scripts /etc/sysconfig/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/network/interfaces.d/;cp -f /tmp/interfaces /etc/network/";else echo "Sorry,this is not supported os"; fi
|
|
|
|
@ -317,7 +317,7 @@ end
|
|
|
|
|
start:confignetwork_secondarynic_nicnetworks_updatenode_false
|
|
|
|
|
description: this case is to test confignetwork could return error message when there is no not enough attributes when configing secondarynic with updatenode.
|
|
|
|
|
label:others,network
|
|
|
|
|
cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi
|
|
|
|
|
cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.stanza ;fi
|
|
|
|
|
check:rc==0
|
|
|
|
|
cmd:mkdef -t network -o 11_1_0_0-255_255_0_0 net=11.1.0.0 mask=255.255.0.0 mgtifname=$$SECONDNIC
|
|
|
|
|
check:rc==0
|
|
|
|
@ -327,14 +327,14 @@ cmd:updatenode $$CN -P confignetwork
|
|
|
|
|
check:rc!=0
|
|
|
|
|
#TODO check the error message
|
|
|
|
|
cmd:rmdef -t network -o 11_1_0_0-255_255_0_0
|
|
|
|
|
cmd:if [ -e /tmp/CN.standa ]; then rmdef $$CN; cat /tmp/CN.standa | mkdef -z; rm -rf /tmp/CN.standa; fi
|
|
|
|
|
cmd:if [ -e /tmp/CN.stanza ]; then rmdef $$CN; cat /tmp/CN.stanza | mkdef -z; rm -rf /tmp/CN.stanza; fi
|
|
|
|
|
check:rc==0
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
start:confignetwork_secondarynic_nicips_updatenode_false
|
|
|
|
|
description: this case is to test confignetwork could return error message when there is no not enough attributes when configing secondarynic with updatenode.
|
|
|
|
|
label:others,network
|
|
|
|
|
cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi
|
|
|
|
|
cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.stanza ;fi
|
|
|
|
|
check:rc==0
|
|
|
|
|
cmd:mkdef -t network -o 11_1_0_0-255_255_0_0 net=11.1.0.0 mask=255.255.0.0 mgtifname=$$SECONDNIC
|
|
|
|
|
check:rc==0
|
|
|
|
@ -344,14 +344,14 @@ cmd:updatenode $$CN -P confignetwork
|
|
|
|
|
check:rc!=0
|
|
|
|
|
#TODO check the error message
|
|
|
|
|
cmd:rmdef -t network -o 11_1_0_0-255_255_0_0
|
|
|
|
|
cmd:if [ -e /tmp/CN.standa ]; then rmdef $$CN; cat /tmp/CN.standa | mkdef -z; rm -rf /tmp/CN.standa; fi
|
|
|
|
|
cmd:if [ -e /tmp/CN.stanza ]; then rmdef $$CN; cat /tmp/CN.stanza | mkdef -z; rm -rf /tmp/CN.stanza; fi
|
|
|
|
|
check:rc==0
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
start:confignetwork_secondarynic_nictype_updatenode_false
|
|
|
|
|
description: this case is to test confignetwork could return error message when there is no not enough attributes when configing secondarynic with updatenode.
|
|
|
|
|
label:others,network
|
|
|
|
|
cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi
|
|
|
|
|
cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.stanza ;fi
|
|
|
|
|
check:rc==0
|
|
|
|
|
cmd:mkdef -t network -o 11_1_0_0-255_255_0_0 net=11.1.0.0 mask=255.255.0.0 mgtifname=$$SECONDNIC
|
|
|
|
|
check:rc==0
|
|
|
|
@ -362,14 +362,14 @@ check:rc==1
|
|
|
|
|
#TODO check the error message
|
|
|
|
|
cmd:rmdef -t network -o 11_1_0_0-255_255_0_0
|
|
|
|
|
check:rc==0
|
|
|
|
|
cmd:if [ -e /tmp/CN.standa ]; then rmdef $$CN; cat /tmp/CN.standa | mkdef -z; rm -rf /tmp/CN.standa; fi
|
|
|
|
|
cmd:if [ -e /tmp/CN.stanza ]; then rmdef $$CN; cat /tmp/CN.stanza | mkdef -z; rm -rf /tmp/CN.stanza; fi
|
|
|
|
|
check:rc==0
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
start:confignetwork_disable_set_to_yes
|
|
|
|
|
description: this case is to test if confignetwork could work correctly when disable is set to yes in nics table
|
|
|
|
|
label:others,network
|
|
|
|
|
cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi
|
|
|
|
|
cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.stanza ;fi
|
|
|
|
|
check:rc==0
|
|
|
|
|
cmd:mkdef -t network -o 11_1_0_0-255_255_0_0 net=100.1.0.0 mask=255.255.0.0 mgtifname=$$SECONDNIC
|
|
|
|
|
check:rc==0
|
|
|
|
@ -383,7 +383,7 @@ cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/sysconfig/ne
|
|
|
|
|
check:output!~11.1.0.100
|
|
|
|
|
cmd:rmdef -t network -o 11_1_0_0-255_255_0_0
|
|
|
|
|
check:rc==0
|
|
|
|
|
cmd:if [ -e /tmp/CN.standa ]; then rmdef $$CN; cat /tmp/CN.standa | mkdef -z; rm -rf /tmp/CN.standa; fi
|
|
|
|
|
cmd:if [ -e /tmp/CN.stanza ]; then rmdef $$CN; cat /tmp/CN.stanza | mkdef -z; rm -rf /tmp/CN.stanza; fi
|
|
|
|
|
check:rc==0
|
|
|
|
|
cmd:chtab -d node=$$CN nics
|
|
|
|
|
end
|
|
|
|
@ -391,7 +391,7 @@ end
|
|
|
|
|
start:confignetwork_disable_set_to_1
|
|
|
|
|
description: this case is to test if confignetwork could work correctly when disable is set to 1 in nics table
|
|
|
|
|
label:others,network
|
|
|
|
|
cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi
|
|
|
|
|
cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.stanza ;fi
|
|
|
|
|
check:rc==0
|
|
|
|
|
cmd:mkdef -t network -o 11_1_0_0-255_255_0_0 net=100.1.0.0 mask=255.255.0.0 mgtifname=$$SECONDNIC
|
|
|
|
|
check:rc==0
|
|
|
|
@ -405,7 +405,7 @@ cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/sysconfig/ne
|
|
|
|
|
check:output!~11.1.0.100
|
|
|
|
|
cmd:rmdef -t network -o 11_1_0_0-255_255_0_0
|
|
|
|
|
check:rc==0
|
|
|
|
|
cmd:if [ -e /tmp/CN.standa ]; then rmdef $$CN; cat /tmp/CN.standa | mkdef -z; rm -rf /tmp/CN.standa; fi
|
|
|
|
|
cmd:if [ -e /tmp/CN.stanza ]; then rmdef $$CN; cat /tmp/CN.stanza | mkdef -z; rm -rf /tmp/CN.stanza; fi
|
|
|
|
|
check:rc==0
|
|
|
|
|
cmd:chtab -d node=$$CN nics
|
|
|
|
|
end
|
|
|
|
@ -413,7 +413,7 @@ end
|
|
|
|
|
start:confignetwork_niccustomscripts
|
|
|
|
|
description: this case is to test confignetwork could config secondarynic and envoke scripts to execute.
|
|
|
|
|
label:others,network
|
|
|
|
|
cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi
|
|
|
|
|
cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.stanza ;fi
|
|
|
|
|
check:rc==0
|
|
|
|
|
cmd:echo "echo hello > /tmp/confignetwork_niccustomscript" > /tmp/script1
|
|
|
|
|
check:rc==0
|
|
|
|
@ -433,7 +433,7 @@ check:output=~hello
|
|
|
|
|
cmd:xdsh $$CN "rm -rf /tmp/confignetwork_niccustomscript"
|
|
|
|
|
check:rc==0
|
|
|
|
|
cmd:rmdef -t network -o 11_1_0_0-255_255_0_0
|
|
|
|
|
cmd:if [ -e /tmp/CN.standa ]; then rmdef $$CN; cat /tmp/CN.standa | mkdef -z; rm -rf /tmp/CN.standa; fi
|
|
|
|
|
cmd:if [ -e /tmp/CN.stanza ]; then rmdef $$CN; cat /tmp/CN.stanza | mkdef -z; rm -rf /tmp/CN.stanza; fi
|
|
|
|
|
check:rc==0
|
|
|
|
|
cmd:rm -rf /tmp/script1 /install/postscripts/script1
|
|
|
|
|
cmd:chtab -d node=$$CN nics
|
|
|
|
@ -442,7 +442,7 @@ end
|
|
|
|
|
start:confignetwork_secondarynic_thirdnic_multiplevalue_updatenode
|
|
|
|
|
description:this case is to verify if confignetwork could config serveral nics' multiple value at the same time.
|
|
|
|
|
label:others,network
|
|
|
|
|
cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi
|
|
|
|
|
cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.stanza ;fi
|
|
|
|
|
check:rc==0
|
|
|
|
|
cmd:xdsh $$CN "rm -rf /tmp/backupnet/"
|
|
|
|
|
cmd:xdsh $$CN "mkdir -p /tmp/backupnet/"
|
|
|
|
@ -493,7 +493,7 @@ cmd:xdsh $$CN "ip addr del 11.1.0.100/16 dev $$SECONDNIC"
|
|
|
|
|
cmd:xdsh $$CN "ip addr del 12.1.0.100/16 dev $$SECONDNIC"
|
|
|
|
|
cmd:xdsh $$CN "ip addr del 13.1.0.200/16 dev $$THIRDNIC"
|
|
|
|
|
cmd:xdsh $$CN "ip addr del 14.1.0.100/16 dev $$THIRDNIC"
|
|
|
|
|
cmd:if [ -e /tmp/CN.standa ]; then rmdef $$CN; cat /tmp/CN.standa | mkdef -z; rm -rf /tmp/CN.standa; fi
|
|
|
|
|
cmd:if [ -e /tmp/CN.stanza ]; then rmdef $$CN; cat /tmp/CN.stanza | mkdef -z; rm -rf /tmp/CN.stanza; 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 -rf /tmp/backupnet/network-scripts /etc/sysconfig/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/network/interfaces.d/;cp -f /tmp/interfaces /etc/network/";else echo "Sorry,this is not supported os"; fi
|
|
|
|
@ -506,7 +506,7 @@ end
|
|
|
|
|
start:confignetwork_vlan_eth0
|
|
|
|
|
description: this case is to verify if confignetwork could config vlan for CN.When CN has Ethernet nic eth0, user wants to confgure 2 vlans, Configure vlan eth0.6 60.5.106.9 and eth0.7 70.5.106.9 based on ethernet nic eth0
|
|
|
|
|
label:others,network
|
|
|
|
|
cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi
|
|
|
|
|
cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.stanza ;fi
|
|
|
|
|
check:rc==0
|
|
|
|
|
cmd:xdsh $$CN "rm -rf /tmp/backupnet/"
|
|
|
|
|
cmd:xdsh $$CN "mkdir -p /tmp/backupnet/"
|
|
|
|
@ -530,7 +530,7 @@ cmd:cnip=__GETNODEATTR($$CN,ip)__;echo $cnip;var1=105;var2=106;var3=`echo $cnip
|
|
|
|
|
check:rc==0
|
|
|
|
|
cmd:updatenode $$CN -P confignetwork
|
|
|
|
|
check:rc==0
|
|
|
|
|
cmd:if [ -e /tmp/CN.standa ]; then rmdef $$CN; cat /tmp/CN.standa | mkdef -z; rm -rf /tmp/CN.standa; fi
|
|
|
|
|
cmd:if [ -e /tmp/CN.stanza ]; then rmdef $$CN; cat /tmp/CN.stanza | mkdef -z; rm -rf /tmp/CN.stanza; fi
|
|
|
|
|
check:rc==0
|
|
|
|
|
cmd:cnip=__GETNODEATTR($$CN,ip)__;echo $cnip;var1=105;var3=`echo $cnip |sed -r 's/[^\.]{1,3}(\..*)/\1/'`;second6ip=$var1$var3; echo $second6ip; xdsh $$CN "if grep SUSE /etc/*release;then grep $second6ip /etc/sysconfig/network/ifcfg-$$SECONDNIC.6;elif grep -E \"Red Hat|CentOS\" /etc/*release;then grep $second6ip /etc/sysconfig/network-scripts/ifcfg-*$$SECONDNIC.6*; elif grep Ubuntu /etc/*release;then grep $second6ip /etc/network/interfaces.d/$$SECONDNIC.6;else echo \"Sorry,this is not supported os\"; fi"
|
|
|
|
|
check:rc==0
|
|
|
|
@ -558,7 +558,7 @@ end
|
|
|
|
|
start:confignetwork_vlan_false
|
|
|
|
|
description:this case is to verify if confignetwork could process the false value when vlan nicdevice is not correctly set
|
|
|
|
|
label:others,network
|
|
|
|
|
cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi
|
|
|
|
|
cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.stanza ;fi
|
|
|
|
|
check:rc==0
|
|
|
|
|
cmd:xdsh $$CN "rm -rf /tmp/backupnet/"
|
|
|
|
|
cmd:xdsh $$CN "mkdir -p /tmp/backupnet/"
|
|
|
|
@ -591,7 +591,7 @@ cmd:rmdef -t network -o 70_0_0_0-255_0_0_0
|
|
|
|
|
cmd:xdsh $$CN "ip addr del 11.1.0.100/16 dev $$SECONDNIC"
|
|
|
|
|
cmd:xdsh $$CN "if grep SUSE /etc/*release;then rm -rf /etc/sysconfig/network/ifcfg-$$SECONDNIC; elif grep -E \"Red Hat|CentOS\" /etc/*release;then rm -rf /etc/sysconfig/network-scripts/ifcfg-*$$SECONDNIC*; elif grep Ubuntu /etc/*release;then rm -rf /etc/network/interfaces.d/$$SECONDNIC;else echo \"Sorry,this is not supported os\"; fi"
|
|
|
|
|
check:rc==0
|
|
|
|
|
cmd:if [ -e /tmp/CN.standa ]; then rmdef $$CN; cat /tmp/CN.standa | mkdef -z; rm -rf /tmp/CN.standa; fi
|
|
|
|
|
cmd:if [ -e /tmp/CN.stanza ]; then rmdef $$CN; cat /tmp/CN.stanza | mkdef -z; rm -rf /tmp/CN.stanza; fi
|
|
|
|
|
check:rc==0
|
|
|
|
|
cmd:xdsh $$CN "if grep SUSE /etc/*release;then cp -f /tmp/backupnet/* /etc/sysconfig/network/; elif grep -E \"Red Hat .* 8.*|CentOS .* 8.*\" /etc/*release; then cp -f /tmp/backupnet/* /etc/sysconfig/network-scripts/; nmcli con reload;elif grep -E \"Red Hat|CentOS\" /etc/*release;then cp -f /tmp/backupnet/* /etc/sysconfig/network-scripts/; elif grep Ubuntu /etc/*release;then cp -f /tmp/backupnet/* /etc/network/interfaces.d/;cp -f /tmp/interfaces /etc/network/;else echo \"Sorry,this is not supported os\"; fi"
|
|
|
|
|
check:rc==0
|
|
|
|
@ -603,7 +603,7 @@ end
|
|
|
|
|
start:confignetwork_bond_eth2_eth3
|
|
|
|
|
description: this case is to verify if confignetwork could config bond for CN.CN has 2 Ethernet nics, eth2 and eth3, user configures bond bond0 using ethernet nic eth2 and eth3.
|
|
|
|
|
label:others,network
|
|
|
|
|
cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi
|
|
|
|
|
cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.stanza ;fi
|
|
|
|
|
check:rc==0
|
|
|
|
|
cmd:xdsh $$CN "rm -rf /tmp/backupnet/"
|
|
|
|
|
cmd:xdsh $$CN "mkdir -p /tmp/backupnet/"
|
|
|
|
@ -646,7 +646,7 @@ cmd:xdsh $$CN "ip link del dev bond0"
|
|
|
|
|
cmd:xdsh $$CN "echo -bond0 > /sys/class/net/bonding_masters"
|
|
|
|
|
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-bond0"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/bond0";else echo "Sorry,this is not supported os"; fi
|
|
|
|
|
check:rc==0
|
|
|
|
|
cmd:if [ -e /tmp/CN.standa ]; then rmdef $$CN; cat /tmp/CN.standa | mkdef -z; rm -rf /tmp/CN.standa; fi
|
|
|
|
|
cmd:if [ -e /tmp/CN.stanza ]; then rmdef $$CN; cat /tmp/CN.stanza | mkdef -z; rm -rf /tmp/CN.stanza; fi
|
|
|
|
|
check:rc==0
|
|
|
|
|
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 -rf /tmp/backupnet/network-scripts /etc/sysconfig/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/network/interfaces.d/;cp -f /tmp/interfaces /etc/network/";else echo "Sorry,this is not supported os"; fi
|
|
|
|
|
check:rc==0
|
|
|
|
@ -659,7 +659,7 @@ end
|
|
|
|
|
start:confignetwork_bond_false
|
|
|
|
|
description: this case is to verify if confignetwork could process when bond is not correctly set.
|
|
|
|
|
label:others,network
|
|
|
|
|
cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi
|
|
|
|
|
cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.stanza ;fi
|
|
|
|
|
check:rc==0
|
|
|
|
|
cmd:xdsh $$CN "rm -rf /tmp/backupnet/"
|
|
|
|
|
cmd:xdsh $$CN "mkdir -p /tmp/backupnet/"
|
|
|
|
@ -696,7 +696,7 @@ cmd:rmdef -t network -o confignetworks_test2
|
|
|
|
|
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:rmdef -t network -o confignetworks_test3
|
|
|
|
|
cmd:if [ -e /tmp/CN.standa ]; then rmdef $$CN; cat /tmp/CN.standa | mkdef -z; rm -rf /tmp/CN.standa; fi
|
|
|
|
|
cmd:if [ -e /tmp/CN.stanza ]; then rmdef $$CN; cat /tmp/CN.stanza | mkdef -z; rm -rf /tmp/CN.stanza; fi
|
|
|
|
|
check:rc==0
|
|
|
|
|
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/;cp -f /tmp/interfaces /etc/network/";else echo "Sorry,this is not supported os"; fi
|
|
|
|
|
check:rc==0
|
|
|
|
@ -708,7 +708,7 @@ end
|
|
|
|
|
start:confignetwork_vlan_bond
|
|
|
|
|
description: this case is to verify if confignetwork could config bond for CN.CN has 2 Ethernet nic eth2 and eth3, user wants to bond them to bond0, then make 2 vlan bond0.2 and bond0.3 for data network.
|
|
|
|
|
label:others,network
|
|
|
|
|
cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi
|
|
|
|
|
cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.stanza ;fi
|
|
|
|
|
check:rc==0
|
|
|
|
|
cmd:xdsh $$CN "rm -rf /tmp/backupnet/"
|
|
|
|
|
cmd:xdsh $$CN "mkdir -p /tmp/backupnet/"
|
|
|
|
@ -763,7 +763,7 @@ cmd:xdsh $$CN "ip link del dev bond0.3"
|
|
|
|
|
cmd:xdsh $$CN "echo -bond0 > /sys/class/net/bonding_masters"
|
|
|
|
|
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-bond0 /etc/sysconfig/network/ifcfg-bond0.2 /etc/sysconfig/network/ifcfg-bond0.3"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/bond0 /etc/sysconfig/network/ifcfg-bond0.2 /etc/sysconfig/network/ifcfg-bond0.3";else echo "Sorry,this is not supported os"; fi
|
|
|
|
|
check:rc==0
|
|
|
|
|
cmd:if [ -e /tmp/CN.standa ]; then rmdef $$CN; cat /tmp/CN.standa | mkdef -z; rm -rf /tmp/CN.standa; fi
|
|
|
|
|
cmd:if [ -e /tmp/CN.stanza ]; then rmdef $$CN; cat /tmp/CN.stanza | mkdef -z; rm -rf /tmp/CN.stanza; fi
|
|
|
|
|
check:rc==0
|
|
|
|
|
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 -rf /tmp/backupnet/network-scripts /etc/sysconfig/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/network/interfaces.d/;cp -f /tmp/interfaces /etc/network/";else echo "Sorry,this is not supported os"; fi
|
|
|
|
|
check:rc==0
|
|
|
|
@ -776,7 +776,7 @@ end
|
|
|
|
|
start:confignetwork_2eth_bridge_br0
|
|
|
|
|
description:this case is to verify if confignetwork could config bridge for CN.CN has 2 Ethernet nics eth2 and eth3, user want to configure bond bond0 using eth2 and eth3, creates bridge br0 based on bond0.
|
|
|
|
|
label:others,network
|
|
|
|
|
cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi
|
|
|
|
|
cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.stanza ;fi
|
|
|
|
|
check:rc==0
|
|
|
|
|
cmd:xdsh $$CN "rm -rf /tmp/backupnet/"
|
|
|
|
|
cmd:xdsh $$CN "mkdir -p /tmp/backupnet/"
|
|
|
|
@ -823,7 +823,7 @@ cmd:xdsh $$CN "ip link del dev br0"
|
|
|
|
|
cmd:xdsh $$CN "echo -bond0 > /sys/class/net/bonding_masters"
|
|
|
|
|
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-br0"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/br0";else echo "Sorry,this is not supported os"; fi
|
|
|
|
|
check:rc==0
|
|
|
|
|
cmd:if [ -e /tmp/CN.standa ]; then rmdef $$CN; cat /tmp/CN.standa | mkdef -z; rm -rf /tmp/CN.standa; fi
|
|
|
|
|
cmd:if [ -e /tmp/CN.stanza ]; then rmdef $$CN; cat /tmp/CN.stanza | mkdef -z; rm -rf /tmp/CN.stanza; fi
|
|
|
|
|
check:rc==0
|
|
|
|
|
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 -rf /tmp/backupnet/network-scripts /etc/sysconfig/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/network/interfaces.d/;cp -f /tmp/interfaces /etc/network/";else echo "Sorry,this is not supported os"; fi
|
|
|
|
|
cmd:xdsh $$CN "systemctl status NetworkManager >/dev/null 2>/dev/null && which nmcli >/dev/null 2>/dev/null && nmcli con reload"
|
|
|
|
@ -834,7 +834,7 @@ end
|
|
|
|
|
start:confignetwork_2eth_bridge_br22_br33
|
|
|
|
|
description:this case is to verify if confignetwork could config bridge for CN.CN has 2 Ethernet nics eth2 and eth3, user wants to bond them as bond0, then make vlan bond0.2 and bond0.3, using bond0.2 create bridge br22,using bond0.3 create bridge br33. Use confignetwork to configure bond bond0, create vlan bond0.2 and bond0.3, create bridge br22 and br33.
|
|
|
|
|
label:others,network
|
|
|
|
|
cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi
|
|
|
|
|
cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.stanza ;fi
|
|
|
|
|
check:rc==0
|
|
|
|
|
cmd:xdsh $$CN "rm -rf /tmp/backupnet/"
|
|
|
|
|
cmd:xdsh $$CN "mkdir -p /tmp/backupnet/"
|
|
|
|
@ -889,7 +889,7 @@ cmd:cnip=__GETNODEATTR($$CN,ip)__;echo $cnip;var1=101;var2=`echo $cnip |sed -r '
|
|
|
|
|
cmd:xdsh $$CN "echo -bond0 > /sys/class/net/bonding_masters"
|
|
|
|
|
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-bond0 /etc/sysconfig/network/ifcfg-bond0.2 /etc/sysconfig/network/ifcfg-bond0.3 /etc/sysconfig/network/ifcfg-br22 /etc/sysconfig/network/ifcfg-br33"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/bond0 /etc/network/interfaces.d/bond0.2 /etc/network/interfaces.d/bond0.3 /etc/network/interfaces.d/br22 /etc/network/interfaces.d/br33";else echo "Sorry,this is not supported os"; fi
|
|
|
|
|
check:rc==0
|
|
|
|
|
cmd:if [ -e /tmp/CN.standa ]; then rmdef $$CN; cat /tmp/CN.standa | mkdef -z; rm -rf /tmp/CN.standa; fi
|
|
|
|
|
cmd:if [ -e /tmp/CN.stanza ]; then rmdef $$CN; cat /tmp/CN.stanza | mkdef -z; rm -rf /tmp/CN.stanza; fi
|
|
|
|
|
check:rc==0
|
|
|
|
|
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 -rf /tmp/backupnet/network-scripts /etc/sysconfig/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/network/interfaces.d/;cp -f /tmp/interfaces /etc/network/";else echo "Sorry,this is not supported os"; fi
|
|
|
|
|
check:rc==0
|
|
|
|
@ -901,7 +901,7 @@ end
|
|
|
|
|
start:confignetwork_installnic_2eth_bridge_br22_br33
|
|
|
|
|
description:this case is to test if confignetwork could config installnic and 2 bridges at the same time
|
|
|
|
|
label:others,network
|
|
|
|
|
cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi
|
|
|
|
|
cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.stanza ;fi
|
|
|
|
|
check:rc==0
|
|
|
|
|
cmd:xdsh $$CN "rm -rf /tmp/backupnet/"
|
|
|
|
|
cmd:xdsh $$CN "mkdir -p /tmp/backupnet/"
|
|
|
|
@ -957,7 +957,7 @@ cmd:xdsh $$CN "ip addr del 12.1.0.100/16 dev $$THIRDNIC"
|
|
|
|
|
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-bond0 /etc/sysconfig/network/ifcfg-bond0.2 /etc/sysconfig/network/ifcfg-bond0.3 /etc/sysconfig/network/ifcfg-br22 /etc/sysconfig/network/ifcfg-br33";xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network/";elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts";xdsh $$CN "cp -rf /tmp/backupnet/network-scripts /etc/sysconfig/";elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/bond0 /etc/network/interfaces.d/bond0.2 /etc/network/interfaces.d/bond0.3 /etc/network/interfaces.d/br22 /etc/network/interfaces.d/br33";xdsh $$CN "cp -f /tmp/backupnet/* /etc/network/interfaces.d/;cp -f /tmp/interfaces /etc/network/";else echo "Sorry,this is not supported os"; fi
|
|
|
|
|
check:rc==0
|
|
|
|
|
cmd:xdsh $$CN "systemctl status NetworkManager >/dev/null 2>/dev/null && which nmcli >/dev/null 2>/dev/null && nmcli con reload"
|
|
|
|
|
cmd:if [ -e /tmp/CN.standa ]; then rmdef $$CN; cat /tmp/CN.standa | mkdef -z; rm -rf /tmp/CN.standa; fi
|
|
|
|
|
cmd:if [ -e /tmp/CN.stanza ]; then rmdef $$CN; cat /tmp/CN.stanza | mkdef -z; rm -rf /tmp/CN.stanza; fi
|
|
|
|
|
check:rc==0
|
|
|
|
|
cmd:xdsh $$CN "rm -rf /tmp/backupnet/ /tmp/interfaces"
|
|
|
|
|
check:rc==0
|
|
|
|
@ -968,7 +968,7 @@ end
|
|
|
|
|
start:confignetwork__bridge_false
|
|
|
|
|
description:this case is to test if confignetwork could process false value when the bridge is not correctly set.
|
|
|
|
|
label:others,network
|
|
|
|
|
cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi
|
|
|
|
|
cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.stanza ;fi
|
|
|
|
|
check:rc==0
|
|
|
|
|
cmd:xdsh $$CN "rm -rf /tmp/backupnet/"
|
|
|
|
|
cmd:xdsh $$CN "mkdir -p /tmp/backupnet/"
|
|
|
|
@ -992,7 +992,7 @@ cmd:xdsh $$CN "ip link del dev br33"
|
|
|
|
|
cmd:xdsh $$CN "ip link del dev bond0.2"
|
|
|
|
|
cmd:xdsh $$CN "ip link del dev bond0.3"
|
|
|
|
|
cmd:xdsh $$CN "ip link del dev bond0"
|
|
|
|
|
cmd:if [ -e /tmp/CN.standa ]; then rmdef $$CN; cat /tmp/CN.standa | mkdef -z; rm -rf /tmp/CN.standa; fi
|
|
|
|
|
cmd:if [ -e /tmp/CN.stanza ]; then rmdef $$CN; cat /tmp/CN.stanza | mkdef -z; rm -rf /tmp/CN.stanza; fi
|
|
|
|
|
check:rc==0
|
|
|
|
|
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/;cp -f /tmp/interfaces /etc/network/";else echo "Sorry,this is not supported os"; fi
|
|
|
|
|
cmd:xdsh $$CN "rm -rf /tmp/backupnet/ /tmp/interfaces"
|
|
|
|
|