From 29c8b4216b608efd50319aa05925d7034d4716b9 Mon Sep 17 00:00:00 2001 From: Bruce Potter Date: Tue, 25 Feb 2014 04:11:22 -0500 Subject: [PATCH] removed user/pw from xcatws-test.sh --- xCAT-server/xCAT-wsapi/xcatws-test.sh | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/xCAT-server/xCAT-wsapi/xcatws-test.sh b/xCAT-server/xCAT-wsapi/xcatws-test.sh index b18edf98e..a82e5925b 100755 --- a/xCAT-server/xCAT-wsapi/xcatws-test.sh +++ b/xCAT-server/xCAT-wsapi/xcatws-test.sh @@ -12,20 +12,21 @@ format='format=json&pretty=1' #todo: add a test case for every api call that is documented #todo: figure out why i currently have to specify -k -curl -X GET -k "https://127.0.0.1/xcatws/nodes?userName=$user&password=$pw&format=xml" -curl -X GET -k "https://127.0.0.1/xcatws/nodes?userName=$user&password=$pw&format=xml&field=mac" -curl -X GET -k "https://127.0.0.1/xcatws/nodes/test001-test006?userName=$user&password=$pw&format=xml" -curl -X GET -k "https://127.0.0.1/xcatws/nodes/test001-test006?userName=$user&password=$pw&format=xml&field=mac" +curl -X GET -k "https://127.0.0.1/xcatws/nodes?userName=$user&password=$pw&$format" +curl -X GET -k "https://127.0.0.1/xcatws/nodes?userName=$user&password=$pw&$format&field=mac" +curl -X GET -k "https://127.0.0.1/xcatws/nodes/test001-test006?userName=$user&password=$pw&$format" +curl -X GET -k "https://127.0.0.1/xcatws/nodes/test001-test006?userName=$user&password=$pw&$format&field=mac" curl -X DELETE -k "http://127.0.0.1/xcatws/nodes/test001?userName=$user&password=$pw" -curl -X PUT -k "https://127.0.0.1/xcatws/nodes/test001?userName=$user&password=$pw&format=xml&debug=0" -H Content-Type:application/json --data '{"room":"hi","unit":"7"}' -curl -X POST -k "https://127.0.0.1/xcatws/nodes/ws1?userName=$user&password=$pw&format=xml&debug=0" -H Content-Type:application/json --data '{"groups":"wstest"}' +curl -X PUT -k "https://127.0.0.1/xcatws/nodes/test001?userName=$user&password=$pw&$format" -H Content-Type:application/json --data '{"room":"hi","unit":"7"}' +curl -X POST -k "https://127.0.0.1/xcatws/nodes/ws1?userName=$user&password=$pw&$format" -H Content-Type:application/json --data '{"groups":"wstest"}' +curl -X POST -k "https://127.0.0.1/xcatws/nodes/bruce/dsh?userName=$user&password=$pw&$format" -H Content-Type:application/json --data '["command=date"]' -curl -X GET -k "https://127.0.0.1/xcatws/groups?userName=$user&password=$pw&format=xml" +curl -X GET -k "https://127.0.0.1/xcatws/groups?userName=$user&password=$pw&$format" -curl -X GET -k "https://127.0.0.1/xcatws/images?userName=$user&password=$pw&format=xml" -curl -X GET -k "https://127.0.0.1/xcatws/images?userName=$user&password=$pw&format=xml&field=osvers" -curl -X GET -k "https://127.0.0.1/xcatws/images/bp-netboot?userName=$user&password=$pw&format=xml" -curl -X GET -k "https://127.0.0.1/xcatws/images/bp-netboot?userName=$user&password=$pw&format=xml&field=osvers" +curl -X GET -k "https://127.0.0.1/xcatws/images?userName=$user&password=$pw&$format" +curl -X GET -k "https://127.0.0.1/xcatws/images?userName=$user&password=$pw&$format&field=osvers" +curl -X GET -k "https://127.0.0.1/xcatws/images/bp-netboot?userName=$user&password=$pw&$format" +curl -X GET -k "https://127.0.0.1/xcatws/images/bp-netboot?userName=$user&password=$pw&$format&field=osvers" #todo: remove when these test cases are in xcatws-test.pl ./xcatws-test.pl -u "https://127.0.0.1/xcatws/nodes/test001?userName=$user&password=$pw" -m GET