merge from:
[monitor.git] / testapi.py
index fa81fd5..f473d4b 100755 (executable)
@@ -1,14 +1,15 @@
 #!/usr/bin/python
 
-import plc
 import sys
 import traceback
 
+from monitor.wrapper import plc
+
 api = plc.getAuthAPI()
-loginbase = "princeton"
 
 try:
-       site = api.GetSites(loginbase)[0]
+       # Just try the first site returned by the call
+       site = api.GetSites()[0]
        site_nodes = api.GetNodes(site['node_ids'])
        site_people = api.GetPersons(site['person_ids'])
        for node in site_nodes: