diff options
author | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2014-04-02 08:21:50 -0400 |
---|---|---|
committer | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2014-04-02 08:21:50 -0400 |
commit | 348671cf062c1e362f5cd70719a045848f019dea (patch) | |
tree | 452eea84f004c8b5fc5e86ea9ef62817c35ce7c9 /src/lib/Bcfg2/Server/Admin.py | |
parent | 1012d3633acf13a0807142cb98badfc1e7e71b84 (diff) | |
parent | f94aa46296a8cf1cdd66c7f5802b7bd8a5c70c0a (diff) | |
download | bcfg2-348671cf062c1e362f5cd70719a045848f019dea.tar.gz bcfg2-348671cf062c1e362f5cd70719a045848f019dea.tar.bz2 bcfg2-348671cf062c1e362f5cd70719a045848f019dea.zip |
Merge pull request #160 from fennm/allow-seperate-reporting-database
Preliminary support for seperate reporting database
Diffstat (limited to 'src/lib/Bcfg2/Server/Admin.py')
-rw-r--r-- | src/lib/Bcfg2/Server/Admin.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/lib/Bcfg2/Server/Admin.py b/src/lib/Bcfg2/Server/Admin.py index 27152b867..0807fb2b0 100644 --- a/src/lib/Bcfg2/Server/Admin.py +++ b/src/lib/Bcfg2/Server/Admin.py @@ -912,8 +912,9 @@ if HAS_DJANGO: def run(self, setup): Bcfg2.Server.models.load_models() try: - management.call_command("syncdb", interactive=False, - verbosity=setup.verbose + setup.debug) + Bcfg2.DBSettings.sync_databases( + interactive=False, + verbosity=setup.verbose + setup.debug) except ImproperlyConfigured: err = sys.exc_info()[1] self.logger.error("Django configuration problem: %s" % err) @@ -960,10 +961,10 @@ if HAS_REPORTS: def run(self, setup): verbose = setup.verbose + setup.debug try: - management.call_command("syncdb", interactive=False, - verbosity=verbose) - management.call_command("migrate", interactive=False, - verbosity=verbose) + Bcfg2.DBSettings.sync_databases(interactive=False, + verbosity=verbose) + Bcfg2.DBSettings.migrate_databases(interactive=False, + verbosity=verbose) except: # pylint: disable=W0702 self.errExit("%s failed: %s" % (self.__class__.__name__.title(), |