diff options
author | Ruan HE <ruan.he@orange.com> | 2017-12-09 14:16:23 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2017-12-09 14:16:23 +0000 |
commit | f9c21c3a0f37e92474500b8aa8b460678a6098f8 (patch) | |
tree | 4b37610c91882984baf00c164a65f8f5e5743248 /moonv4 | |
parent | 13fe63cb3dd8b5916f48f75be107afb87f40ce96 (diff) | |
parent | 90587e76709e27c4131a1b9b3668fe4342b09014 (diff) |
Merge "Fix a bug in moon_manager_db"
Diffstat (limited to 'moonv4')
-rw-r--r-- | moonv4/moon_db/Changelog | 10 | ||||
-rw-r--r-- | moonv4/moon_db/moon_db/__init__.py | 2 | ||||
-rw-r--r-- | moonv4/moon_db/moon_db/db_manager.py | 15 |
3 files changed, 18 insertions, 9 deletions
diff --git a/moonv4/moon_db/Changelog b/moonv4/moon_db/Changelog index c1e8a770..6f5619d1 100644 --- a/moonv4/moon_db/Changelog +++ b/moonv4/moon_db/Changelog @@ -35,4 +35,12 @@ CHANGES 1.2.0 ----- -- Update the db_manager in order to use it for tests
\ No newline at end of file +- Update the db_manager in order to use it for tests + +1.2.1 +----- +- Update moon_db_manager in order to use it for unit tests + +1.2.2 +----- +- Fix a bug in moon_db_manager diff --git a/moonv4/moon_db/moon_db/__init__.py b/moonv4/moon_db/moon_db/__init__.py index 515227fa..6aead152 100644 --- a/moonv4/moon_db/moon_db/__init__.py +++ b/moonv4/moon_db/moon_db/__init__.py @@ -3,5 +3,5 @@ # license which can be found in the file 'LICENSE' in this package distribution # or at 'http://www.apache.org/licenses/LICENSE-2.0'. -__version__ = "1.2.1" +__version__ = "1.2.2" diff --git a/moonv4/moon_db/moon_db/db_manager.py b/moonv4/moon_db/moon_db/db_manager.py index 88d5b7d3..75cbcdb0 100644 --- a/moonv4/moon_db/moon_db/db_manager.py +++ b/moonv4/moon_db/moon_db/db_manager.py @@ -52,11 +52,7 @@ def init_engine(): return create_engine(db_conf['url']) -# def format_data(ext): -# return ext.name, ext.obj.upgrade() - - -def run(command, logger, engine): +def main(command, logger, engine): files = glob.glob(versions.__path__[0] + "/[0-9][0-9][0-9]*.py") for filename in files: filename = os.path.basename(filename).replace(".py", "") @@ -75,7 +71,12 @@ def run(command, logger, engine): else: logger.critical("Cannot understand the command!") -if __name__ == "__main__": + +def run(): args, logger = init_args() engine = init_engine() - run(args.command[0], logger, engine) + main(args.command[0], logger, engine) + + +if __name__ == "__main__": + run() |