xcat-core/xCAT-test/autotest/testcase/mkdef/cases0
2011-03-23 05:27:40 +00:00

144 lines
3.5 KiB
Plaintext

start:mkdef_null
cmd:mkdef
check:rc!=0
check:output=~Usage
end
start:mkdef_t_o_attr
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_t_o_attr
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
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_o_error
cmd:mkdef -t testtype -o testnode groups=all,aix
check:rc!=0
check:output=~Error
end