mirror of https://git.48k.eu/ogclient
rest: add backup parameter
Support parsing of "backup" parameter inside incoming requests. Prepare ogClient support for backup image creation in "image create" operation.more_events
parent
0c03d82ca8
commit
5c3cf47023
|
@ -36,6 +36,7 @@ class restRequest:
|
||||||
self.echo = None
|
self.echo = None
|
||||||
self.code = None
|
self.code = None
|
||||||
self.seq = None
|
self.seq = None
|
||||||
|
self.backup = None
|
||||||
|
|
||||||
def parser(self,data):
|
def parser(self,data):
|
||||||
self.request_line, self.headers_alone = data.split('\n', 1)
|
self.request_line, self.headers_alone = data.split('\n', 1)
|
||||||
|
@ -107,6 +108,9 @@ class restRequest:
|
||||||
if "code" in json_param:
|
if "code" in json_param:
|
||||||
self.code = json_param["code"]
|
self.code = json_param["code"]
|
||||||
|
|
||||||
|
if "backup" in json_param:
|
||||||
|
self.backup = json_param["backup"]
|
||||||
|
|
||||||
def get_method(self):
|
def get_method(self):
|
||||||
return self.method
|
return self.method
|
||||||
|
|
||||||
|
@ -151,3 +155,6 @@ class restRequest:
|
||||||
|
|
||||||
def getCode(self):
|
def getCode(self):
|
||||||
return self.code
|
return self.code
|
||||||
|
|
||||||
|
def getBackup(self):
|
||||||
|
return self.backup
|
||||||
|
|
Loading…
Reference in New Issue