From 9e11cce4dd86413306c81519b0c9ccd010009529 Mon Sep 17 00:00:00 2001 From: yinle Date: Tue, 27 May 2014 14:40:46 -0700 Subject: [PATCH] add cases0 --- .../autotest/testcase/restapi/table/cases0 | 101 ++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 xCAT-test/autotest/testcase/restapi/table/cases0 diff --git a/xCAT-test/autotest/testcase/restapi/table/cases0 b/xCAT-test/autotest/testcase/restapi/table/cases0 new file mode 100644 index 000000000..8fd8a3955 --- /dev/null +++ b/xCAT-test/autotest/testcase/restapi/table/cases0 @@ -0,0 +1,101 @@ +start:node_post_for_table_get +description: node_for_table_get +cmd:restapitest -m POST -r /nodes/tnode1 -d '{"groups":"all","mgt":"dfm","netboot":"xnba","provmethod":"rhels6.4-x86_64-install-compute","profile":"compute","arch":"x86_64","os":"rhels6.4"}' +check:rc==201 +end + +start:node_post_for_table_get +description: node_for_table_get +cmd:restapitest -m POST -r /nodes/tnode2 -d '{"groups":"all","mgt":"dfm","netboot":"yaboot","provmethod":"rhels6.4-ppc64-install-compute","profile":"compute","arch":"ppc64","os":"rhels6.4"}' +check:rc==201 +end + +start:table_get +description: table_get +cmd:restapitest -m GET -r /tables/nodetype/nodes/tnode1,tnode2 +check:rc==200 +cmdcheck:restapitest -o '{"nodetype":[{"arch":"ppc64"}]}' -O == +end + +start:table_get2 +description: table_get2 +cmd:restapitest -m GET -r /tables/nodetype,noderes/nodes/tnode1,tnode2 +check:rc==200 +cmdcheck:restapitest -o '{"nodetype":[{"arch":"ppc64"}]}' -O == +end + +start:table_put +description: table_put +cmd:restapitest -m PUT -r /tables/nodetype,noderes/nodes/tnode1,tnode2 -d '{"nodetype":{"arch":"x86_64"},"noderes":{"netboot":"xnba"}}' +check:rc==200 +end + +start:table_get3 +description: table_get3 +cmd:restapitest -m GET -r /tables/nodetype,noderes/nodes/tnode1,tnode2 +check:rc==200 +cmdcheck:restapitest -o '{"nodetype":[{"arch":"x86_64"}]}' -O == +end + +start:table_get_attr +description: table_get_attr +cmd:restapitest -m GET -r /tables/nodetype,noderes/nodes/tnode1,tnode2 +check:rc==200 +cmdcheck:restapitest -o '{"nodetype":[{"arch":"x86_64"}]}' -O == +end + +start:table_get_row +description: table_get_row +cmd:restapitest -m GET -r /tables/networks/rows +check:rc==200 +cmdcheck:restapitest -o '{"networks":[{"netname":"ANY"}]}' -O == +end + +start:table_get_row_key +description: table_get_row_key +cmd:restapitest -m GET -r /tables/networks/rows/net=9.114.154.64,mask=255.255.255.192 +check:rc==200 +cmdcheck:restapitest -o '{"networks":[{"mask":"255.255.255.192"}]}' -O == +end + +start:table_put +description: table_put +cmd:restapitest -m PUT -r /tables/routes/rows/routename=privnet -d '{"net":"10.0.1.0","mask":"255.255.255.0","gateway":"10.0.1.254","ifname":"eth1"}' +check:rc==200 +end + +start:table_get_row1 +description: table_get_row1 +cmd:restapitest -m GET -r /tables/routes/privnet +check:rc==200 +cmdcheck:restapitest -o '{"routes":[{"gateway":"10.0.1.254"}]}' -O == +end + +start:table_get_row_key1 +description: table_get_row_key1 +cmd:restapitest -m GET -r /tables/routes/rows/routename=privnet +check:rc==200 +cmdcheck:restapitest -o '{"networks":[{"ifname":"eth1"}]}' -O == +end + +start:table_delete_row +description: table_delete_row +cmd:restapitest -m DELETE -r /tables/routes/rows/routename=privnet +check:rc==200 +cmdcheck:restapitest -o '{"networks":[{"ifname":"eth1"}]}' -O == +end + +start:table_get_row_for_delete +description: table_get_row_for_delete +cmd:restapitest -m GET -r /tables/routes/privnet +check:rc==200 +cmdcheck:restapitest -o '{"routes":[{"gateway":"10.0.1.254"}]}' -O !== +end + +start:table_get_special_key +description: table_get_special_key +cmd:restapitest -m GET -r /tables/networks/rows/net=192.168.1.0,mask=255.255.255.0/mgtifname,tftpserver +check:rc==200 +cmdcheck:restapitest -o '{"networks":[{"mgtifname":"eth0"}]}' -O !== +end +