API.load_plugins() no longer takes dry_run=False kwarg and instead checks in env.mode == 'unit_test' to decide whether to load the plugins; it also only loads ipa_server.plugins in env.in_server is True

This commit is contained in:
Jason Gerard DeRose
2008-10-27 23:39:43 -06:00
parent 6e456cc749
commit 83d6c95e46
4 changed files with 9 additions and 7 deletions

View File

@@ -245,7 +245,7 @@ class CLI(object):
"""
self.__doing('run')
self.finalize()
if self.api.env.mode == 'unit-test':
if self.api.env.mode == 'unit_test':
return
if len(self.cmd_argv) < 1:
self.print_commands()

View File

@@ -739,7 +739,7 @@ class API(DictProxy):
self.env._bootstrap(**overrides)
self.env._finalize_core(**dict(constants.DEFAULT_CONFIG))
def load_plugins(self, dry_run=False):
def load_plugins(self):
"""
Load plugins from all standard locations.
@@ -748,10 +748,11 @@ class API(DictProxy):
"""
self.__doing('load_plugins')
self.__do_if_not_done('bootstrap')
if dry_run:
if self.env.mode == 'unit_test':
return
util.import_plugins_subpackage('ipalib')
util.import_plugins_subpackage('ipa_server')
if self.env.in_server:
util.import_plugins_subpackage('ipa_server')
def finalize(self):
"""