From c159c76294b6f22386ae619418cec99f4860cc25 Mon Sep 17 00:00:00 2001 From: "Jose M. Guisado" Date: Tue, 7 Jun 2022 09:13:10 +0200 Subject: live: remove unused parseGetConf function parseGetConf was necessary for parsing output from OpenGnsys script "getConfiguration", which has been replaced since commit 1ab981a539f3 ("live: replace getConfiguration with refresh") --- src/live/ogOperations.py | 27 --------------------------- 1 file changed, 27 deletions(-) (limited to 'src/live') diff --git a/src/live/ogOperations.py b/src/live/ogOperations.py index 5533312..c93212d 100644 --- a/src/live/ogOperations.py +++ b/src/live/ogOperations.py @@ -88,33 +88,6 @@ class OgLiveOperations: part_setup['filesystem'] = 'CACHE' part_setup['code'] = 'ca' - - def parseGetConf(self, out): - parsed = {'serial_number': '', - 'disk_setup': list(), - 'partition_setup': list()} - configs = out.split('\n') - for line in configs[:-1]: - if 'ser=' in line: - parsed['serial_number'] = line.partition('ser=')[2] - else: - part_setup = {} - params = dict(param.split('=') for param in line.split('\t')) - # Parse partition configuration. - part_setup['disk'] = params['disk'] - part_setup['disk_type'] = params.get('dtype', '') - part_setup['partition'] = params['par'] - part_setup['code'] = params['cpt'] - part_setup['filesystem'] = params['fsi'] - part_setup['os'] = params['soi'] - part_setup['size'] = params['tam'] - part_setup['used_size'] = params['uso'] - if part_setup['partition'] == '0': - parsed['disk_setup'].append(part_setup) - else: - parsed['partition_setup'].append(part_setup) - return parsed - def poweroff(self): logging.info('Powering off client') if os.path.exists('/scripts/oginit'): -- cgit v1.2.3-18-g5258