OPSI.Backend.JSONRPC module

JSONRPC backend.

This backend executes the calls on a remote backend via JSONRPC.

copyright:uib GmbH <info@uib.de>
author:Jan Schneider <j.schneider@uib.de>
author:Niko Wenselowski <n.wenselowski@uib.de>
author:Erol Ueluekmen <e.ueluekmen@uib.de>
license:GNU Affero General Public License version 3
class OPSI.Backend.JSONRPC.JSONRPC(jsonrpcBackend, baseUrl, method, params=None, retry=True, callback=None)

Bases: OPSI.Backend.Backend.DeferredCall

execute()
getRpc()
process()
processResult(result)
class OPSI.Backend.JSONRPC.JSONRPCThread(jsonrpcBackend, baseUrl, method, params=None, retry=True, callback=None)

Bases: OPSI.Backend.JSONRPC.JSONRPC, threading.Thread

execute()
run()
class OPSI.Backend.JSONRPC.RpcQueue(jsonrpcBackend, size, poll=0.01)

Bases: threading.Thread

add(jsonrpc)
process(jsonrpcs)
run()
stop()
class OPSI.Backend.JSONRPC.JSONRPCBackend(address, **kwargs)

Bases: OPSI.Backend.Backend.Backend

backend_exit()
backend_getInterface()
connect()
getDeflate()
getInterface()
getPeerCertificate(asPem=False)
isCompressionUsed()

Is compression used?

Return type:bool
isConnected()
jsonrpc_getSessionId()
setAsync(enableAsync)
setCompression(compression)

Set the compression to use.

Parameters:compressionTrue to enable compression, False to disable. To specify the use of a specific compression supply either ‘gzip’ or ‘deflate’.
setDeflate(deflate)
startRpcQueue()
stopRpcQueue()