ipspace / netlab

Making virtual networking labs suck less
https://netlab.tools
Other
428 stars 63 forks source link

[BUG] missing files in netlab pip #1231

Closed ssasso closed 1 month ago

ssasso commented 1 month ago

It seems that, when installing netlab from the pip (and not using directly the repo), some files are missing.

For sure, these ones:

root@csol-ci-2:~# netlab version
netlab version 1.8.4-post1
root@csol-ci-2:~# ls /usr/local/lib/python3.8/dist-packages/netsim/validate
bgp  _common.py  cumulus.py  eos.py  frr.py  __init__.py  linux.py  ospf  __pycache__
root@csol-ci-2:~#

(and the same on the devcontainer)

@ssasso ➜ ~ $ netlab version
netlab version 1.8.4
@ssasso ➜ ~ $ ls /usr/local/lib/python3.11/site-packages/netsim/validate
__init__.py  __pycache__  _common.py  bgp  cumulus.py  eos.py  frr.py  linux.py  ospf

(I manually downloaded the pip whl file, unzip it, and verified that the files are not there - so it's not an installation problem.)

this will lead to errors during the validation phase:

@ssasso ➜ /workspaces/netsim-topologies/acme_isp/base (main) $ netlab validate
[ospf_c1_c2]       Check the CORE-1 to CORE-2 OSPF session [ node(s): core1 ]
[TYPE]    loader: Failed to load plugin validate_frr from /usr/local/lib/python3.11/site-packages/netsim/validate/frr.py
[HINT]    Error reported by module loader:
          No module named 'netsim.validate.isis'
[SKIPPED]          Test action not defined for device frr / node core1
ssasso commented 1 month ago

The reason seems to be the fact that these directories had no __init__.py file in it. Will fix.