X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sfa%2Fplc%2Fplccomponentapi.py;h=ebd238dece848b17b2bcf4a54ef5d2f9c36b3548;hb=431a6bf78c6232a44b178e2092451e733a71bba3;hp=d326482701e7ba4a481af6044497d463c6e13359;hpb=07fcf3cbd55e243bed442271a7557178a92559bf;p=sfa.git diff --git a/sfa/plc/plccomponentapi.py b/sfa/plc/plccomponentapi.py index d3264827..ebd238de 100644 --- a/sfa/plc/plccomponentapi.py +++ b/sfa/plc/plccomponentapi.py @@ -8,10 +8,8 @@ from sfa.trust.credential import Credential from sfa.trust.certificate import Certificate, Keypair from sfa.trust.gid import GID -from sfa.server.sfaapi import SfaApi - #################### -class PlcComponentApi(SfaApi): +class PlcComponentDriver: """ This class is the type for the toplevel 'api' object when running the component manager inside a planetlab node. @@ -20,17 +18,8 @@ class PlcComponentApi(SfaApi): some tweaks as compared with a service running in the infrastructure. """ - def __init__ (self, encoding="utf-8", methods='sfa.methods', - config = "/etc/sfa/sfa_config.py", - peer_cert = None, interface = None, - key_file = None, cert_file = None, cache = None): - SfaApi.__init__(self, encoding=encoding, methods=methods, - config=config, - peer_cert=peer_cert, interface=interface, - key_file=key_file, - cert_file=cert_file, cache=cache) - - self.nodemanager = NodeManager(self.config) + def __init__ (self, config): + self.nodemanager = NodeManager(config) def sliver_exists(self): sliver_dict = self.nodemanager.GetXIDs() @@ -43,6 +32,7 @@ class PlcComponentApi(SfaApi): def get_registry(self): addr, port = self.config.SFA_REGISTRY_HOST, self.config.SFA_REGISTRY_PORT url = "http://%(addr)s:%(port)s" % locals() + ### xxx this would require access to the api... server = xmlrpcprotocol.get_server(url, self.key_file, self.cert_file) return server