Add ca-disable and ca-enable commands

We soon plan to revoke certificates upon lightweight CA deletion.
This makes it important to provide a way to prevent a CA from
issuing certificates whilst not deleting and revoking it, and
continuing to allow management of issued certs.

This commit adds the ca-disable and ca-enable commands.

Fixes: https://fedorahosted.org/freeipa/ticket/6257
Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
Reviewed-By: Jan Cholasta <jcholast@redhat.com>
This commit is contained in:
Fraser Tweedale
2016-08-25 17:00:01 +10:00
committed by Martin Babinsky
parent 7fea3914fb
commit c7e0dbc4e1
4 changed files with 88 additions and 4 deletions

View File

@@ -2211,5 +2211,11 @@ class ra_lightweight_ca(RestClient):
headers={'Accept': 'application/json'},
)
def enable_ca(self, ca_id):
self._ssldo(
'POST', ca_id + '/enable',
headers={'Accept': 'application/json'},
)
def delete_ca(self, ca_id):
self._ssldo('DELETE', ca_id)