Merge lp://qastaging/~jtv/maas/custom-commands into lp://qastaging/~maas-committers/maas/trunk
Proposed by
Jeroen T. Vermeulen
Status: | Merged |
---|---|
Merged at revision: | 25 |
Proposed branch: | lp://qastaging/~jtv/maas/custom-commands |
Merge into: | lp://qastaging/~maas-committers/maas/trunk |
Diff against target: |
54 lines (+41/-0) 2 files modified
src/maasserver/management/commands/deletedb.py (+16/-0) src/maasserver/management/commands/query.py (+25/-0) |
To merge this branch: | bzr merge lp://qastaging/~jtv/maas/custom-commands |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Gavin Panella (community) | Approve | ||
Review via email: mp+89221@code.qastaging.launchpad.net |
Commit message
Add custom django commands.
Description of the change
This is really just exploration for oops integration, but it's also something we've wanted to get done in the past.
Adding two new sub-commands to bin/django:
./bin/django deletedb — stop & delete the local development database cluster
./bin/django query — open an SQL shell on the local development database
./bin/django query 'SELECT * FROM maasserver_node' — query the development database directly
We can worry about niceties such as test or production databases later.
To post a comment you must log in.
Nice :)
[1]
+ check_call( ['bin/maasdb' , 'delete-cluster', 'db'], stderr=stderr)
I think subprocess doesn't redirect stderr, so the last argument above is superfluous I think.