mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
cert: add object plugin
Implement cert as an object with methods rather than a bunch of loosely related commands. https://fedorahosted.org/freeipa/ticket/5381 Reviewed-By: David Kupka <dkupka@redhat.com> Reviewed-By: Pavel Vomacka <pvomacka@redhat.com>
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from ipaclient.frontend import CommandOverride
|
||||
from ipaclient.frontend import MethodOverride
|
||||
from ipalib import errors
|
||||
from ipalib import x509
|
||||
from ipalib import util
|
||||
@@ -30,7 +30,7 @@ register = Registry()
|
||||
|
||||
|
||||
@register(override=True)
|
||||
class cert_request(CommandOverride):
|
||||
class cert_request(MethodOverride):
|
||||
def get_args(self):
|
||||
for arg in super(cert_request, self).get_args():
|
||||
if arg.name == 'csr':
|
||||
@@ -39,7 +39,7 @@ class cert_request(CommandOverride):
|
||||
|
||||
|
||||
@register(override=True)
|
||||
class cert_show(CommandOverride):
|
||||
class cert_show(MethodOverride):
|
||||
def forward(self, *keys, **options):
|
||||
if 'out' in options:
|
||||
util.check_writable_file(options['out'])
|
||||
|
||||
Reference in New Issue
Block a user