Import included profiles during install or upgrade

Add a default service profile template as part of FreeIPA and format
and import it as part of installation or upgrade process.

Also remove the code that modifies the old (file-based)
`caIPAserviceCert' profile.

Fixes https://fedorahosted.org/freeipa/ticket/4002

Reviewed-By: Martin Basti <mbasti@redhat.com>
This commit is contained in:
Fraser Tweedale
2015-06-04 08:27:33 +00:00
committed by Jan Cholasta
parent ba075b195c
commit b24fe0eb73
12 changed files with 228 additions and 223 deletions
+8 -6
View File
@@ -1966,17 +1966,19 @@ class RestClient(Backend):
self.ipa_key_size = "2048"
self.ipa_certificate_nickname = "ipaCert"
self.ca_certificate_nickname = "caCert"
try:
f = open(self.pwd_file, "r")
self.password = f.readline().strip()
f.close()
except IOError:
self.password = ''
self._read_password()
super(RestClient, self).__init__()
# session cookie
self.cookie = None
def _read_password(self):
try:
with open(self.pwd_file) as f:
self.password = f.readline().strip()
except IOError:
self.password = ''
@cachedproperty
def ca_host(self):
"""