Commit 54f82f00 authored by Sabari T's avatar Sabari T

tag_hierarchy update script

parent a625753f
......@@ -4,3 +4,9 @@
2021-06-17 20:53:56 - INFO - Log/ilens - [MainThread:update_handler.py:tag_hierarchy_update():27] - Dropped tag_hierarchy collection from ilens_configuration database
2021-06-17 20:54:46 - INFO - Log/ilens - [MainThread:update_handler.py:tag_hierarchy_update():30] - Updated the following collection Successfully
2021-06-17 20:54:46 - INFO - Log/ilens - [MainThread:update_handler.py:tag_hierarchy_update():31] - database_name: ilens_configuration collection_name: tag_hierarchy
2021-06-17 21:06:38 - DEBUG - Log/ilens - [MainThread:main.py:<module>():6] - main block started
2021-06-17 21:07:03 - INFO - Log/ilens - [MainThread:update_handler.py:tag_hierarchy_update():22] - Records fetched from following collection Successfully
2021-06-17 21:07:03 - INFO - Log/ilens - [MainThread:update_handler.py:tag_hierarchy_update():23] - database_name: ilens_configuration collection_name: site_conf
2021-06-17 21:07:03 - INFO - Log/ilens - [MainThread:update_handler.py:tag_hierarchy_update():27] - Dropped tag_hierarchy collection from ilens_configuration database
2021-06-17 21:07:52 - INFO - Log/ilens - [MainThread:update_handler.py:tag_hierarchy_update():30] - Updated the following collection Successfully
2021-06-17 21:07:52 - INFO - Log/ilens - [MainThread:update_handler.py:tag_hierarchy_update():31] - database_name: ilens_configuration collection_name: tag_hierarchy
from scripts.constants import CollectionNames
class MongoEncryptionConstants:
# mongo exception codes
MONGO001 = "Server was unable to eestablish connection with MongoDB"
MONGO002 = "Server faced a problem when inserting document(s) into MongoDB"
MONGO003 = "Server faced a problem to find the document(s) with the given condition"
MONGO004 = "Server faced a problem to delete the document(s) with the given condition"
MONGO005 = "Server faced a problem to update the document(s) with the given condition and given data"
MONGO006 = "Server faced a problem when aggregating the data"
MONGO007 = "Server faced a problem when closing the connection with MongoDB"
# mongo encryption keys
key_encrypt_keys = "encrypt_keys"
key_exclude_encryption = "exclude_encryption"
product_encrypted = "product_encrypted"
max_docs_per_batch = 5
# cipher_key = "a985195aaa464e61"
#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'
'\nVl/vIAFiu0TX81VQ7LDLJaber/7GEsIT3x+xm0jFvOxFYVhT5b0s0z1CQolnRFsA\ndIwQ5u5GkP65hyJUa3ZMh+L6Vi'
'sSCTKpAco9ZhkCgYAKFZ5CwKjHvhn3AmaSBMbV\n23xBC/GOrjtWGXY288pCWDH7AIk3G3PTpSkDCHpc+4gKbGU3WTFDoC'
'xp7kYLId7l\nL4MrTban0gOdJdK234hXhfEvM+4yQlKAzbHL9RTaEET+0mj/14FtKu3elZBSdWoZ\nHiE1Q8EaGqsNdHuT'
'RxxsAQKBgQCqw7enyveusPL5FE/IfDrhgArX55ehp0uWrEE4\ngLkp0RYRawOzJKlbwMy0LnxIfwoGdmnUiIbTsjYBjs8'
'xs/WpU8LVsOeba3lxE21O\n8q5VYWy61T4ia9ZrjgbFMl0u+TwgNwlgQolmb5Lrh9/vGAejdjhcj+ZyJFCeExQE\nAzd6'
'AQKBgBhe+FwMhTus961jqEKXBXm0/OaOgzOdgl/asuC8oLU7cAVD7sS2LFcU\nu7ofIVIG6cRWRruajIuCdlIcLOedTE4'
'YL5jAuRL1TyVvxMm0FsrkWPABFrHWhsZs\nTSzpiOFJkLJTVnT7hlW/+m0qrKiW0zrFza0JaFwP/lj+hRrYGkOl\n'
'-----END RSA PRIVATE KEY-----'}
encrypt_collection_dict = \
{CollectionNames.user: {key_encrypt_keys: ["*"],
key_exclude_encryption: ["_id", "user_id", "client_id", "deleted_by",
"created_by", "username", "isdeleted", "email"]},
CollectionNames.user_role: {key_encrypt_keys: ["*"],
key_exclude_encryption: ["_id", "user_role_id", "user_role_name",
"client_id", "isdeleted", "default"]}}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment