Commit 5cbc9c34 authored by Andrea Sgambelluri's avatar Andrea Sgambelluri
Browse files

Fix monitoring unit-test ImportError from oc_driver.templates package

Porting the P2MP optical work added a module-level import in
OpenConfigServicer.py pulling in drivers.oc_driver.templates.VPN.transponder.
Importing that submodule executes templates/__init__.py, which unconditionally
imports lxml, jinja2, and paramiko. The monitoring component's CI test image
copies src/device/ source (so its tests can import DeviceService) but only
installs monitoring/requirements.in, not device/requirements.in, so none of
those packages are present there -- breaking test collection with
ModuleNotFoundError: No module named 'lxml'.

Fixed by moving the import into DeleteConfig(), its only call site, so merely
importing DeviceService/OpenConfigServicer no longer drags in those
dependencies.
parent d7509173
Loading
Loading
Loading