git://git.onelab.eu
/
sfa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
4974e4a
)
create a connection to the nodemanager xmlrpc server
author
Tony Mack
<tmack@cs.princeton.edu>
Mon, 9 Nov 2009 01:06:36 +0000
(
01:06
+0000)
committer
Tony Mack
<tmack@cs.princeton.edu>
Mon, 9 Nov 2009 01:06:36 +0000
(
01:06
+0000)
sfacomponent/plc/api.py
patch
|
blob
|
history
diff --git
a/sfacomponent/plc/api.py
b/sfacomponent/plc/api.py
index
10b3798
..
51ba366
100644
(file)
--- a/
sfacomponent/plc/api.py
+++ b/
sfacomponent/plc/api.py
@@
-8,6
+8,7
@@
import sys
import os
import traceback
import sys
import os
import traceback
+import xmlrpclib.ServerProxy
from sfa.util.api import *
from sfa.util.api import *
@@
-25,4
+26,16
@@
class ComponentAPI(BaseAPI):
if config is None:
return
if config is None:
return
+ self.nodemanager = self.getNodeManagerShell()
+
+
+ def getNodeManagerShell(self):
+ # do we need an auth ?
+ auth = {}
+ try:
+ nodemanager = xmlrpclib.ServerProxy('http://127.0.0.1:812')
+ except:
+ raise
+
+ return nodemanager