summaryrefslogtreecommitdiffstats
path: root/ipaserver
diff options
context:
space:
mode:
authorFraser Tweedale <ftweedal@redhat.com>2015-07-02 04:09:31 -0400
committerTomas Babej <tbabej@redhat.com>2015-07-08 00:25:46 +0200
commit462e0b9eb16f52b66b723744c4b42c19ef4782c3 (patch)
treee62ec87c148e94dba80cf5ecd04a8b2b0519f3dc /ipaserver
parentbed6f402e2d5587c35ff7e84ba3b80026c6db73d (diff)
downloadfreeipa-462e0b9eb16f52b66b723744c4b42c19ef4782c3.tar.gz
freeipa-462e0b9eb16f52b66b723744c4b42c19ef4782c3.tar.xz
freeipa-462e0b9eb16f52b66b723744c4b42c19ef4782c3.zip
certprofile: add ability to update profile config in Dogtag
Add the `--file=FILENAME' option to `certprofile-mod' which, when given, will update the profile configuration in Dogtag to the contents of the file. Fixes: https://fedorahosted.org/freeipa/ticket/5093 Reviewed-By: Martin Basti <mbasti@redhat.com>
Diffstat (limited to 'ipaserver')
-rw-r--r--ipaserver/plugins/dogtag.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/ipaserver/plugins/dogtag.py b/ipaserver/plugins/dogtag.py
index eb2a6ae84..47279921a 100644
--- a/ipaserver/plugins/dogtag.py
+++ b/ipaserver/plugins/dogtag.py
@@ -2089,6 +2089,18 @@ class ra_certprofile(RestClient):
'GET', profile_id + '/raw')
return resp_body
+ def update_profile(self, profile_id, profile_data):
+ """
+ Update the profile configuration in Dogtag
+ """
+ self._ssldo('PUT', profile_id + '/raw',
+ headers={
+ 'Content-type': 'application/xml',
+ 'Accept': 'application/json',
+ },
+ body=profile_data
+ )
+
def enable_profile(self, profile_id):
"""
Enable the profile in Dogtag