mirror of https://git.48k.eu/ogclient
#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": [...] }more_events
parent
0411d2bf94
commit
a11224d6f5
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue