Simplify adding options in ipachangeconf

Signed-off-by: Simo Sorce <simo@redhat.com>
Reviewed-By: Jan Cholasta <jcholast@redhat.com>
This commit is contained in:
Simo Sorce
2015-06-26 20:47:57 -04:00
committed by Jan Cholasta
parent 20dc3a4c3f
commit da468ce16b

View File

@@ -536,3 +536,24 @@ class IPAChangeConf:
except IOError:
pass
return True
@staticmethod
def setOption(name, value):
return {'name': name,
'type': 'option',
'action': 'set',
'value': value}
@staticmethod
def rmOption(name):
return {'name': name,
'type': 'option',
'action': 'remove',
'value': None}
@staticmethod
def setSection(name, options):
return {'name': name,
'type': 'section',
'action': 'set',
'value': options}