git://git.onelab.eu
/
monitor.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
36dd7bb
)
simple script to verify basic sanity of the api before proceeding with the
author
Stephen Soltesz
<soltesz@cs.princeton.edu>
Fri, 8 Aug 2008 18:04:18 +0000
(18:04 +0000)
committer
Stephen Soltesz
<soltesz@cs.princeton.edu>
Fri, 8 Aug 2008 18:04:18 +0000
(18:04 +0000)
collection of node information
testapi.py
[new file with mode: 0755]
patch
|
blob
diff --git a/testapi.py
b/testapi.py
new file mode 100755
(executable)
index 0000000..
fa81fd5
--- /dev/null
+++ b/
testapi.py
@@ -0,0
+1,19
@@
+#!/usr/bin/python
+
+import plc
+import sys
+import traceback
+
+api = plc.getAuthAPI()
+loginbase = "princeton"
+
+try:
+ site = api.GetSites(loginbase)[0]
+ site_nodes = api.GetNodes(site['node_ids'])
+ site_people = api.GetPersons(site['person_ids'])
+ for node in site_nodes:
+ network = api.GetNodeNetworks(node['nodenetwork_ids'])
+ print "ok"
+except:
+ sys.stderr.write(traceback.print_exc())
+ print "fail"