add cases for mkdef

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@7646 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
ligc 2010-09-26 03:13:29 +00:00
parent edaba6aae6
commit f383b5f522

View File

@ -46,6 +46,93 @@ 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