2010-09-20 08:10:57 +00:00
|
|
|
start:lsdef_null
|
2010-09-26 01:43:20 +00:00
|
|
|
description: lsdef without any flag
|
2011-11-15 05:49:33 +00:00
|
|
|
cmd:mkdef -t node -o testnodell groups=all
|
2011-05-17 07:08:03 +00:00
|
|
|
check:rc==0
|
2010-09-20 08:10:57 +00:00
|
|
|
cmd:lsdef
|
|
|
|
check:rc==0
|
2011-11-15 05:49:33 +00:00
|
|
|
check:output=~testnodell\s*\(node\)
|
|
|
|
cmd:rmdef testnodell
|
2011-05-17 07:08:03 +00:00
|
|
|
check:rc==0
|
2010-09-20 08:10:57 +00:00
|
|
|
end
|
2010-09-21 08:48:37 +00:00
|
|
|
|
2010-09-20 08:10:57 +00:00
|
|
|
start:lsdef_a
|
2010-09-26 01:43:20 +00:00
|
|
|
description: lsdef -a and lsdef --all
|
2010-09-20 08:10:57 +00:00
|
|
|
cmd:mkdef -t node -o testnode groups=all
|
|
|
|
check:rc==0
|
|
|
|
cmd:mkdef -t network -o testnetwork net=1.2.3.0 mask=255.255.255.0
|
|
|
|
check:rc==0
|
2011-05-17 07:08:03 +00:00
|
|
|
#prune auditlog and eventlog tables
|
|
|
|
#to avoid massive output with lsdef -a
|
|
|
|
cmd:tabprune auditlog -a
|
|
|
|
check:rc==0
|
|
|
|
cmd:tabprune eventlog -a
|
|
|
|
check:rc==0
|
2010-09-20 08:10:57 +00:00
|
|
|
cmd:lsdef -a
|
|
|
|
check:output=~testnode
|
|
|
|
check:output=~testnetwork
|
|
|
|
cmd:lsdef --all
|
|
|
|
check:output=~testnode
|
|
|
|
check:output=~testnetwork
|
|
|
|
cmd:rmdef -t network testnetwork
|
2011-05-17 07:08:03 +00:00
|
|
|
check:rc==0
|
2010-09-20 08:10:57 +00:00
|
|
|
cmd:rmdef -t node testnode
|
2011-05-17 07:08:03 +00:00
|
|
|
check:rc==0
|
2010-09-20 08:10:57 +00:00
|
|
|
end
|
2010-09-21 08:48:37 +00:00
|
|
|
|
2010-09-20 08:10:57 +00:00
|
|
|
start:lsdef_t_o_l
|
2010-09-26 01:43:20 +00:00
|
|
|
description: lsdef -o -l
|
2010-09-20 08:10:57 +00:00
|
|
|
cmd:mkdef -t node -o testnode groups=all
|
|
|
|
check:rc==0
|
|
|
|
cmd:mkdef -t network -o testnetwork net=1.2.3.0 mask=255.255.255.0
|
|
|
|
check:rc==0
|
|
|
|
cmd:lsdef -t node -l testnode
|
|
|
|
check:rc==0
|
|
|
|
check:output=~groups=all
|
|
|
|
check:output!~testnetwork
|
|
|
|
cmd:lsdef -t network -l testnetwork
|
|
|
|
check:rc==0
|
|
|
|
check:output=~net=1.2.3.0
|
|
|
|
check:output=~mask=255.255.255.0
|
|
|
|
check:output!~testnode
|
|
|
|
cmd:rmdef -t network testnetwork
|
2011-05-17 07:08:03 +00:00
|
|
|
check:rc==0
|
2010-09-20 08:10:57 +00:00
|
|
|
cmd:rmdef -t node testnode
|
2011-05-17 07:08:03 +00:00
|
|
|
check:rc==0
|
2010-09-20 08:10:57 +00:00
|
|
|
end
|
2010-09-21 08:48:37 +00:00
|
|
|
|
2010-09-20 08:10:57 +00:00
|
|
|
start:lsdef_t_o_l_z
|
2010-09-26 01:43:20 +00:00
|
|
|
description: lsdef -l -z
|
2010-09-20 08:10:57 +00:00
|
|
|
cmd:mkdef -t node -o testnode groups=all
|
|
|
|
check:rc==0
|
|
|
|
cmd:mkdef -t network -o testnetwork net=1.2.3.0 mask=255.255.255.0
|
|
|
|
check:rc==0
|
|
|
|
cmd:lsdef -t node -l testnode -z
|
|
|
|
check:rc==0
|
|
|
|
check:output=~testnode:
|
|
|
|
check:output=~objtype=node
|
|
|
|
check:output=~groups=all
|
|
|
|
cmd:lsdef -t network -l testnetwork -z
|
|
|
|
check:output=~testnetwork:
|
|
|
|
check:output=~objtype=network
|
|
|
|
check:output=~mask=255.255.255.0
|
|
|
|
check:output=~net=1.2.3.0
|
|
|
|
cmd:rmdef -t network testnetwork
|
|
|
|
cmd:rmdef -t node testnode
|
|
|
|
end
|
2010-09-21 08:48:37 +00:00
|
|
|
|
2010-09-20 08:10:57 +00:00
|
|
|
start:lsdef_t
|
2010-09-26 01:43:20 +00:00
|
|
|
description: lsdef -t
|
2010-09-20 08:10:57 +00:00
|
|
|
cmd:mkdef -t node -o testnode groups=all
|
|
|
|
check:rc==0
|
|
|
|
cmd:mkdef -t network -o testnetwork net=1.2.3.0 mask=255.255.255.0
|
|
|
|
check:rc==0
|
|
|
|
cmd:lsdef -t network
|
|
|
|
check:rc==0
|
|
|
|
check:output=~testnetwork
|
|
|
|
check:output!~testnode
|
|
|
|
cmd:rmdef -t network testnetwork
|
|
|
|
cmd:rmdef -t node testnode
|
|
|
|
end
|
2010-09-21 08:48:37 +00:00
|
|
|
|
2010-09-20 08:10:57 +00:00
|
|
|
start:lsdef_t_i_o
|
2010-09-26 01:43:20 +00:00
|
|
|
description: lsdef -i
|
|
|
|
cmd:mkdef -t node -o testnode groups=all
|
|
|
|
check:rc==0
|
|
|
|
cmd:lsdef -t node -o testnode -i groups
|
|
|
|
check:rc==0
|
|
|
|
check:output=~groups=all
|
|
|
|
check:output=~testnode
|
|
|
|
cmd:rmdef -t node testnode
|
2010-09-20 08:10:57 +00:00
|
|
|
cmd:mkdef -t network -o testnetwork net=1.2.3.0 mask=255.255.255.0
|
|
|
|
check:rc==0
|
|
|
|
cmd:lsdef -t network -i net
|
|
|
|
check:rc==0
|
|
|
|
check:output=~net=1.2.3.0
|
|
|
|
check:output!~mask
|
|
|
|
cmd:rmdef -t network testnetwork
|
|
|
|
end
|
2010-09-21 08:48:37 +00:00
|
|
|
|
2010-09-20 08:10:57 +00:00
|
|
|
start:lsdef_t_w
|
2012-12-19 05:41:02 +00:00
|
|
|
cmd:mkdef -t node -o testnode11,testnode21 cons=hmc groups=all
|
2010-09-20 08:10:57 +00:00
|
|
|
check:rc==0
|
2012-12-19 05:41:02 +00:00
|
|
|
cmd:mkdef -t node -o testnode31,testnode41 cons=ipmi groups=linux
|
2010-09-20 08:10:57 +00:00
|
|
|
check:rc==0
|
|
|
|
cmd:lsdef -t node -w cons==ipmi
|
|
|
|
check:rc==0
|
2011-11-15 05:49:33 +00:00
|
|
|
check:output=~testnode31
|
|
|
|
check:output=~testnode41
|
|
|
|
check:output!=testnode11
|
|
|
|
check:output!=testnode21
|
2010-09-20 08:10:57 +00:00
|
|
|
cmd:lsdef -t node -w cons!~hmc
|
|
|
|
check:rc==0
|
2011-11-15 05:49:33 +00:00
|
|
|
check:output=~testnode31
|
|
|
|
check:output=~testnode41
|
|
|
|
check:output!=testnode11
|
|
|
|
check:output!=testnode21
|
2010-09-26 01:43:20 +00:00
|
|
|
cmd:lsdef -t node -w cons==ipmi -w groups==linux
|
|
|
|
check:rc==0
|
2011-11-15 05:49:33 +00:00
|
|
|
check:output=~testnode31
|
|
|
|
check:output=~testnode41
|
|
|
|
check:output!=testnode11
|
|
|
|
check:output!=testnode21
|
|
|
|
cmd:rmdef -t node testnode11
|
|
|
|
cmd:rmdef -t node testnode21
|
|
|
|
cmd:rmdef -t node testnode31
|
|
|
|
cmd:rmdef -t node testnode41
|
2010-09-20 08:10:57 +00:00
|
|
|
end
|
2010-09-21 08:48:37 +00:00
|
|
|
|
2010-09-26 01:43:20 +00:00
|
|
|
start:lsdef_s
|
|
|
|
description: lsdef -s
|
|
|
|
cmd:mkdef -t node -o testnode groups=all
|
|
|
|
check:rc==0
|
|
|
|
cmd:lsdef -s testnode
|
|
|
|
check:rc==0
|
|
|
|
check:output=~testnode\s+\(node\)
|
|
|
|
cmd:rmdef -t node testnode
|
|
|
|
end
|
|
|
|
|
2011-05-17 07:08:03 +00:00
|
|
|
start:lsdef_t_auditlog
|
|
|
|
description:lsdef -t auditlog
|
|
|
|
cmd:tabprune auditlog -a
|
|
|
|
check:rc==0
|
|
|
|
cmd:lsdef -t auditlog
|
|
|
|
check:rc==0
|
|
|
|
check:output=~auditlog
|
|
|
|
end
|
|
|
|
|
|
|
|
start:lsdef_t_eventlog
|
|
|
|
description:lsdef -t eventlog
|
|
|
|
cmd:tabprune eventlog -a
|
|
|
|
check:rc==0
|
|
|
|
cmd:lsdef -t eventlog
|
|
|
|
check:rc==0
|
|
|
|
check:output!~not a valid xCAT object type
|
|
|
|
end
|
|
|
|
|
|
|
|
start:lsdef_t_policy
|
|
|
|
description:lsdef -t policy
|
|
|
|
cmd:lsdef -t policy
|
|
|
|
check:rc==0
|
|
|
|
check:output=~1\s+\(policy\)
|
|
|
|
cmd:lsdef -t policy -o 1 -l
|
|
|
|
check:rc==0
|
|
|
|
check:output=~rule=allow
|
|
|
|
end
|
|
|
|
|
|
|
|
start:lsdef_t_site
|
|
|
|
description:lsdef -t site
|
|
|
|
cmd:lsdef -t site
|
|
|
|
check:rc==0
|
|
|
|
check:output=~clustersite
|
|
|
|
cmd:lsdef -t site -o clustersite -l
|
|
|
|
check:rc==0
|
|
|
|
check:output=~xcatdport
|
|
|
|
end
|
|
|
|
|
2010-09-20 08:10:57 +00:00
|
|
|
start:lsdef_t_err
|
2011-05-17 07:08:03 +00:00
|
|
|
description:lsdef -t wrongtype -o
|
|
|
|
cmd:lsdef -t wrongtype -o test
|
2010-09-20 08:10:57 +00:00
|
|
|
check:rc!=0
|
|
|
|
check:output=~Error
|
|
|
|
end
|
2013-08-08 08:00:49 +00:00
|
|
|
|
|
|
|
start:lsdef_t_h_i
|
|
|
|
description:lsdef -t node -h -i status
|
|
|
|
cmd:lsdef -t node -h -i status
|
|
|
|
check:rc==0
|
|
|
|
check:output=~status
|
|
|
|
end
|
2013-08-08 08:21:03 +00:00
|
|
|
|
|
|
|
start:lsdef_nics
|
|
|
|
description:lsdef --nics
|
|
|
|
cmd:mkdef -t node -o testnode1 groups=all mgt=ipmi nicips.eth0=1.1.1.1
|
|
|
|
check:rc==0
|
|
|
|
cmd:lsdef testnode1 --nics
|
|
|
|
check:rc==0
|
|
|
|
check:output=~1.1.1.1
|
|
|
|
cmd:rmdef testnode1
|
|
|
|
check:rc==0
|
2013-08-08 08:41:06 +00:00
|
|
|
cmd:lsdef testnode1
|
|
|
|
check:output=~Could not find
|
2013-08-08 08:21:03 +00:00
|
|
|
end
|