From a11224d6f587052226b9f94fc942092d6eab5896 Mon Sep 17 00:00:00 2001 From: Javier Sánchez Parra Date: Thu, 26 Nov 2020 16:42:50 +0100 Subject: #1008 Add support to work with GPT table ogClient /setup in linux mode do not support to indicate which table type the user want to use. It always supposes that the partition table is MBR/MSDOS. Add ogClient support to work with GPT tables. Add new field table type to /setup linux mode that expects a string with "MSDOS" or "GPT". Example old JSON: { "disk": "1", "cache": "0", "cache_size": "0", "partition_setup": [...] } Example new JSON: { "type": "GPT", "disk": "1", "cache": "0", "cache_size": "0", "partition_setup": [...] } --- src/linux/ogOperations.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/linux') diff --git a/src/linux/ogOperations.py b/src/linux/ogOperations.py index ef01d2c..58dff3a 100644 --- a/src/linux/ogOperations.py +++ b/src/linux/ogOperations.py @@ -146,6 +146,7 @@ class OgLinuxOperations: return output.decode('utf-8') def setup(self, request, ogRest): + table_type = request.getType() disk = request.getDisk() cache = request.getCache() cache_size = request.getCacheSize() @@ -160,7 +161,7 @@ class OgLinuxOperations: if ogRest.terminated: break - cmd = f'{ogClient.OG_PATH}interfaceAdm/Configurar {disk} {cfg}' + cmd = f'{ogClient.OG_PATH}interfaceAdm/Configurar {table_type} {cfg}' try: ogRest.proc = subprocess.Popen([cmd], stdout=subprocess.PIPE, -- cgit v1.2.3-18-g5258