From: Thierry Parmentelat Date: Tue, 1 Nov 2011 16:45:29 +0000 (+0100) Subject: rename into pldriver and plshell X-Git-Tag: sfa-1.1-2~1^2~18 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=d193c6bea9e5aab84d7143dc1e09cf29ee1912e7;p=sfa.git rename into pldriver and plshell --- diff --git a/sfa/generic/pl.py b/sfa/generic/pl.py index 6a6cc366..aa0ef5bd 100644 --- a/sfa/generic/pl.py +++ b/sfa/generic/pl.py @@ -1,7 +1,7 @@ from sfa.generic import Generic import sfa.server.sfaapi -import sfa.plc.plcdriver +import sfa.plc.pldriver import sfa.managers.registry_manager import sfa.managers.slice_manager import sfa.managers.aggregate_manager @@ -19,5 +19,5 @@ class pl (Generic): return sfa.managers.aggregate_manager def driver_class (self): - return sfa.plc.plcdriver.PlcDriver + return sfa.plc.pldriver.PlDriver diff --git a/sfa/plc/plcdriver.py b/sfa/plc/pldriver.py similarity index 99% rename from sfa/plc/plcdriver.py rename to sfa/plc/pldriver.py index e920ce69..eecbadb4 100644 --- a/sfa/plc/plcdriver.py +++ b/sfa/plc/pldriver.py @@ -7,7 +7,7 @@ from sfa.util.defaultdict import defaultdict from sfa.util.xrn import hrn_to_urn from sfa.util.plxrn import slicename_to_hrn, hostname_to_hrn, hrn_to_pl_slicename, hrn_to_pl_login_base -from sfa.plc.plcshell import PlcShell +from sfa.plc.plshell import PlShell def list_to_dict(recs, key): """ @@ -17,10 +17,10 @@ def list_to_dict(recs, key): keys = [rec[key] for rec in recs] return dict(zip(keys, recs)) -class PlcDriver (PlcShell): +class PlDriver (PlShell): def __init__ (self, config): - PlcShell.__init__ (self, config) + PlShell.__init__ (self, config) self.hrn = config.SFA_INTERFACE_HRN self.SfaTable = SfaTable diff --git a/sfa/plc/plcshell.py b/sfa/plc/plshell.py similarity index 92% rename from sfa/plc/plcshell.py rename to sfa/plc/plshell.py index c686b1a0..863472fe 100644 --- a/sfa/plc/plcshell.py +++ b/sfa/plc/plshell.py @@ -1,6 +1,6 @@ import xmlrpclib -class PlcShell: +class PlShell: """ A simple xmlrpc shell to a myplc instance This class can receive all PLCAPI calls to the underlying testbed @@ -38,8 +38,8 @@ class PlcShell: def __getattr__(self, name): def func(*args, **kwds): actual_name=None - if name in PlcShell.direct_calls: actual_name=name - if name in PlcShell.alias_calls: actual_name=PlcShell.alias_calls[name] + if name in PlShell.direct_calls: actual_name=name + if name in PlShell.alias_calls: actual_name=PlShell.alias_calls[name] if not actual_name: raise Exception, "Illegal method call %s for PL driver"%(name) return getattr(self.proxy_server, actual_name)(self.plauth, *args, **kwds)