diff options
author | Trevor Bramwell <tbramwell@linuxfoundation.org> | 2017-11-10 15:43:35 -0800 |
---|---|---|
committer | Trevor Bramwell <tbramwell@linuxfoundation.org> | 2017-11-10 15:45:32 -0800 |
commit | f11f26d23dabde24b0bcd67ac81b094aa89eb6c9 (patch) | |
tree | 500546f6f553b049eb9ac146e7c8359d073fbf7a /utils/test/testapi/opnfv_testapi/db | |
parent | 122cf34bf3e656e1b7fa35e07dd8a71e42ed4d59 (diff) |
Remove 'utils/test' Directory and update INFO
utils/test has been migrated to the releng-testresults repo
Change-Id: If14a30e6abed1424d1e00b0fae048b7d869ec99b
Signed-off-by: Trevor Bramwell <tbramwell@linuxfoundation.org>
Diffstat (limited to 'utils/test/testapi/opnfv_testapi/db')
-rw-r--r-- | utils/test/testapi/opnfv_testapi/db/__init__.py | 0 | ||||
-rw-r--r-- | utils/test/testapi/opnfv_testapi/db/api.py | 38 |
2 files changed, 0 insertions, 38 deletions
diff --git a/utils/test/testapi/opnfv_testapi/db/__init__.py b/utils/test/testapi/opnfv_testapi/db/__init__.py deleted file mode 100644 index e69de29bb..000000000 --- a/utils/test/testapi/opnfv_testapi/db/__init__.py +++ /dev/null diff --git a/utils/test/testapi/opnfv_testapi/db/api.py b/utils/test/testapi/opnfv_testapi/db/api.py deleted file mode 100644 index c057480d4..000000000 --- a/utils/test/testapi/opnfv_testapi/db/api.py +++ /dev/null @@ -1,38 +0,0 @@ -import motor - -from opnfv_testapi.common.config import CONF - -DB = motor.MotorClient(CONF.mongo_url)[CONF.mongo_dbname] - - -def db_update(collection, query, update_req): - return _eval_db(collection, 'update', query, update_req, check_keys=False) - - -def db_delete(collection, query): - return _eval_db(collection, 'remove', query) - - -def db_aggregate(collection, pipelines): - return _eval_db(collection, 'aggregate', pipelines, allowDiskUse=True) - - -def db_list(collection, query): - return _eval_db(collection, 'find', query) - - -def db_save(collection, data): - return _eval_db(collection, 'insert', data, check_keys=False) - - -def db_find_one(collection, query): - return _eval_db(collection, 'find_one', query) - - -def _eval_db(collection, method, *args, **kwargs): - exec_collection = DB.__getattr__(collection) - return exec_collection.__getattribute__(method)(*args, **kwargs) - - -def _eval_db_find_one(query, table=None): - return _eval_db(table, 'find_one', query) |