curl working for xcatws.cgi put and some reorg of code

This commit is contained in:
Bruce Potter 2014-02-09 15:43:37 -05:00
parent dd8096b39f
commit 80d4cf913b
2 changed files with 513 additions and 485 deletions

View File

@ -1,17 +1,20 @@
#!/bin/bash
# test & doc all current calls
# finish test driver (including calling it natively from perl)
# add debugging and fix bugs:
# - all put and post calls
# - is the data sent back given the correct Content/Type?
# change structure of json and add Returns lines to doc
# add missing functionality
# - nodeset stat
# - osimage create and change and delete and copycds
# - return metadata of resources (list of possible attributes of def objects)
# - eliminate pw in url - api key or certificates (bai yuan)
# do perf test and optimize code
# * test & doc all current calls
# - finish test driver (both curl and natively from perl)
# * add debugging and fix bugs
# - change xdsh/xdcp to post and compact that code
# - change format of all put and post calls
# - change structure of output json and add Returns lines to doc
# - add nodeset stat
# - change table routines to use lissa's xml interface and doc them as an alternative to the node def calls
# - add: osimage def create, change, delete and copycds (bai yuan)
# - eliminate pw in url - api key or certificates (bai yuan)
# - send output back to client as it comes from xcatd, and compare code to Client.pm (bai yuan)
# - is the data sent back given the correct Content/Type? (bai yuan)
# - test, fix, doc the other resource handlers in there: groups, logs, notifications, policies, accounts, hypervisor(bai yuan)
# - do perf/scale tests and optimize code, incl breaking resource handlers into separate pms
# - return metadata of resources (list of possible attributes of def objects)(bai yuan)
userpw = 'userName=bp&password=bryan1'
format = 'format=xml'
@ -24,6 +27,8 @@ curl -X GET -k 'https://127.0.0.1/xcatws/nodes/test001-test006?userName=bp&passw
#curl -X PUT -k --data '{"room":"foo"}' 'https://127.0.0.1/xcatws/nodes/test001?userName=bp&password=bryan1'
#curl -X POST -k --data '{"groups":"compute,all"}' 'https://127.0.0.1/xcatws/nodes/test001?userName=bp&password=bryan1'
curl -X DELETE -k 'http://127.0.0.1/xcatws/nodes/test001?userName=bp&password=bryan1'
curl -X PUT -k 'https://127.0.0.1/xcatws/nodes/test001?userName=bp&password=bryan1&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=bp&password=bryan1&format=xml&debug=0' -H Content-Type:application/json --data '{"groups":"wstest"}'
curl -X GET -k 'https://127.0.0.1/xcatws/groups?userName=bp&password=bryan1&format=xml'

File diff suppressed because it is too large Load Diff