From: Tony Mack Date: Mon, 30 Nov 2009 19:48:30 +0000 (+0000) Subject: just import the nm api source instead of using its xmlrpc interface X-Git-Tag: sfa-0.9-7~279 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=82934325fc95fc16429bd28097048f53891762e7;p=sfa.git just import the nm api source instead of using its xmlrpc interface --- diff --git a/sfa/plc/api.py b/sfa/plc/api.py index 636a0005..ed8883f3 100644 --- a/sfa/plc/api.py +++ b/sfa/plc/api.py @@ -430,14 +430,11 @@ class ComponentAPI(BaseAPI): 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 + # just import the nm api source + sys.path.append('/usr/share/NodeManager') + import api_calls + return api_calls - return nodemanager def sliver_exists(self): sliver_dict = self.nodemanager.GetXIDs()