summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/linux/ogOperations.py15
-rw-r--r--src/ogRest.py8
2 files changed, 21 insertions, 2 deletions
diff --git a/src/linux/ogOperations.py b/src/linux/ogOperations.py
index 7f70f2b..204699a 100644
--- a/src/linux/ogOperations.py
+++ b/src/linux/ogOperations.py
@@ -239,9 +239,22 @@ class OgLinuxOperations:
except:
raise ValueError('Error: Incorrect command value')
+ with open('/tmp/image.info') as file_info:
+ line = file_info.readline().rstrip()
+
+ image_info = {}
+
+ (image_info['clonator'],
+ image_info['compressor'],
+ image_info['filesystem'],
+ image_info['datasize'],
+ image_info['clientname']) = line.split(':', 5)
+
+ os.remove('/tmp/image.info')
+
self._restartBrowser(self._url)
- return output.decode('utf-8')
+ return image_info
def refresh(self, ogRest):
self._restartBrowser(self._url_log)
diff --git a/src/ogRest.py b/src/ogRest.py
index 7e6d276..ff9cccb 100644
--- a/src/ogRest.py
+++ b/src/ogRest.py
@@ -191,7 +191,9 @@ class ogThread():
def image_create(client, path, request, ogRest):
try:
- ogRest.operations.image_create(path, request, ogRest)
+ image_info = ogRest.operations.image_create(path,
+ request,
+ ogRest)
software = ogRest.operations.software(request, path, ogRest)
except ValueError as err:
response = restResponse(ogResponses.INTERNAL_ERR)
@@ -207,6 +209,10 @@ class ogThread():
json_body.add_element('name', request.getName())
json_body.add_element('repository', request.getRepo())
json_body.add_element('software', software)
+ json_body.add_element('clonator', image_info['clonator'])
+ json_body.add_element('compressor', image_info['compressor'])
+ json_body.add_element('filesystem', image_info['filesystem'])
+ json_body.add_element('datasize', int(image_info['datasize']))
response = restResponse(ogResponses.OK, json_body)
client.send(response.get())