aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlice Ferrazzi <alicef@gentoo.org>2017-06-25 05:38:20 +0900
committerAlice Ferrazzi <alicef@gentoo.org>2017-06-25 05:38:20 +0900
commita1654d246845ac013a23339345d8d66374878580 (patch)
tree7d419e1283dbe0f3633833d212d63f8aafc77864 /elivepatch_client/client/restful.py
parentCreating the live patch downloader (diff)
downloadelivepatch-a1654d246845ac013a23339345d8d66374878580.tar.gz
elivepatch-a1654d246845ac013a23339345d8d66374878580.tar.bz2
elivepatch-a1654d246845ac013a23339345d8d66374878580.zip
added livepatch downloader in the client
Diffstat (limited to 'elivepatch_client/client/restful.py')
-rw-r--r--elivepatch_client/client/restful.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/elivepatch_client/client/restful.py b/elivepatch_client/client/restful.py
index 2e93f78..1e5fea2 100644
--- a/elivepatch_client/client/restful.py
+++ b/elivepatch_client/client/restful.py
@@ -21,10 +21,19 @@ class ManaGer(object):
r = requests.post(url, files=files)
def build_livepatch(self):
- url = self.server_url+'/elivepatch/api/v1.0/livepatch'
+ url = self.server_url+'/elivepatch/api/v1.0/build_livepatch'
payload = {
'KernelVersion': '4.10.16'
}
r = requests.post(url, json=payload)
print(r.text)
+ print(r.json())
+
+ def get_livepatch(self):
+ url = self.server_url+'/elivepatch/api/v1.0/get_livepatch'
+ payload = {
+ 'KernelVersion': '4.10.16'
+ }
+ r = requests.post(url, json=payload)
+ print(r.text)
print(r.json()) \ No newline at end of file