certprofile: add option to export profile config

Add the `--out=FILENAME' option to `certprofile-show'.  When given,
it exports the profile configuration from Dogtag and writes it to
the named file.

Fixes: https://fedorahosted.org/freeipa/ticket/5091
Reviewed-By: Martin Basti <mbasti@redhat.com>
This commit is contained in:
Fraser Tweedale
2015-07-02 03:31:31 -04:00
committed by Tomas Babej
parent 62e8002bc4
commit bed6f402e2
4 changed files with 48 additions and 6 deletions

View File

@@ -2081,6 +2081,14 @@ class ra_certprofile(RestClient):
body=profile_data
)
def read_profile(self, profile_id):
"""
Read the profile configuration from Dogtag
"""
status, status_text, resp_headers, resp_body = self._ssldo(
'GET', profile_id + '/raw')
return resp_body
def enable_profile(self, profile_id):
"""
Enable the profile in Dogtag