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 authored and Jan Cholasta committed 2015-08-27 07:55:51 +02:00
1 parent 20dc3a4c3f
commit da468ce16b
1 file changed
+21
+21
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}