aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlice Ferrazzi <alicef@gentoo.org>2017-08-06 01:11:07 +0900
committerAlice Ferrazzi <alicef@gentoo.org>2017-08-06 01:11:07 +0900
commit1bdee3581259533b86d2a29ba15874d4e1e9c2f6 (patch)
tree2306a264aeb8cf4f30c0e7b811f168594046c2d3
parentadded live patch loader (diff)
downloadelivepatch-1bdee3581259533b86d2a29ba15874d4e1e9c2f6.tar.gz
elivepatch-1bdee3581259533b86d2a29ba15874d4e1e9c2f6.tar.bz2
elivepatch-1bdee3581259533b86d2a29ba15874d4e1e9c2f6.zip
changed function and variable name to main_patch
because we are implementing incremental patches, we need to distinguish incremental, already applied patches to the main patch that will be applied over.
-rw-r--r--elivepatch_client/client/checkers.py11
-rw-r--r--elivepatch_client/client/cli.py2
2 files changed, 7 insertions, 6 deletions
diff --git a/elivepatch_client/client/checkers.py b/elivepatch_client/client/checkers.py
index 2754a76..648c80f 100644
--- a/elivepatch_client/client/checkers.py
+++ b/elivepatch_client/client/checkers.py
@@ -27,7 +27,7 @@ class Kernel(object):
"""
def __init__(self, restserver_url, session_uuid=None):
self.config_fullpath = ''
- self.patch_fullpath = ''
+ self.main_patch_fullpath = ''
self.restserver_url = restserver_url
self.kernel_version = None
if session_uuid:
@@ -40,8 +40,8 @@ class Kernel(object):
def set_config(self, config_fullpath):
self.config_fullpath = config_fullpath
- def set_patch(self, patch_fullpath):
- self.patch_fullpath = patch_fullpath
+ def set_main_patch(self, main_patch_fullpath):
+ self.main_patch_fullpath = main_patch_fullpath
def send_files(self):
"""
@@ -70,15 +70,16 @@ class Kernel(object):
print('debug: kernel version = ' + self.rest_manager.get_kernel_version())
send_api = '/elivepatch/api/v1.0/get_files'
+ incremental_patches= None
# send uncompressed config and patch files fullpath
- self.rest_manager.send_file(temporary_config, self.patch_fullpath, send_api)
+ self.rest_manager.send_files(temporary_config, self.main_patch_fullpath, incremental_patches, send_api)
def build_livepatch(self):
self.rest_manager.build_livepatch()
def get_livepatch(self):
- self.rest_manager.get_livepatch(self.patch_fullpath)
+ self.rest_manager.get_livepatch(self.main_patch_fullpath)
class CVE(object):
diff --git a/elivepatch_client/client/cli.py b/elivepatch_client/client/cli.py
index 76a3f87..dc42bf4 100644
--- a/elivepatch_client/client/cli.py
+++ b/elivepatch_client/client/cli.py
@@ -36,7 +36,7 @@ class Main(object):
patch_manager.list()
current_kernel = Kernel(config.url)
current_kernel.set_config(config.config)
- current_kernel.set_patch(config.patch)
+ current_kernel.set_main_patch(config.patch)
current_kernel.send_files()
current_kernel.build_livepatch()
current_kernel.get_livepatch()