summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2/DBSettings.py
Commit message (Collapse)AuthorAgeFilesLines
* DBSettings: Drop support for django <1.3Alexander Sulfrian2016-08-311-10/+6
|
* DBSettings: The app-label is only the last part of the module nameAlexander Sulfrian2016-08-171-2/+2
|
* Bcfg2/Server: Add migrations for Bcfg2.ServerAlexander Sulfrian2016-08-171-1/+2
| | | | | Django1.9 requires every app to have migrations. You cannot create a tables without having migrations.
* DBSettings: XViewMiddleware was moved into another packageAlexander Sulfrian2015-09-231-2/+8
| | | | The old name was deprecated with django1.6 and removed with django1.8.
* DBSettings: allow_syncdb is replaced with allow_migrateAlexander Sulfrian2015-09-231-1/+8
|
* DBSettings: syncdb is replaced by migrateAlexander Sulfrian2015-09-231-2/+4
|
* DBSettings: Automatically upgrade migrations from south to djangoAlexander Sulfrian2015-09-231-0/+43
| | | | | | | | | | | On the first use with django-1.7 we manually get the south migration status and fake apply the django migration to that point. With that users can switch to django migrations at any point of time. The code simply takes the name of the last south migration and forwards the django migrations to that point. Therefor it is required to keep the names of the migrations in sync. It is required to keep the migration names of the two systems in sync.
* added django.setup() calls to src/lib/Bcfg2/DBSettings.pyJonas Jochmaring2015-09-231-0/+4
|
* some more django 1.7 compatibility fixesJonas Jochmaring2015-09-231-1/+2
|
* make Bcfg2-web compatible with django 1.7Jonas Jochmaring2015-09-231-1/+6
| | | | | | - reports.wsgi uses get_wsgi_application() now - old south-based migrations have been moved - manage.py has been updated
* Merge branch 'no-django' of https://github.com/AlexanderS/bcfg2Sol Jerome2015-09-011-2/+4
|\
| * DBSettings: Don't use django, if it's not availableAlexander Sulfrian2015-07-201-2/+4
| |
* | DBSettings: Add possibility to specify arbitrary django options.Alexander Sulfrian2015-07-231-1/+8
| |
* | Options/Types: Fix database OPTIONS parsingAlexander Sulfrian2015-07-231-2/+2
|/ | | | | | | | This is mostly from 257eb0c17 and 16d3e04cb to allow for setting arbitrary database options since some settings require nested dictionaries, etc. This got lost during merge from maint into master because of the completely different Options parsing.
* DBSettings: Fix time_zone option.Alexander Sulfrian2015-01-281-2/+2
| | | | | In the documentation, in the 1.3.x version and in django this option is called time_zone (and not timezone). There is no reason to change this.
* Options: Fixed non-path database name parsingChris St. Pierre2014-11-101-1/+1
| | | | | | | | | | | | The database name is sometimes a path (SQLite) and sometimes not (MySQL, PostgreSQL). This introduces a new Option type, RepositoryMacroOption, that expands <repository> macros without canonicalizing the path, so SQLite users can use <repository> in their settings but MySQL users' database name settings will not be destroyed by path canonicalization. The unfortunate downside is that SQLite users can't use ~ in their database name.
* DBSettings: fix up <repository> in database nameChris St. Pierre2014-11-101-1/+1
|
* Fix missing import line for django.core.management.Matt Kemp2014-10-281-0/+1
|
* Fix admins and managers in django configMatt Kemp2014-06-121-2/+2
| | | This should eventually be a configurable.
* Merge branch 'maint'Chris St. Pierre2014-04-251-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | Conflicts: misc/bcfg2.spec src/lib/Bcfg2/Client/Client.py src/lib/Bcfg2/Client/Tools/APK.py src/lib/Bcfg2/Client/Tools/MacPorts.py src/lib/Bcfg2/Client/Tools/Pacman.py src/lib/Bcfg2/Client/Tools/YUM.py src/lib/Bcfg2/Server/Admin/Minestruct.py src/lib/Bcfg2/Server/Admin/Pull.py src/lib/Bcfg2/Server/Admin/Viz.py src/lib/Bcfg2/Server/Core.py src/lib/Bcfg2/Server/Plugins/Cfg/CfgEncryptedGenerator.py src/lib/Bcfg2/Server/Plugins/Cfg/CfgPrivateKeyCreator.py src/lib/Bcfg2/Server/Plugins/Properties.py src/lib/Bcfg2/settings.py src/sbin/bcfg2-crypt src/sbin/bcfg2-info src/sbin/bcfg2-lint src/sbin/bcfg2-yum-helper testsuite/Testsrc/Testlib/TestServer/TestPlugins/TestCfg/TestCfgEncryptedGenerator.py testsuite/Testsrc/Testlib/TestServer/TestPlugins/TestProperties.py
* Reporting: update non-ORM bits to know about separate databaseMichael Fenn2014-04-091-5/+12
| | | | | | | | | There is a little bit of code in the reporting web interface that uses raw SQL rather than the django ORM. This bypassed the database router functionality (since there is no model to bind to). Django supports keeping track of multiple connections in the raw SQL interface, so this commit does the refactoring necessary to support the multiple databases.
* Be more robust about checking for reporting_db_engine presenceMichael Fenn2014-03-241-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This matters during the test suite: ====================================================================== ERROR: Failure: AttributeError ('Namespace' object has no attribute 'reporting_db_engine') ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python2.6/site-packages/nose/loader.py", line 364, in loadTestsFromName addr.filename, addr.module) File "/usr/lib/python2.6/site-packages/nose/importer.py", line 39, in importFromPath return self.importFromDir(dir_path, fqname) File "/usr/lib/python2.6/site-packages/nose/importer.py", line 84, in importFromDir mod = load_module(part_fqname, fh, filename, desc) File "/d/en/fennm-0/bcfg2-dbrouter/bcfg2-dbrouter.git/testsuite/Testtools/__init__.py", line 14, in <module> from common import * File "/d/en/fennm-0/bcfg2-dbrouter/bcfg2-dbrouter.git/testsuite/common.py", line 62, in <module> Bcfg2.DBSettings.finalize_django_config() File "/d/en/fennm-0/bcfg2-dbrouter/bcfg2-dbrouter.git/src/lib/Bcfg2/DBSettings.py", line 99, in finalize_django_config if opts.reporting_db_engine is not None: AttributeError: 'Namespace' object has no attribute 'reporting_db_engine'
* Make indentation consistent with other elements of the dictMichael Fenn2014-03-241-1/+1
|
* Preliminary support for seperate reporting databaseMichael Fenn2014-03-211-1/+94
| | | | | | | | | | | | | This commit implements a Django database router which routes each Django application to a database whose name matches a key in the database dict, falling back to the default database if no matching key is found. This support is plumbed through to the config file via database.reporting_* database connection config options. These options mirror ones available for the default database config. If database.reporting_engine is not specified in the config, then the configuration falls back to the traditional single-database way of doing things with the database router becoming a no-op.
* DBSettings: Set config options at the module levelChris St. Pierre2014-03-051-0/+3
| | | | | Some bits of Django appear to query the options directly from the module, even if django.conf.settings.configure() has been called
* Merge branch 'maint'Chris St. Pierre2013-12-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | Conflicts: doc/appendix/guides/fedora.txt misc/bcfg2.spec schemas/types.xsd src/lib/Bcfg2/Encryption.py src/lib/Bcfg2/Options.py src/lib/Bcfg2/Server/Admin/Client.py src/lib/Bcfg2/Server/Core.py src/lib/Bcfg2/Server/Lint/Validate.py src/lib/Bcfg2/Server/Plugin/helpers.py src/lib/Bcfg2/Server/Plugins/Bundler.py src/lib/Bcfg2/Server/Plugins/Cfg/CfgEncryptedGenerator.py src/lib/Bcfg2/Server/Plugins/Probes.py src/sbin/bcfg2-crypt testsuite/Testsrc/Testlib/TestServer/TestPlugin/Testhelpers.py testsuite/Testsrc/Testlib/TestServer/TestPlugins/TestCfg/TestCfgEncryptedGenerator.py testsuite/Testsrc/Testlib/TestServer/TestPlugins/TestProbes.py testsuite/common.py testsuite/install.sh
* DB: fixed how Django settings are loadedChris St. Pierre2013-10-301-0/+178