Exploring Genie Conf for Pythonic Device Configuration

preview_player
Показать описание
I've talked a bunch about how much I like pyATS and Genie for building network test and validation. It's a great tool for so many operational use cases, but in my recent work on the NX-OS NetBox Configuration Sync tool I had a chance to try out Genie.Conf for configuring network devices and I was floored by it's power and ease of use. In this video I give a quick intro to the feature and how I used it.

Checkout some other videos on the NX-OS NetBox Sync Tool

Links:
Рекомендации по теме
Комментарии
Автор

Hi Hank, much appreciate your videos. Would love to see a video on Genie Verifications and Triggers.

zaynmunshi
Автор

Hi Hank. Very infomative. However, can this config push be done using netconf (yang.connector) instead of cli method ?

maxnoish
Автор

Very quick FYI. I've been troubleshooting the use of Genie on Centos6.
Short answer: If your going to use Centos, you'll need to use Centos7.

Long answer: It seems that Genie is reliant on using GLIBC_2.14 or higher, which can be updated with the use of Yum.
But Centos6 doesn't have a yum package update higher than 2.12.
Centos7 does, and so it easily works here.


There are articles on how to manually update the GLIBC on Centos6, but I have yet to successfully get it to work. You can see the version you currently have with "yum list installed | grep glibc"

davidcarrasco
Автор

Hi Hank, I am trying to connect to a device on ISE Tacacs using pyats/genie and the unicon always just stops at the prompt "ISETACACSPASSWORD:" and just doesn't enter the password at that point. Could you please help me resolve the issue so I could go forward with pyats? Thank you

rohitmethala
Автор

i copied this verbatim and when running the code with 'apply=true' i get 'AttributeError: 'Device' object has no attribute 'cli'' as follows:
<class
<class
Traceback (most recent call last):
File "cisco_genie_cfg_loader.py", line 83, in <module>
Change16nov2020()
File "cisco_genie_cfg_loader.py", line 48, in Change16nov2020
output =
File "/home/tode/.local/lib/python3.8/site-packages/genie/libs/conf/vlan/vlan.py", line 474, in build_config
self.testbed.config_on_devices(cfg, fail_invalid=True)
File "/home/tode/.local/lib/python3.8/site-packages/genie/libs/conf/testbed/__init__.py", line 1040, in config_on_devices
self.config_on_device(
File "/home/tode/.local/lib/python3.8/site-packages/genie/libs/conf/testbed/__init__.py", line 1000, in config_on_device
cfg.apply(**kwargs)
File "src/genie/conf/base/config.py", line 110, in
File "src/pyats/topology/device.py", line 518, in
AttributeError: 'Device' object has no attribute 'cli'

I can apply the config in a different way, but it's still annoying. No idea what's wrong.
#update: this happens if you forget to do device.connect() before building... aaaargh

tomekdewille
join shbcf.ru