From 0cf4be5a5f1b336400e50b6180fe3990b35565ee Mon Sep 17 00:00:00 2001 From: yinle Date: Tue, 27 May 2014 14:39:24 -0700 Subject: [PATCH] add cases0 --- .../autotest/testcase/restapi/network/cases0 | 74 +++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 xCAT-test/autotest/testcase/restapi/network/cases0 diff --git a/xCAT-test/autotest/testcase/restapi/network/cases0 b/xCAT-test/autotest/testcase/restapi/network/cases0 new file mode 100644 index 000000000..2851f39b1 --- /dev/null +++ b/xCAT-test/autotest/testcase/restapi/network/cases0 @@ -0,0 +1,74 @@ +start:get_networks +description: get_networks +cmd:restapitest -m GET -r /networks +check:rc==200 +cmdcheck:restapitest -o '["network1"]' -O == +end + +start:post_networks +description: post_networks +cmd:restapitest -m POST -r /networks +check:rc==201 +end + +start:get_networks_attr_for_post +description: get_networks_attr_for_post +cmd:restapitest -m GET -r /networks/network1 +check:rc==200 +cmdcheck:restapitest -o '{"network1":{"net":"10.1.0.0"}}' -O == +end + +start:post_networks_attr +description: post_networks_attr +cmd:restapitest -m GET -r /networks/network1 -d '{"gateway":"10.1.0.1","mask":"255.255.0.0"}' +check:rc==201 +end + +start:get_networks_all_attr +description: get_networks_all_attr +cmd:restapitest -m GET -r /networks/network1 +check:rc==200 +cmdcheck:restapitest -o '{"network1":{"net":"10.1.0.0"}}' -O == +end + +start:get_networks_attr +description: get_networks_attr +cmd:restapitest -m GET -r /networks/network1/attrs/net,mask +check:rc==200 +cmdcheck:restapitest -o '{"network1":{"net":"10.1.0.0"}}' -O == +end + +start:put_networks_attr +description: put_networks_attr +cmd:restapitest -m PUT -r /networks/network1 -d '{"mgtifname":"eth0","net":"10.1.0.0"}' +check:rc==200 +end + +start:get_networks_attr_for_put +description: get_networks_attr_for_put +cmd:restapitest -m GET -r /networks/network1 +check:rc==200 +cmdcheck:restapitest -o '{"network1":{"net":"10.1.0.0"}}' -O == +end + +start:delete_networks_attr_for_put +description: delete_networks_attr_for_put +cmd:restapitest -m DELETE -r /networks/network1 +check:rc==200 +end + +start:get_networks_for_delete +description: get_networks_for_delete +cmd:restapitest -m GET -r /networks +check:rc==200 +cmdcheck:restapitest -o '["network1"]' -O != +end + + + + + + + + +