update basic documentation files.
authorStephen Soltesz <soltesz@cs.princeton.edu>
Mon, 4 May 2009 20:52:09 +0000 (20:52 +0000)
committerStephen Soltesz <soltesz@cs.princeton.edu>
Mon, 4 May 2009 20:52:09 +0000 (20:52 +0000)
docs/DocBookLocal.py
getsshkeys.py
web/MonitorWeb/monitorweb/monitor_xmlrpc.py

index 62853a8..d9d8164 100755 (executable)
@@ -2,17 +2,17 @@
 
 # PATHS to be set by the build system
 # this is in ..
 
 # PATHS to be set by the build system
 # this is in ..
-import api_calls
+from monitor_xmlrpc import MonitorXmlrpcServer as docobject
 # in PLCAPI/doc
 from DocBook import DocBook
 
 def api_methods():
     api_function_list = []
 # in PLCAPI/doc
 from DocBook import DocBook
 
 def api_methods():
     api_function_list = []
-    for func in dir(api_calls):
+    for func in dir(docobject):
         try:
         try:
-            f = api_calls.__getattribute__(func)
+            f = getattr(docobject,func)
             if 'group' in f.__dict__.keys():
             if 'group' in f.__dict__.keys():
-                api_function_list += [api_calls.__getattribute__(func)]
+                    api_function_list += [getattr(docobject,func)]
         except:
             pass
     return api_function_list
         except:
             pass
     return api_function_list
index 7b74759..fb4c2a7 100755 (executable)
@@ -135,15 +135,15 @@ class SSHKnownHosts:
                if type(host) == type(""): host = [host]
 
                # get the node(s) info
                if type(host) == type(""): host = [host]
 
                # get the node(s) info
-               nodes = self.api.GetNodes(self.auth,host,["hostname","ssh_rsa_key","interface_ids"])
+               nodes = self.api.GetNodes(self.auth,host,["hostname","ssh_rsa_key","nodenetwork_ids"])
 
                # for each node's node network, update the self.nodenetworks cache
                nodenetworks = []
                for node in nodes:
 
                # for each node's node network, update the self.nodenetworks cache
                nodenetworks = []
                for node in nodes:
-                       for net in node["interface_ids"]:
+                       for net in node["nodenetwork_ids"]:
                                nodenetworks.append(net)
 
                                nodenetworks.append(net)
 
-               plcnodenetworks = self.api.GetInterfaces(self.auth,nodenetworks,["nodenetwork_id","ip"])
+               plcnodenetworks = self.api.GetNodeNetworks(self.auth,nodenetworks,["nodenetwork_id","ip"])
                for n in plcnodenetworks:
                        self.nodenetworks[n["nodenetwork_id"]]=n
                return nodes
                for n in plcnodenetworks:
                        self.nodenetworks[n["nodenetwork_id"]]=n
                return nodes
@@ -152,7 +152,7 @@ class SSHKnownHosts:
                host = node['hostname']
                key = node['ssh_rsa_key']
 
                host = node['hostname']
                key = node['ssh_rsa_key']
 
-               nodenetworks = node['interface_ids']
+               nodenetworks = node['nodenetwork_ids']
                if len(nodenetworks)==0: return (host, None, None, None)
 
                # the [0] subscript to node['interface_ids'] means
                if len(nodenetworks)==0: return (host, None, None, None)
 
                # the [0] subscript to node['interface_ids'] means
index 78692ff..ce1f26c 100644 (file)
@@ -5,8 +5,11 @@ import turbogears
 from datetime import datetime, timedelta
 import time
 
 from datetime import datetime, timedelta
 import time
 
-from monitor.database.info.model import *
-from monitor.database.info.interface import *
+try:
+       from monitor.database.info.model import *
+       from monitor.database.info.interface import *
+except:
+       pass
 
 try:
     from PLC.Parameter import Parameter, Mixed
 
 try:
     from PLC.Parameter import Parameter, Mixed
@@ -120,6 +123,7 @@ class MonitorXmlrpcServer(object):
                           accepts=[],
                                           returns=Parameter(bool, 'True is successful'))
        def upAndRunning(self):
                           accepts=[],
                                           returns=Parameter(bool, 'True is successful'))
        def upAndRunning(self):
+               """ This is a test """
                return True
 
        # SITES ------------------------------------------------------------
                return True
 
        # SITES ------------------------------------------------------------