mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-01-23 02:14:37 +00:00
pycriu: set RPC opts for CHECK
This allows users to specify RPC options when using the check() functionality. Co-authored-by: Andrii Herheliuk <andrii@herheliuk.com> Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
This commit is contained in:
parent
9371c4a789
commit
f7ccb63bdd
1 changed files with 3 additions and 1 deletions
|
|
@ -211,7 +211,8 @@ class criu:
|
|||
|
||||
def __init__(self):
|
||||
self.use_binary('criu')
|
||||
self.opts = rpc.criu_opts()
|
||||
# images_dir_fd is required field with default value of -1
|
||||
self.opts = rpc.criu_opts(images_dir_fd=-1)
|
||||
self.sk = None
|
||||
|
||||
def use_sk(self, sk_name=CR_DEFAULT_SERVICE_ADDRESS):
|
||||
|
|
@ -273,6 +274,7 @@ class criu:
|
|||
"""
|
||||
req = rpc.criu_req()
|
||||
req.type = rpc.CHECK
|
||||
req.opts.MergeFrom(self.opts)
|
||||
|
||||
resp = self._send_req_and_recv_resp(req)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue