diff options
author | Martin Babinsky <mbabinsk@redhat.com> | 2016-11-03 16:38:06 +0100 |
---|---|---|
committer | Jan Cholasta <jcholast@redhat.com> | 2016-11-11 12:17:25 +0100 |
commit | 15f282cf2c4a5315aa3e259bd923718685d88245 (patch) | |
tree | a7ca44d744b71f85070424cf3f67bca8636f704c /ipaserver/install/odsexporterinstance.py | |
parent | 1e6366bc9f10de66de84b9506341f021fb3650d9 (diff) | |
download | freeipa-15f282cf2c4a5315aa3e259bd923718685d88245.tar.gz freeipa-15f282cf2c4a5315aa3e259bd923718685d88245.tar.xz freeipa-15f282cf2c4a5315aa3e259bd923718685d88245.zip |
service installers: clean up the inheritance
Instead of delegating handling of some parameters like fstore to the parent
class, the *Instance installers had the logic copy-pasted in their
constructors. Some other members were also moved to the Service class and the
parent class constructors in children were fixed to modern standards of
initializing parent class in Python.
https://fedorahosted.org/freeipa/ticket/6392
Reviewed-By: Stanislav Laznicka <slaznick@redhat.com>
Diffstat (limited to 'ipaserver/install/odsexporterinstance.py')
-rw-r--r-- | ipaserver/install/odsexporterinstance.py | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/ipaserver/install/odsexporterinstance.py b/ipaserver/install/odsexporterinstance.py index f0d903471..a53ebe667 100644 --- a/ipaserver/install/odsexporterinstance.py +++ b/ipaserver/install/odsexporterinstance.py @@ -12,7 +12,7 @@ from ipaserver.install import service from ipaserver.install import installutils from ipapython.ipa_log_manager import root_logger from ipapython.dn import DN -from ipapython import sysrestore, ipautil +from ipapython import ipautil from ipaplatform.constants import constants from ipaplatform.paths import paths from ipaplatform import services @@ -21,19 +21,15 @@ from ipalib import errors, api class ODSExporterInstance(service.Service): def __init__(self, fstore=None): - service.Service.__init__( - self, "ipa-ods-exporter", - service_desc="IPA OpenDNSSEC exporter daemon" + super(ODSExporterInstance, self).__init__( + "ipa-ods-exporter", + service_desc="IPA OpenDNSSEC exporter daemon", + fstore=fstore ) self.ods_uid = None self.ods_gid = None self.enable_if_exists = False - if fstore: - self.fstore = fstore - else: - self.fstore = sysrestore.FileStore(paths.SYSRESTORE) - suffix = ipautil.dn_attribute_property('_suffix') def create_instance(self, fqdn, realm_name): |