summaryrefslogtreecommitdiffstats
path: root/src/restRequest.py
diff options
context:
space:
mode:
authorJose M. Guisado <jguisado@soleta.eu>2023-07-06 17:38:32 +0200
committerJose M. Guisado <jguisado@soleta.eu>2023-07-06 17:38:32 +0200
commit5c3cf47023c26dad486df0421f69327a33c3ed89 (patch)
treeee0d254d34550143f8df5a5006287bd52b5bc20d /src/restRequest.py
parent0c03d82ca8792e5e0c41460f3aa5cdf6990a3412 (diff)
rest: add backup parameter
Support parsing of "backup" parameter inside incoming requests. Prepare ogClient support for backup image creation in "image create" operation.
Diffstat (limited to 'src/restRequest.py')
-rw-r--r--src/restRequest.py7
1 files changed, 7 insertions, 0 deletions
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