mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Added env.enable_ra variable and change cert.py and ra.py plugin modules to register plugins conditionally
This commit is contained in:
committed by
Rob Crittenden
parent
0e6e11d2e3
commit
e0fe732318
@@ -701,7 +701,7 @@ plugin (or plugins) is imported. For example:
|
||||
1
|
||||
>>> api.bootstrap(in_server=True) # We want to execute, not forward
|
||||
>>> len(api.env)
|
||||
38
|
||||
39
|
||||
|
||||
`Env._bootstrap()`, which is called by `API.bootstrap()`, will create several
|
||||
run-time variables that connot be overriden in configuration files or through
|
||||
|
||||
@@ -115,6 +115,9 @@ DEFAULT_CONFIG = (
|
||||
('prompt_all', False),
|
||||
('interactive', True),
|
||||
|
||||
# Enable certain optional plugins:
|
||||
('enable_ra', False),
|
||||
|
||||
# ********************************************************
|
||||
# The remaining keys are never set from the values here!
|
||||
# ********************************************************
|
||||
|
||||
@@ -22,8 +22,10 @@
|
||||
Command plugins for IPA-RA certificate operations.
|
||||
"""
|
||||
|
||||
from ipalib import api, Command, Str, Int
|
||||
from ipalib import api
|
||||
|
||||
if api.env.enable_ra:
|
||||
from ipalib import Command, Str, Int
|
||||
|
||||
class cert_request(Command):
|
||||
"""
|
||||
|
||||
@@ -418,4 +418,5 @@ class ra(Backend):
|
||||
# self.debug("IPA-RA: stderr: '%s'" % stderr)
|
||||
return (p.returncode, stdout, stderr)
|
||||
|
||||
if api.env.enable_ra:
|
||||
api.register(ra)
|
||||
|
||||
Reference in New Issue
Block a user