From 5c3cf47023c26dad486df0421f69327a33c3ed89 Mon Sep 17 00:00:00 2001 From: "Jose M. Guisado" Date: Thu, 6 Jul 2023 17:38:32 +0200 Subject: rest: add backup parameter Support parsing of "backup" parameter inside incoming requests. Prepare ogClient support for backup image creation in "image create" operation. --- src/restRequest.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/restRequest.py b/src/restRequest.py index b14ad20..8128b08 100644 --- a/src/restRequest.py +++ b/src/restRequest.py @@ -36,6 +36,7 @@ class restRequest: self.echo = None self.code = None self.seq = None + self.backup = None def parser(self,data): self.request_line, self.headers_alone = data.split('\n', 1) @@ -107,6 +108,9 @@ class restRequest: if "code" in json_param: self.code = json_param["code"] + if "backup" in json_param: + self.backup = json_param["backup"] + def get_method(self): return self.method @@ -151,3 +155,6 @@ class restRequest: def getCode(self): return self.code + + def getBackup(self): + return self.backup -- cgit v1.2.3-18-g5258