diff options
author | Simo Sorce <simo@redhat.com> | 2015-06-26 20:47:57 -0400 |
---|---|---|
committer | Jan Cholasta <jcholast@redhat.com> | 2015-08-27 07:55:51 +0200 |
commit | da468ce16bf3b55730a24b1960baef75991b33a0 (patch) | |
tree | 890ca63d55ee457e44a8cb7a41f832198ef3ac7b /ipa-client | |
parent | 20dc3a4c3f2d5c3c85495002e118fffce27cd982 (diff) | |
download | freeipa-da468ce16bf3b55730a24b1960baef75991b33a0.tar.gz freeipa-da468ce16bf3b55730a24b1960baef75991b33a0.tar.xz freeipa-da468ce16bf3b55730a24b1960baef75991b33a0.zip |
Simplify adding options in ipachangeconf
Signed-off-by: Simo Sorce <simo@redhat.com>
Reviewed-By: Jan Cholasta <jcholast@redhat.com>
Diffstat (limited to 'ipa-client')
-rw-r--r-- | ipa-client/ipaclient/ipachangeconf.py | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/ipa-client/ipaclient/ipachangeconf.py b/ipa-client/ipaclient/ipachangeconf.py index ed53c9dea..58679f3de 100644 --- a/ipa-client/ipaclient/ipachangeconf.py +++ b/ipa-client/ipaclient/ipachangeconf.py @@ -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} |