2010-09-20 08:10:57 +00:00
|
|
|
start:chdef_null
|
2011-05-17 07:08:03 +00:00
|
|
|
description:chdef without any flag
|
2010-09-20 08:10:57 +00:00
|
|
|
cmd:chdef
|
|
|
|
check:output=~Usage
|
|
|
|
end
|
2010-09-21 08:44:17 +00:00
|
|
|
|
2011-05-17 07:08:03 +00:00
|
|
|
start:chdef_t_node
|
|
|
|
description:chdef -t node
|
|
|
|
cmd:mkdef -t node -o testnode groups=all
|
|
|
|
check:rc==0
|
|
|
|
cmd:chdef -t node -o testnode groups=aix
|
|
|
|
check:rc==0
|
|
|
|
cmd:lsdef -t node -l testnode
|
|
|
|
check:rc==0
|
|
|
|
check:output=~groups=aix
|
|
|
|
cmd:chdef testnode groups=linux
|
|
|
|
check:rc==0
|
|
|
|
cmd:lsdef -t node -l testnode
|
|
|
|
check:rc==0
|
|
|
|
check:output=~groups=linux
|
|
|
|
cmd:rmdef -t node testnode
|
|
|
|
check:rc==0
|
|
|
|
end
|
|
|
|
|
|
|
|
start:chdef_t_network
|
|
|
|
description:chdef -t network
|
2010-09-20 08:10:57 +00:00
|
|
|
cmd:chdef -t network -o testnetwork net=111.222.33.0 mask=255.255.255.254
|
|
|
|
check:rc==0
|
|
|
|
cmd:lsdef -t network -l testnetwork
|
|
|
|
check:rc==0
|
|
|
|
check:output=~net=111.222.33.0
|
|
|
|
check:output=~mask=255.255.255.254
|
|
|
|
cmd:chdef -t network -o testnetwork net=111.222.34.0 mask=255.255.255.254 gateway=111.222.34.1
|
|
|
|
check:rc==0
|
|
|
|
cmd:lsdef -t network -l testnetwork
|
|
|
|
check:rc==0
|
|
|
|
check:output=~net=111.222.34.0
|
|
|
|
check:output=~mask=255.255.255.254
|
|
|
|
check:output=~gateway=111.222.34.1
|
|
|
|
cmd:rmdef -t network testnetwork
|
|
|
|
end
|
2010-09-21 08:44:17 +00:00
|
|
|
|
2011-05-17 07:08:03 +00:00
|
|
|
start:chdef_p
|
|
|
|
description:chdef -p -t node
|
2010-09-20 08:10:57 +00:00
|
|
|
cmd:mkdef -t node -o testnode groups=all
|
|
|
|
check:rc==0
|
|
|
|
cmd:chdef -p -t node -o testnode groups=aix
|
|
|
|
check:rc==0
|
|
|
|
cmd:lsdef -t node -l testnode
|
|
|
|
check:output=~groups=all,aix
|
|
|
|
cmd:rmdef -t node testnode
|
|
|
|
end
|
2010-09-21 08:44:17 +00:00
|
|
|
|
2011-05-17 07:08:03 +00:00
|
|
|
start:chdef_m
|
|
|
|
description:chdef -m -t node
|
2010-09-20 08:10:57 +00:00
|
|
|
cmd:mkdef -t node -o testnode groups=all,testgroup
|
|
|
|
check:rc==0
|
|
|
|
cmd:chdef -m -t node -o testnode groups=testgroup
|
|
|
|
check:rc==0
|
|
|
|
cmd:lsdef -t node -l testnode
|
|
|
|
check:output!~testgroup
|
|
|
|
cmd:rmdef -t node testnode
|
|
|
|
end
|
2010-09-21 08:44:17 +00:00
|
|
|
|
2010-09-20 08:10:57 +00:00
|
|
|
start:chdef_z
|
2011-05-17 07:08:03 +00:00
|
|
|
description:chdef -z
|
2010-09-20 08:10:57 +00:00
|
|
|
cmd:mkdef -t node -o testnode groups=all
|
|
|
|
check:rc==0
|
2011-05-17 07:08:03 +00:00
|
|
|
cmd:lsdef testnode -z > /tmp/testnode.stanza
|
2010-09-20 08:10:57 +00:00
|
|
|
check:rc==0
|
2011-05-17 07:08:03 +00:00
|
|
|
cmd:perl -pi -e 's/all/aix/g' /tmp/testnode.stanza
|
2010-09-20 08:10:57 +00:00
|
|
|
cmd:cat /tmp/testnode.stanza | chdef -z
|
|
|
|
check:rc==0
|
2011-05-17 07:08:03 +00:00
|
|
|
cmd:lsdef testnode -l
|
2010-09-20 08:10:57 +00:00
|
|
|
check:rc==0
|
2011-05-17 07:08:03 +00:00
|
|
|
check:output=~groups=aix
|
2010-09-20 08:10:57 +00:00
|
|
|
cmd:rm -f /tmp/testnode.stanza
|
|
|
|
cmd:rmdef -t node testnode
|
|
|
|
check:rc==0
|
|
|
|
end
|
2010-09-21 08:44:17 +00:00
|
|
|
|
2010-09-27 01:44:46 +00:00
|
|
|
start:chdef_group
|
|
|
|
description:chdef with 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
|
2011-05-17 07:08:03 +00:00
|
|
|
cmd:mkdef -t group -o testgrp1 members=testnode1,testnode3
|
2010-09-27 01:44:46 +00:00
|
|
|
check:rc==0
|
2011-05-17 07:08:03 +00:00
|
|
|
cmd:lsdef -s testgrp1
|
2010-09-27 01:44:46 +00:00
|
|
|
check:rc==0
|
|
|
|
check:output=~testnode1
|
|
|
|
check:output=~testnode3
|
|
|
|
check:output!~testnode2
|
|
|
|
check:output!~testnode4
|
2011-05-17 07:08:03 +00:00
|
|
|
cmd:chdef -t group -o testgrp1 -p members=testnode2,testnode4
|
2010-09-27 01:44:46 +00:00
|
|
|
check:rc==0
|
2011-05-17 07:08:03 +00:00
|
|
|
cmd:lsdef -s testgrp1
|
2010-09-27 01:44:46 +00:00
|
|
|
check:rc==0
|
|
|
|
check:output=~testnode1
|
|
|
|
check:output=~testnode3
|
|
|
|
check:output=~testnode2
|
|
|
|
check:output=~testnode4
|
2011-05-17 07:08:03 +00:00
|
|
|
cmd:chdef -t group -o testgrp1 -m members=testnode1,testnode2
|
2010-09-27 01:44:46 +00:00
|
|
|
check:rc==0
|
2011-05-17 07:08:03 +00:00
|
|
|
cmd:lsdef -s testgrp1
|
2010-09-27 01:44:46 +00:00
|
|
|
check:rc==0
|
|
|
|
check:output!~testnode1
|
|
|
|
check:output=~testnode3
|
|
|
|
check:output!~testnode2
|
|
|
|
check:output=~testnode4
|
2011-05-17 07:08:03 +00:00
|
|
|
cmd:rmdef -t group testgrp1
|
2010-09-27 01:44:46 +00:00
|
|
|
check:rc==0
|
|
|
|
cmd:rmdef -t node -o testnode1-testnode4
|
|
|
|
check:rc==0
|
|
|
|
end
|
|
|
|
|
|
|
|
start:chdef_dynamic_group
|
|
|
|
description:chdef 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=hmc cons=ipmi groups=all,systemx
|
|
|
|
check:rc==0
|
|
|
|
cmd:mkdef -t group -o dyngrp -d -w cons==hmc
|
|
|
|
check:rc==0
|
|
|
|
cmd:lsdef -s dyngrp
|
|
|
|
check:rc==0
|
|
|
|
check:output=~testnode1
|
|
|
|
check:output=~testnode2
|
|
|
|
check:output!~testnode3
|
|
|
|
check:output!~testnode4
|
|
|
|
cmd:chdef -t group -o dyngrp -d -w mgt==hmc
|
|
|
|
check:rc==0
|
|
|
|
cmd:lsdef -s dyngrp
|
|
|
|
check:rc==0
|
|
|
|
check:output=~testnode1
|
|
|
|
check:output=~testnode2
|
|
|
|
check:output=~testnode3
|
|
|
|
check:output=~testnode4
|
|
|
|
cmd:chdef -t group -o dyngrp -d -p -w cons==hmc -w groups=~systemp
|
|
|
|
check:rc==0
|
|
|
|
cmd:lsdef -s dyngrp
|
|
|
|
check:rc==0
|
|
|
|
check:output=~testnode1
|
|
|
|
check:output=~testnode2
|
|
|
|
check:output!~testnode3
|
|
|
|
check:output!~testnode4
|
|
|
|
cmd:lsdef -t group -o dyngrp
|
|
|
|
check:rc==0
|
|
|
|
check:output=~wherevals=mgt==hmc::cons==hmc::groups=~systemp
|
|
|
|
cmd:chdef -t group -o dyngrp -d -m -w cons==hmc -w groups=~systemp
|
|
|
|
check:rc==0
|
|
|
|
cmd:lsdef -s dyngrp
|
|
|
|
check:output=~testnode1
|
|
|
|
check:output=~testnode2
|
|
|
|
check:output=~testnode3
|
|
|
|
check:output=~testnode4
|
|
|
|
cmd:rmdef -t group -o dyngrp
|
|
|
|
check:rc==0
|
|
|
|
cmd:rmdef -t node -o testnode1-testnode4
|
|
|
|
check:rc==0
|
|
|
|
end
|
|
|
|
|
|
|
|
start:chdef_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:chdef -t node -o testfsp groups=fsp passwd.HMC=HMC passwd.general=general passwd.admin=admin
|
|
|
|
check:rc==0
|
|
|
|
cmd:lsdef testfsp
|
|
|
|
check:rc==0
|
|
|
|
check:output=~passwd.HMC=HMC
|
|
|
|
check:output=~passwd.general=general
|
|
|
|
check:output=~passwd.admin=admin
|
|
|
|
cmd:rmdef -t node -o testfsp
|
|
|
|
check:rc==0
|
|
|
|
end
|
|
|
|
|
2011-05-17 07:08:03 +00:00
|
|
|
start:chdef_n
|
|
|
|
description:chdef -n
|
|
|
|
cmd:mkdef -t node -o testnode1 mgt=hmc cons=hmc groups=all,systemp
|
|
|
|
check:rc==0
|
|
|
|
cmd:chdef testnode1 -n testnode2
|
|
|
|
check:rc==0
|
|
|
|
cmd:lsdef testnode1
|
|
|
|
check:output=~Could not find
|
|
|
|
cmd:lsdef testnode2
|
|
|
|
check:rc==0
|
|
|
|
check:output=~Object name
|
|
|
|
check:output=~mgt=hmc
|
|
|
|
check:output=~cons=hmc
|
|
|
|
check:output=~groups=all,systemp
|
|
|
|
cmd:rmdef testnode2
|
|
|
|
check:rc==0
|
|
|
|
end
|
|
|
|
|
2010-09-20 08:10:57 +00:00
|
|
|
start:chdef_t_o_error
|
2011-05-17 07:08:03 +00:00
|
|
|
description:chdef -t wrongtype
|
|
|
|
cmd:chdef -t wrongtype -o testnode groups=all,aix
|
2010-09-20 08:10:57 +00:00
|
|
|
check:rc!=0
|
2011-06-16 01:20:59 +00:00
|
|
|
check:output=~not a valid
|
2010-09-20 08:10:57 +00:00
|
|
|
end
|