summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2/Server/Admin/Reports.py
diff options
context:
space:
mode:
authorTim Laszlo <tim.laszlo@gmail.com>2012-08-07 13:37:33 -0500
committerTim Laszlo <tim.laszlo@gmail.com>2012-08-07 13:37:33 -0500
commit5b3ffd488a8b5f727a531a3b7c3ca419bb53d04e (patch)
treee816129405d12aad7069b7450b9121ed201ea23b /src/lib/Bcfg2/Server/Admin/Reports.py
parentcb928a1f548fe1e65933ecbb62220295802f160b (diff)
downloadbcfg2-5b3ffd488a8b5f727a531a3b7c3ca419bb53d04e.tar.gz
bcfg2-5b3ffd488a8b5f727a531a3b7c3ca419bb53d04e.tar.bz2
bcfg2-5b3ffd488a8b5f727a531a3b7c3ca419bb53d04e.zip
Merge reporting configuration with main server configuration
Admin/Syncdb: Use SchemaUpdater Move the schema update routines from reports to Bcfg2.Server Move Reports.settings into Bcfg2.settings
Diffstat (limited to 'src/lib/Bcfg2/Server/Admin/Reports.py')
-rw-r--r--src/lib/Bcfg2/Server/Admin/Reports.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/lib/Bcfg2/Server/Admin/Reports.py b/src/lib/Bcfg2/Server/Admin/Reports.py
index 8201ad104..175b99d1d 100644
--- a/src/lib/Bcfg2/Server/Admin/Reports.py
+++ b/src/lib/Bcfg2/Server/Admin/Reports.py
@@ -19,17 +19,15 @@ if sys.version_info >= (2, 5):
else:
from md5 import md5
-# Prereq issues can be signaled with ImportError, so no try needed
-# FIXME - settings file uses a hardcoded path for /etc/bcfg2.conf
-import Bcfg2.Server.Reports.settings
+import Bcfg2.settings
# Load django and reports stuff _after_ we know we can load settings
import django.core.management
from Bcfg2.Server.Reports.importscript import load_stats
-from Bcfg2.Server.Reports.Updater import update_database, UpdaterError
+from Bcfg2.Server.SchemaUpdater import update_database, UpdaterError
from Bcfg2.Server.Reports.utils import *
-project_directory = os.path.dirname(Bcfg2.Server.Reports.settings.__file__)
+project_directory = os.path.dirname(Bcfg2.settings.__file__)
project_name = os.path.basename(project_directory)
sys.path.append(os.path.join(project_directory, '..'))
project_module = __import__(project_name, '', '', [''])
@@ -281,7 +279,7 @@ class Reports(Bcfg2.Server.Admin.Mode):
self.log.debug("Filtering by maxdate: %s" % maxdate)
ipurge = ipurge.filter(timestamp__lt=maxdate)
- if Bcfg2.Server.Reports.settings.DATABASES['default']['ENGINE'] == 'django.db.backends.sqlite3':
+ if Bcfg2.settings.DATABASES['default']['ENGINE'] == 'django.db.backends.sqlite3':
grp_limit = 100
else:
grp_limit = 1000