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/upgradeinstance.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/upgradeinstance.py')
-rw-r--r-- | ipaserver/install/upgradeinstance.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/ipaserver/install/upgradeinstance.py b/ipaserver/install/upgradeinstance.py index 0a24c0cbe..0d6013fd3 100644 --- a/ipaserver/install/upgradeinstance.py +++ b/ipaserver/install/upgradeinstance.py @@ -81,7 +81,7 @@ class IPAUpgrade(service.Service): for _i in range(8): h = "%02x" % rand.randint(0,255) ext += h - service.Service.__init__(self, "dirsrv") + super(IPAUpgrade, self).__init__("dirsrv", realm_name=realm_name) serverid = installutils.realm_to_serverid(realm_name) self.filename = '%s/%s' % (paths.ETC_DIRSRV_SLAPD_INSTANCE_TEMPLATE % serverid, DSE) self.savefilename = '%s/%s.ipa.%s' % (paths.ETC_DIRSRV_SLAPD_INSTANCE_TEMPLATE % serverid, DSE, ext) @@ -89,7 +89,6 @@ class IPAUpgrade(service.Service): self.modified = False self.serverid = serverid self.schema_files = schema_files - self.realm = realm_name def __start(self): services.service(self.service_name).start(self.serverid, ldapi=True) |