hub.py 1.7 KB

1234567891011121314151617181920212223242526272829303132333435
  1. import sys
  2. import importlib
  3. sys.path.append('../3rdparty')
  4. methods = importlib.import_module(f"xlib")
  5. # camera_handle = importlib.import_module(f"libraries.base_external.camera_by_cv2")
  6. # numpy_method = importlib.import_module(f"libraries.base_external.data_by_numpy")
  7. class Global(object):
  8. # --- 时序数据库 ---
  9. # xdb = importlib.import_module(f"clients.db_influx").Client(host='fra-middleware-influx', port=8086,
  10. # database='vms')
  11. # --- 业务数据数据库 ---
  12. # mdb = importlib.import_module(f"clients.db_mongo").Client(host='sri-thirdparty-mongo', port=27017, database='ar',
  13. # username='admin', password='admin')
  14. mdb = importlib.import_module(f"xclient.xmongo").Client(host='58.34.94.176', port=7030, database='bg',
  15. username='admin', password='admin')
  16. # mysql = importlib.import_module(f"clients.db_maria2").Client(host='127.0.0.1', port=3306, database='ar',
  17. # username='root', password='20221212!')
  18. # mysql = importlib.import_module(f"xclient.db_maria2").Client(host='58.34.94.176', port=8806, database='hs',
  19. # username='root', password='rootroot&123123')
  20. # --- 缓存数据库 ---
  21. # rdb = importlib.import_module(f"clients.db_redis").Client(db=0, host='fra-middleware-redis', port=6379)
  22. # SSHClient = importlib.import_module(f"clients.l4_ssh_by_paramiko").Client
  23. # local_api = importlib.import_module(f"apis.local.api").Api()
  24. mccbts_agent = importlib.import_module(f"xapi.mccbts.api").API()