diff options
author | Sean Dague <sean@dague.net> | 2016-05-19 15:37:28 -0400 |
---|---|---|
committer | Sean Dague <sean@dague.net> | 2016-05-23 07:33:20 -0400 |
commit | cdf74c57a6755619acaabd2e3a2559f25b2fbe0f (patch) | |
tree | d8778f1239e53b615626bde3845aceb4a300067c /tools | |
parent | 813787644bd11ffb8bdf46a547bd25982d995dea (diff) | |
download | nova-cdf74c57a6755619acaabd2e3a2559f25b2fbe0f.tar.gz |
remove db2 support from tree
This removes db2 support from tree completely. This is an oddball non
open database that made doing live data migrations difficult. It is
used by 0% of users in the OpenStack User Survey.
Supporting commercial software that doesn't have users at the cost of
delivering features and fixes to our community is the wrong
tradeoff. This corrects that.
It rewrites migrations, which we typically don't ever do, but it is
better if newton fresh environments fail early in db creation instead
of very deep in the data migration process.
Change-Id: Ifeb9929e4515e3483eb65d371126afd7672b92a4
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/db/schema_diff.py | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/tools/db/schema_diff.py b/tools/db/schema_diff.py index 018569f49c..bb389532f0 100755 --- a/tools/db/schema_diff.py +++ b/tools/db/schema_diff.py @@ -40,9 +40,6 @@ Run like: ./tools/db/schema_diff.py postgresql://localhost \ master:latest my_branch:82 - DB2: - ./tools/db/schema_diff.py ibm_db_sa://localhost \ - master:latest my_branch:82 """ from __future__ import print_function @@ -121,28 +118,6 @@ class Postgresql(object): shell=True) -class Ibm_db_sa(object): - - @classmethod - def db2cmd(cls, cmd): - """Wraps a command to be run under the DB2 instance user.""" - subprocess.check_call('su - $(db2ilist) -c "%s"' % cmd, shell=True) - - def create(self, name): - self.db2cmd('db2 \'create database %s\'' % name) - - def drop(self, name): - self.db2cmd('db2 \'drop database %s\'' % name) - - def dump(self, name, dump_filename): - self.db2cmd('db2look -d %(name)s -e -o %(dump_filename)s' % - {'name': name, 'dump_filename': dump_filename}) - # The output file gets dumped to the db2 instance user's home directory - # so we have to copy it back to our current working directory. - subprocess.check_call('cp /home/$(db2ilist)/%s ./' % dump_filename, - shell=True) - - def _get_db_driver_class(db_url): try: return globals()[db_url.split('://')[0].capitalize()] |