CiscoDevNet / virlutils

A collection of utilities for interacting with Cisco Modeling Labs (CML)
MIT License
151 stars 51 forks source link

Omit some interface types that genie doesnt understand #58

Closed kecorbin closed 4 years ago

kecorbin commented 6 years ago

Describe the bug

For XR devices, virlutils generates the following pyats Interfaces in the topology session

    CtrlEth:
        link: core2-Dummy/CtrlEth
        type: ethernet
      DevEth:
        link: core2-Dummy/DevEth
        type: ethernet

Genie doesnt know what to do with these

To Reproduce Steps to reproduce the behavior:

virl generate pyats on topolgy that has XR nodes

Expected behavior

these should be ommitted

Screenshots

Traceback (most recent call last):
  File "/Users/kecorbin/VirtualEnvs/pyats/lib/python3.6/site-packages/genie/libs/conf/interface/iosxr/interface.py", line 86, in __new__
    factory_cls = cls._name_to_class_map[d_parsed.type]
KeyError: 'CtrlEth'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "pyats-intro.py", line 31, in <module>
    genie_testbed = Genie.init(args.testbed)
  File "src/genie/conf/main.py", line 90, in genie.conf.main.Genie.init
  File "src/genie/conf/utils/converter.py", line 60, in genie.conf.utils.converter.Converter.convert_tb
  File "src/genie/conf/utils/converter.py", line 164, in genie.conf.utils.converter.Converter.convert_device
  File "src/genie/conf/utils/converter.py", line 212, in genie.conf.utils.converter.Converter.convert_interface
  File "src/ats/datastructures/factory.py", line 56, in ats.datastructures.factory.MetaClassFactory.__call__
  File "src/genie/conf/base/interface.py", line 79, in genie.conf.base.interface.BaseInterface.__new__
  File "/Users/kecorbin/VirtualEnvs/pyats/lib/python3.6/site-packages/genie/libs/conf/interface/__init__.py", line 563, in __new__
    self = factory_cls.__new__(factory_cls, *args, **kwargs)
  File "/Users/kecorbin/VirtualEnvs/pyats/lib/python3.6/site-packages/genie/libs/conf/interface/iosxr/interface.py", line 88, in __new__
    raise UnknownInterfaceTypeError
genie.conf.base.exceptions.UnknownInterfaceTypeError: Unknown interface type```
**Desktop (please complete the following information):**
 - OS: [e.g. iOS]
 - Browser [e.g. chrome, safari]
 - Version [e.g. 22]

Additional context Add any other context about the problem here.

xorrkaz commented 4 years ago

This is no longer a factor for CML 2.