diff options
author | Alexander Sulfrian <alexander@sulfrian.net> | 2015-05-10 16:27:41 +0200 |
---|---|---|
committer | Alexander Sulfrian <alexander@sulfrian.net> | 2015-05-10 16:27:41 +0200 |
commit | 01c086eccfe527ae81b6cf7807baa3dbb5bd4609 (patch) | |
tree | 78ffae2227aa24b2b59ce2d9418f470d18f48d12 /src/lib/Bcfg2 | |
parent | eb97e236e2b934f9696f3e4db802a3d8d7c563f9 (diff) | |
parent | 9d26cc4501f8a9bb6f28501e46a79403d369b771 (diff) | |
download | bcfg2-01c086eccfe527ae81b6cf7807baa3dbb5bd4609.tar.gz bcfg2-01c086eccfe527ae81b6cf7807baa3dbb5bd4609.tar.bz2 bcfg2-01c086eccfe527ae81b6cf7807baa3dbb5bd4609.zip |
Merge branch 'add-schemamigration' into spline
* add-schemamigration:
bcfg2-admin: Add schemamigration command from south
Diffstat (limited to 'src/lib/Bcfg2')
-rw-r--r-- | src/lib/Bcfg2/Server/Admin.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/lib/Bcfg2/Server/Admin.py b/src/lib/Bcfg2/Server/Admin.py index c294e6be5..b5818b515 100644 --- a/src/lib/Bcfg2/Server/Admin.py +++ b/src/lib/Bcfg2/Server/Admin.py @@ -877,6 +877,7 @@ if HAS_DJANGO: Django management system """ command = None args = [] + kwargs = {} def run(self, _): '''Call a django command''' @@ -885,7 +886,7 @@ if HAS_DJANGO: else: command = self.__class__.__name__.lower() args = [command] + self.args - management.call_command(*args) + management.call_command(*args, **self.kwargs) class DBShell(_DjangoProxyCmd): """ Call the Django 'dbshell' command on the database """ @@ -893,6 +894,11 @@ if HAS_DJANGO: class Shell(_DjangoProxyCmd): """ Call the Django 'shell' command on the database """ + class Schemamigration(_DjangoProxyCmd): + """ Call the South 'schemamigration' command on the database """ + args = ['Bcfg2.Reporting'] + kwargs = {'auto': True} + class ValidateDB(_DjangoProxyCmd): """ Call the Django 'validate' command on the database """ command = "validate" |