2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-30 09:36:41 +00:00
2016-10-19 04:47:50 -04:00

327 lines
11 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

start:mkdef_null
description:mkdef without any flag
cmd:mkdef
check:output=~Usage
end
start:mkdef_node
description:mkdef -t node
cmd:mkdef -t node -o testnode,testnode1 groups=all,aix
check:rc==0
cmd:lsdef -i groups testnode
check:rc==0
check:output=~groups=all,aix
cmd:lsdef -i groups testnode1
check:rc==0
check:output=~groups=all,aix
cmd:rmdef -t node -o testnode,testnode1
end
start:mkdef_f
description:mkdef -f
cmd:mkdef -t node -o testnode groups=all,aix
check:rc==0
cmd:mkdef -f -t node -o testnode nodetype=lpar,osi groups=all
check:rc==0
cmd:lsdef -i groups,nodetype testnode
check:rc==0
check:output=~nodetype=lpar,osi
check:output!=aix
cmd:rmdef -t node -o testnode
end
start:mkdef_z
description:mkdef -z
cmd:mkdef -t node -o orignode mgt=fsp cons=hmc pprofile=orignode groups=lpar,all
check:rc==0
cmd:lsdef -l orignode -z > /tmp/orignode.stanza
check:rc==0
cmd:perl -pi -e 's/orignode/testnode/g' /tmp/orignode.stanza
cmd:cat /tmp/orignode.stanza | mkdef -z
check:rc==0
cmd:lsdef -l testnode -z > /tmp/testnode.stanza
check:rc==0
cmd:diff /tmp/orignode.stanza /tmp/testnode.stanza
check:rc==0
cmd:rm -f /tmp/orignode.stanza
cmd:rm -f /tmp/testnode.stanza
cmd:rmdef -t node testnode
cmd:rmdef -t node orignode
end
start:mkdef_group
description: mkdef static node group
cmd:mkdef -t node -o testnode1-testnode2 mgt=hmc cons=hmc groups=all,systemp
check:rc==0
cmd:mkdef -t node -o testnode3-testnode4 mgt=ipmi cons=ipmi groups=all,systemx
check:rc==0
cmd:mkdef -t group -o testgrp members=testnode1,testnode3
check:rc==0
cmd:lsdef -s testgrp
check:rc==0
check:output=~testnode1
check:output=~testnode3
check:output!~testnode2
check:output!~testnode4
cmd:lsdef testnode1
check:rc==0
check:output=~=all,systemp,testgrp
cmd:lsdef testnode3
check:rc==0
check:output=~=all,systemx,testgrp
cmd:rmdef -t group testgrp
check:rc==0
cmd:lsdef testgrp
check:output=~Could not find an object named 'testgrp'
cmd:lsdef -t group -o testgrp
check:output=~Could not find an object named 'testgrp'
cmd:lsdef testnode1
check:rc==0
check:output=~=all,systemp
check:output!~=testgrp
cmd:lsdef testnode3
check:rc==0
check:output=~=all,systemx
check:output!~=testgrp
cmd:rmdef -t node -o testnode1-testnode4
check:rc==0
end
start:mkdef_dynamic_group
description:mkdef with dynamic node group
cmd:mkdef -t node -o testnode1-testnode2 mgt=hmc cons=hmc groups=all,systemp
check:rc==0
cmd:mkdef -t node -o testnode3-testnode4 mgt=ipmi cons=ipmi groups=all,systemx
check:rc==0
cmd:mkdef -t group -o dyngrp1 -d -w mgt==hmc
check:rc==0
cmd:lsdef -s dyngrp1
check:rc==0
check:output=~testnode1
check:output=~testnode2
check:output!~testnode3
check:output!~testnode4
cmd:mkdef -t group -o dyngrp2 -d -w mgt==hmc -w cons==hmc
check:rc==0
cmd:lsdef -s dyngrp2
check:rc==0
check:output=~testnode1
check:output=~testnode2
check:output!~testnode3
check:output!~testnode4
cmd:mkdef -t group -o dyngrp3 -d -w mgt==hmc -w cons==ipmi
check:rc==0
cmd:lsdef -s dyngrp3
check:rc!=0
check:output!~testnode1
check:output!~testnode2
check:output!~testnode3
check:output!~testnode4
cmd:rmdef -t group -o dyngrp1,dyngrp2,dyngrp3
check:rc==0
cmd:rmdef -t node -o testnode1-testnode4
check:rc==0
end
start:mkdef_multiple_keys
description:mkdef support for multiple keys in a table, such as ppcdirect
cmd: mkdef -t node -o testfsp mgt=fsp cons=fsp groups=all,fsp nodetype=fsp passwd.HMC=abc123 passwd.general=abc123 passwd.admin=abc123
check:rc==0
cmd:lsdef testfsp
check:rc==0
check:output=~passwd.HMC=abc123
check:output=~passwd.general=abc123
check:output=~passwd.admin=abc123
cmd:rmdef -t node -o testfsp
check:rc==0
end
start:mkdef_t_network
description: mkdef -t network
cmd:mkdef -t network -o testnetwork net=1.2.3.0 mask=255.255.255.0 gateway=1.2.3.1
check:rc==0
cmd:lsdef -t network
check:rc==0
check:output=~testnetwork
cmd:lsdef -t network -o testnetwork -l
check:rc==0
check:output=~net=1.2.3.0
check:output=~mask=255.255.255.0
check:output=~gateway=1.2.3.1
cmd:rmdef -t network testnetwork
end
start:mkdef_t_o_error
description:mkdef -t wrongtype
cmd:mkdef -t wrongtype -o testnode groups=all,aix
check:rc!=0
check:output=~not a valid
end
start:mkdef_template_switch_template_without_attribute
os:linux
description:create a node with swtich template without any attributes
cmd:result=`lsdef | grep auto_test_node_1`; if [[ $result =~ "auto_test_node_1" ]]; then echo $result; noderm auto_test_node_1; fi
cmd:mkdef -t node -o auto_test_node_1 --template switch-template
check:rc==0
check:output=~1 object definitions have been created or modified.
cmd:lsdef auto_test_node_1
check:rc==0
check:output=~Object name\: auto_test_node_1
check:output=~groups=switch
check:output=~nodetype=switch
check:output=~postbootscripts\=otherpkgs
check:output=~postscripts\=syslog\,remoteshell\,syncfiles
check:output=~usercomment\=the switch definition template
check:output=~postscripts\=syslog\,remoteshell\,syncfiles
check:output!=ip\=OPTIONAL\:the ip address of the switch
check:output!=mac\=OPTIONAL\:the MAC address of the switch
check:output!=switchtype\=
cmd:noderm auto_test_node_1
check:rc==0
end
start:mkdef_template_cec_template_without_remainder
os:linux
description:create a node with cec template once
cmd:result=`lsdef | grep auto_test_cec_node_1`; if [[ $result =~ "auto_test_cec_node_1" ]]; then echo $result; noderm auto_test_cec_node_1; fi
cmd:mkdef -t node -o auto_test_cec_node_1 --template cec-template serial=test mtm=test hcp=test
checkrc==0
check:output=~1 object definitions have been created or modified
cmd:lsdef auto_test_cec_node_1
check:output=~Object name\: auto\_test\_cec\_node\_1
check:output=~groups\=cec\,all
check:output=~hwtype\=cec
check:output=~mgt\=hmc
check:output=~nodetype\=ppc
check:output=~postbootscripts\=otherpkgs
check:output=~postscripts\=syslog\,remoteshell\,syncfiles
check:output=~usercomment\=the cec definition template
check:output=~hcp\=test
check:output=~mtm\=test
check:output=~serial\=test
cmd:noderm auto_test_cec_node_1
check:rc==0
end
start:mkdef_template_invalid_template
os:linux
description:create a node with invalid template
cmd:result=`lsdef | grep auto_test_node`; if [[ $result =~ "auto_test_node" ]]; then echo $result; noderm auto_test_node; fi
cmd:result=`lsdef | grep auto_test_invalid_template`; if [[ $result =~ "auto_test_invalid_template" ]]; then echo $result; noderm auto_test_invalid_template; fi
cmd:lsdef --template auto_test_invalid_template
check:rc==1
check:output=~Error\: Could not find auto\_test\_invalid\_template in xCAT templates
cmd:mkdef -t node -o auto_test_node --template auto_test_invalid_template
checkrc==1
check:output=~Error\: Could not find the template object named \'auto\_test\_invalid\_template\' of type \'node\'
end
start:mkdef_node_with_a_node_template
os:linux
description:create a node with a node template, using cec template to create node at beginning
cmd:result=`lsdef | grep auto_test_cec_node_1`; if [[ $result =~ "auto_test_cec_node_1" ]]; then echo $result; noderm auto_test_cec_node_1; fi
cmd:result=`lsdef | grep auto_test_cec_node_2`; if [[ $result =~ "auto_test_cec_node_2" ]]; then echo $result; noderm auto_test_cec_node_2; fi
cmd:mkdef -t node -o auto_test_cec_node_1 --template cec-template serial=test mtm=test hcp=test groups=test_template
checkrc==0
check:output=~1 object definitions have been created or modified
check:output=~created
cmd:mkdef -t node -o auto_test_cec_node_2 --template auto_test_cec_node_1 serial=test2 mtm=test2 hcp=test2
checkrc==0
check:output=~1 object definitions have been created or modified
cmd:lsdef auto_test_cec_node_2
check:output=~Object name\: auto\_test\_cec\_node\_2
check:output=~groups\=test\_template
check:output!=groups\=cec\,all
check:output=~hwtype\=cec
check:output=~mgt\=hmc
check:output=~nodetype\=ppc
check:output=~postbootscripts\=otherpkgs
check:output=~postscripts\=syslog\,remoteshell\,syncfiles
check:output=~usercomment\=the cec definition template
check:output=~hcp\=test2
check:output=~mtm\=test2
check:output=~serial\=test2
cmd:noderm auto_test_cec_node_1
check:rc==0
cmd:noderm auto_test_cec_node_2
check:rc==0
end
start:mkdef_template_cec_template_step_by_step
os:linux
description:create a node with cec template step by step
cmd:result=`lsdef | grep auto_test_cec_node_1`; if [[ $result =~ "auto_test_cec_node_1" ]]; then echo $result; noderm auto_test_cec_node_1; fi
cmd:mkdef -t node -o auto_test_cec_node_1 --template cec-template
check:rc==1
check:output=~Error\: The attribute \"serial\" must be specified!
cmd:mkdef -t node -o auto_test_cec_node_1 --template cec-template serial=test
check:rc==1
check:output=~Error\: The attribute \"mtm\" must be specified!
cmd:mkdef -t node -o auto_test_cec_node_1 --template cec-template serial=test mtm=test
check:rc==1
check:output=~Error\: The attribute \"hcp\" must be specified!
cmd:mkdef -t node -o auto_test_cec_node_1 --template cec-template serial=test mtm=test hcp=test
checkrc==0
check:output=~1 object definitions have been created or modified
cmd:lsdef auto_test_cec_node_1
check:output=~Object name\: auto\_test\_cec\_node\_1
check:output=~groups\=cec\,all
check:output=~hwtype\=cec
check:output=~mgt\=hmc
check:output=~nodetype\=ppc
check:output=~postbootscripts\=otherpkgs
check:output=~postscripts\=syslog\,remoteshell\,syncfiles
check:output=~usercomment\=the cec definition template
check:output=~hcp\=test
check:output=~mtm\=test
check:output=~serial\=test
cmd:noderm auto_test_cec_node_1
check:rc==0
end
start:check_mkdef_node_with_template_priority
os:linux
description:create node named cec-template with cec template at beginning, the node is priority high than tempalate to create a new node
cmd:result=`lsdef | grep cec-template`; if [[ $result =~ "cec-template" ]]; then echo $result; noderm cec-template; fi
cmd:result=`lsdef | grep auto_test_cec_node`; if [[ $result =~ "auto_test_cec_node" ]]; then echo $result; noderm auto_test_cec_node; fi
cmd:mkdef -t node -o cec-template --template cec-template serial=test mtm=test hcp=test groups=test_template_priority
checkrc==0
check:output=~1 object definitions have been created or modified
cmd:mkdef -t node -o auto_test_cec_node --template cec-template serial=test2 mtm=test2 hcp=test2
checkrc==0
check:output=~1 object definitions have been created or modified
cmd:lsdef auto_test_cec_node
check:output=~Object name\: auto\_test\_cec\_node
check:output=~groups\=test\_template\_priority
check:output!=groups\=cec\,all
check:output=~hwtype\=cec
check:output=~mgt\=hmc
check:output=~nodetype\=ppc
check:output=~postbootscripts\=otherpkgs
check:output=~postscripts\=syslog\,remoteshell\,syncfiles
check:output=~usercomment\=the cec definition template
check:output=~hcp\=test2
check:output=~mtm\=test2
check:output=~serial\=test2
cmd:noderm cec-template
checkrc==0
cmd:noderm auto_test_cec_node
checkrc==0
end
start:mkdef_template_diskless_osimage_rootimgdir
os:linux
description:check rootimgdir warning message after make new osimage with mkdef --template
cmd:mkdef -t osimage -o test-osimage_with_template --template __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute
check:rc==0
output=~1 object definitions have been created or modified
cmd:xcatprobe osimagecheck
check:output=~Identical root image directory
check:output=~test-osimage
check:output=~__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute
cmd:rmdef -t osimage -o test-osimage_with_template
check:rc==0
end