start:nodech_noderange_table
description:nodech testnode groups=all,rhels5.5 nodetype.os=rhels5.5 nodehm.mgt=hmc
label:mn_only,db
cmd:chdef -t node -o testnode groups=all,rhels5.4
check:rc==0
cmd:nodech testnode groups=all,rhels5.5 nodetype.os=rhels5.5 nodehm.mgt=hmc
check:rc==0
cmd:lsdef -t node -i groups,os,mgt testnode
check:output=~groups=all,rhels5.5
check:output=~os=rhels5.5
check:output=~mgt=hmc
cmd:rmdef -t node testnode
end


start:nodech_noderange_table_comma
description:nodech testnode groups,=rhels5.5.Check nodech command with ,=.
label:mn_only,db
cmd:chdef -t node -o testnode groups=all
check:rc==0
cmd:nodech testnode groups,=rhels5.5
check:rc==0
cmd:lsdef -t node -i groups testnode
check:output=~groups=rhels5.5,all
cmd:rmdef -t node testnode
end


start:nodech_noderange_table_arrow
label:mn_only,db
cmd:chdef -t node -o testnode groups=all,rhels5.5
check:rc==0
cmd:nodech testnode groups^=rhels5.5
check:rc==0
cmd:lsdef -t node -i groups testnode
check:output!=rhels5.5
cmd:rmdef -t node testnode
end


start:nodech_noderange_table_comma_arrow
description:nodech testnode groups^=rhels5.5 groups,=rhels5.4 . Check nodech command with both ^= and ,=.
label:mn_only,db
cmd:chdef -t node -o testnode groups=all,rhels5.5
check:rc==0
cmd:nodech testnode groups^=rhels5.5 groups,=rhels5.4
check:rc==0
cmd:lsdef -t node -i groups testnode
check:output=~groups=rhels5.4,all
cmd:rmdef -t node testnode
end

start:nodech_noderanage_table_at
description:nodech testnode nodetype.os=@=helloworld.Check nodech command with =@=.
label:mn_only,db
cmd:chdef -t node -o testnode os=hello groups=all
check:rc==0
cmd:nodech testnode nodetype.os=@=helloworld
check:rc==0
cmd:lsdef -t node -i os testnode
check:output=~os==helloworld
cmd:rmdef -t node testnode
end


start:nodech_noderange_table_include
description:nodech groups=~rh4.123456789 groups=rhels5.5.The command nodech with =~.
label:mn_only,db
cmd:chdef -t node -o testnode groups=rh4.123456789
check:rc==0
cmd:nodech groups=~rh4.123456789 groups=rhels5.5
check:rc==0
cmd:lsdef -t node -i groups testnode
check:output=~groups=rhels5.5
cmd:rmdef -t node testnode
end

start:nodech_noderange_table_uninclude
description:nodech testnode1-testnode2 nodelist.groups\!~rhels5.5 nodelist.groups=rhels5.5,all.The command nodech with !~.
label:mn_only,db
cmd:chdef -t node -o testnode1 groups=rhels5.5,all
check:rc==0
cmd:chdef -t node -o testnode2 groups=rhels5.4,all
check:rc==0
cmd:nodech testnode1-testnode2 nodelist.groups\!~rhels5.5 nodelist.groups=rhels5.5,all
check:rc==0
cmd:lsdef -t node -i groups testnode2
check:output=~groups=rhels5.5,all
cmd:rmdef -t node testnode1-testnode2
end


start:nodech_noderange_table_equal
description:nodech groups==rh4.123456789 groups=rhels5.5.The command nodech with ==.
label:mn_only,db
cmd:chdef -t node -o testnode groups=rh4.123456789
check:rc==0
cmd:nodech groups==rh4.123456789 groups=rhels5.5
check:rc==0
cmd:lsdef -t node -i groups testnode
check:output=~groups=rhels5.5
cmd:rmdef -t node testnode
end


start:nodech_noderange_table_unequal
description::nodech testnode1-testnode2 groups!=rhels5.5 groups=rhels5.5.The command nodech with !=.
label:mn_only,db
cmd:chdef -t node -o testnode1 groups=rhels5.5
check:rc==0
cmd:chdef -t node -o testnode2 groups=rhels5.4
check:rc==0
cmd:nodech testnode1-testnode2 groups!=rhels5.5 groups=rhels5.5
check:rc==0
cmd:lsdef -t node -i groups testnode2
check:output=~groups=rhels5.5
cmd:rmdef -t node testnode1-testnode2
end

start:nodech_noderange_shortname_groups
description:nodech testnode groups=rhels5.4.The nodech use shortname groups
label:mn_only,db
cmd:chdef -t node -o testnode groups=rhels5.5
check:rc==0
cmd:nodech testnode groups=rhels5.4
check:rc==0
cmd:lsdef -t node -i groups testnode
check:output=~groups=rhels5.4
cmd:rmdef -t node testnode
end


start:nodech_noderange_shortname_tags
description:nodech testnode tags=rhels5.4.The nodech use shortname tags
label:mn_only,db
cmd:chdef -t node -o testnode groups=rhels5.5
check:rc==0
cmd:nodech testnode tags=rhels5.4
check:rc==0
cmd:lsdef -t node -i groups testnode
check:output=~groups=rhels5.4
cmd:rmdef -t node testnode
end


start:nodech_noderange_shortname_mgt
description:nodech testnode mgt=hmc.The nodech use shortname mgt
label:mn_only,db
cmd:chdef -t node -o testnode mgt=blade  groups=all
check:rc==0
cmd:nodech testnode mgt=hmc
check:rc==0
cmd:lsdef -t node -i mgt testnode
check:output=~mgt=hmc
cmd:rmdef -t node testnode
end

start:nodech_delete
description:nodech -d
label:mn_only,db
cmd:chdef -t node -o testnode os=hello groups=all
check:rc==0
cmd:nodech -d testnode nodetype
check:rc==0
cmd:tabdump nodetype | grep testnode
check:output!~testnode
cmd:rmdef -t node testnode
end

start:nodech_h
description:nodech -h
label:mn_only,db
cmd:nodech -h
check:output=~Usage
cmd:nodech -?
check:output=~Usage
cmd:nodech --help
check:output=~Usage
end

start:nodech_v
description:nodech -v
label:mn_only,db
cmd:nodech -v
check:output=~Version
end


start:nodech_d_error
description:nodech --delete
label:mn_only,db
cmd:chdef -t node -o testnode os=hello groups=test
check:rc==0
cmd:nodech --delete
check:rc!=0
check:output=~Usage
cmd:nodech -d
check:rc!=0
check:output=~Usage
cmd:rmdef -t node testnode
end


start:nodech_error_node
description: nodech error noderange,nodech testnode1 groups=all,rhels5.5 nodetype.os=rhels5.5 nodehm.mgt=hmc
label:mn_only,db
cmd:chdef -t node -o testnode groups=all,rhels5.4
check:rc==0
cmd:nodech testnode1 groups=all,rhels5.5 nodetype.os=rhels5.5 nodehm.mgt=hmc
check:rc!=0
check:output=~Error
cmd:rmdef -t node testnode
end


start:nodech_error_table
description: nodech error table.
label:mn_only,db
cmd:chdef -t node -o testnode groups=all,rhels5.4
check:rc==0
cmd:nodech testnode groups=all,rhels5.5 nodetypes.os=rhels5.5 nodehm.mgt=hmc
check:rc!=0
check:output=~Error
cmd:rmdef -t node testnode
end
