11-14-2022 07:17 AM
I'm new to Netconf/YANG and am having difficulty with a simple script. This script will eventually allow the user to edit a User Interface to change the Description, the Access VLAN, and Port-security settings.
Using the IEFT model, I can get the interface name as "GigabitEthernet" pretty simply but using "xmltodict" and the below filter:
Solved! Go to Solution.
01-05-2023 06:47 AM
Thank you for your reply. I did check that link, and it looks interesting, but it did not necessarily address my issue.
I did eventually figure it out with a combination of Operational and Configuration Models, using the Operational Model to query which ports are "operationally up", then using the Config Model to affect changes to those ports.
Moving forward with any Netconf scripts used for Cisco device Interfaces, it looks like part of the script will be to gather and parse the Interface information, as the Cisco devices only report "GigabitEthernet1/0/1", not "GigabitEthernet" + "1/0/1" as separate data points.
That being said, once that function is written, it's either just a cut-and-paste or a refactor into a Module.
01-04-2023 07:27 PM
Did you had chance to check this python notebook which could be helpfull in answering your question.
https://github.com/CiscoDevNet/xr-netconf-lab/blob/master/workshop.ipynb