|
@@ -9,20 +9,19 @@ Created on Mon Sep 16 13:27:44 2019
|
|
|
"""
|
|
|
|
|
|
|
|
|
-import json
|
|
|
+
|
|
|
import simplejson
|
|
|
import sys
|
|
|
import os
|
|
|
-import jsonref
|
|
|
|
|
|
-from copy import deepcopy
|
|
|
+
|
|
|
from pymongo import MongoClient
|
|
|
import pandas as pd
|
|
|
import numpy as np
|
|
|
|
|
|
sys.path.append(os.getcwd())
|
|
|
from cdplib.log import Log
|
|
|
-from cdplib.Singleton_Threadsafe import SingletonThreadsafe
|
|
|
+from cdplib.db_migration.ParseJsonSchema import ParseJsonSchema
|
|
|
|
|
|
|
|
|
#class MongodbHandlerPool(metaclass=SingletonThreadsafe):
|
|
@@ -115,8 +114,10 @@ class MongodbHandler:
|
|
|
"Parameter 'validation_lever' must be a string type"
|
|
|
assert(isinstance(validation_action, str)),\
|
|
|
"Parameter 'validation_action' must be a string type"
|
|
|
+
|
|
|
+ parse_obj = ParseJsonSchema()
|
|
|
|
|
|
- schema = self._read_schema(schema_path)
|
|
|
+ schema = parse_obj.read_schema_and_parse_for_mongodb(schema_path)
|
|
|
|
|
|
command = {
|
|
|
'collMod': collection_name,
|