Module rpc
source code
Inter-node RPC library.
|
|
|
|
|
|
|
|
|
|
|
_EncodeImportExportIO(ieio,
ieioargs)
Encodes import/export I/O information. |
source code
|
|
|
_RPC_CONNECT_TIMEOUT = 5
|
|
_RPC_CLIENT_HEADERS = ["Content-type: %s" % http.HTTP_APP_JSON...
|
|
_TMO_URGENT = 60
|
|
_TMO_FAST = 5* 60
|
|
_TMO_NORMAL = 15* 60
|
|
_TMO_SLOW = 3600
|
|
_TMO_4HRS = 4* 3600
|
|
_TMO_1DAY = 86400
|
|
_TIMEOUTS = {}
|
|
_thread_local = _RpcThreadLocal()
|
Imports:
os,
logging,
zlib,
base64,
pycurl,
threading,
utils,
objects,
http,
serializer,
constants,
errors,
netutils,
ganeti
Initializes the module-global HTTP client manager.
Must be called before using any RPC function and while exactly one
thread is running.
|
Stops the module-global HTTP client manager.
Must be called before quitting the program and while exactly one
thread is running.
|
Timeout decorator.
When applied to a rpc call_* function, it updates the global timeout
table with the given function/timeout.
|
RPC-wrapper decorator.
When applied to a function, it runs it with the RPC system
initialized, and it shutsdown the system afterwards. This means the
function must be called without RPC being initialized.
|
_RPC_CLIENT_HEADERS
- Value:
["Content-type: %s" % http.HTTP_APP_JSON, "Expect:",]
|
|