12-08-2022 08:51 AM
I'm developing a script to gather all the interfaces for a Cat9300, enable the user to select a single interface by interface number (ex 1/0/1), and make changes to that interface.
The script does a normal Netconf request for all Interfaces with the below Filter, which works great:
It then puts all the interface into a Dictionary, each interface in a row, and does a search of the interface number, using the interface "name" of 1/1/1 (or any other interface number found in the query).
During testing on a Cat9300-48UXM with an NM-8X Network Module, I noticed that, searching for interface 1/1/1, there are actually four potential ports to choose from:
This is an issue, as in my case the TenGig1/1/1 interface is configured and is in use, so I should NOT be able to change interface GigabitEthernet1/1/1.
For the script logic, I suppose I can create a temporary IF statement to see if my dictionary has multiple Interface Types for a given interface name (that will be interesting itself), but it would be better if we could remove the unneeded, not-programmed Interfaces.
Is there another Netconf Filter I could leverage to get the information I'm looking for without the Interface redundancy?