X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=PLC%2FPeers.py;h=866b41bb0e49e7dd7018ca33fdc30bc13db4ea86;hb=17a90e3c5373b78b5aea38e011a96455c0024eae;hp=393be62792e9add6428a88bba3f10b9e7123a8d3;hpb=dd6f6871abdf5412d908dc31777ce88b09192efe;p=plcapi.git diff --git a/PLC/Peers.py b/PLC/Peers.py index 393be62..866b41b 100644 --- a/PLC/Peers.py +++ b/PLC/Peers.py @@ -20,10 +20,6 @@ from PLC.SliceAttributeTypes import SliceAttributeType, SliceAttributeTypes from PLC.SliceAttributes import SliceAttribute, SliceAttributes from PLC.Slices import Slice, Slices -import xmlrpclib -from PLC.PyCurl import PyCurlTransport -from PLC.GPG import gpg_sign - class Peer(Row): """ Stores the list of peering PLCs in the peers table. @@ -87,6 +83,8 @@ class Peer(Row): Connect to this peer via XML-RPC. """ + import xmlrpclib + from PLC.PyCurl import PyCurlTransport self.server = xmlrpclib.ServerProxy(self['peer_url'], PyCurlTransport(self['peer_url'], self['cacert']), allow_none = 1, **kwds) @@ -98,6 +96,7 @@ class Peer(Row): """ def wrapper(*args, **kwds): + from PLC.GPG import gpg_sign signature = gpg_sign(methodname, args, self.api.config.PLC_ROOT_GPG_KEY, self.api.config.PLC_ROOT_GPG_KEY_PUB)