From 3a60ffaa36017ebccf3cad8c53a545ebc8003820 Mon Sep 17 00:00:00 2001 From: Tony Mack Date: Mon, 9 Nov 2009 01:06:36 +0000 Subject: [PATCH] create a connection to the nodemanager xmlrpc server --- sfacomponent/plc/api.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/sfacomponent/plc/api.py b/sfacomponent/plc/api.py index 10b37981..51ba3662 100644 --- a/sfacomponent/plc/api.py +++ b/sfacomponent/plc/api.py @@ -8,6 +8,7 @@ import sys import os import traceback +import xmlrpclib.ServerProxy from sfa.util.api import * @@ -25,4 +26,16 @@ class ComponentAPI(BaseAPI): 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 -- 2.43.0