2010-09-20 08:10:57 +00:00
|
|
|
start:mkdef_null
|
2011-05-17 07:08:03 +00:00
|
|
|
description:mkdef without any flag
|
2010-09-20 08:10:57 +00:00
|
|
|
cmd:mkdef
|
|
|
|
check:rc!=0
|
|
|
|
check:output=~Usage
|
|
|
|
end
|
2010-09-21 08:50:13 +00:00
|
|
|
|
2011-05-17 07:08:03 +00:00
|
|
|
start:mkdef_node
|
|
|
|
description:mkdef -t node
|
2010-09-20 08:10:57 +00:00
|
|
|
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
|
2010-09-21 08:50:13 +00:00
|
|
|
|
2011-05-17 07:08:03 +00:00
|
|
|
start:mkdef_f
|
|
|
|
description:mkdef -f
|
2010-09-20 08:10:57 +00:00
|
|
|
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
|
2010-09-21 08:50:13 +00:00
|
|
|
|
2010-09-20 08:10:57 +00:00
|
|
|
start:mkdef_z
|
2011-05-17 07:08:03 +00:00
|
|
|
description:mkdef -z
|
2010-09-20 08:10:57 +00:00
|
|
|
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
|
2010-09-21 08:50:13 +00:00
|
|
|
|
2010-09-26 03:13:29 +00:00
|
|
|
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
|
|
|
|
|
2011-05-17 07:08:03 +00:00
|
|
|
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
|
|
|
|
|
2010-09-20 08:10:57 +00:00
|
|
|
start:mkdef_t_o_error
|
2011-05-17 07:08:03 +00:00
|
|
|
description:mkdef -t wrongtype
|
|
|
|
cmd:mkdef -t wrongtype -o testnode groups=all,aix
|
2010-09-20 08:10:57 +00:00
|
|
|
check:rc!=0
|
2011-05-17 07:08:03 +00:00
|
|
|
check:output=~Usage
|
2010-09-20 08:10:57 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|