Hi Team,
I want to add only admin status up interfaces condition, CDP LLDP neighbor info in below query, please help me on this.
Extra question- 1. any method to shirk the results to only getting WAN interfaces any idea on this.
2. want to add one more column to fetch circuit id details from Interface or Interface description.
NQE Query-
pattern_interfaces = "*WAN *"];
testPatterns(s, p) =
max (foreach pattern in p
select matches(toLowerCase(s), toLowerCase(pattern)));
foreach device in network.devices
foreach interface in device.interfaces
let platform = device.platform
let ethernet = interface.ethernet
where isPresent(interface.description)
where testPatterns(interface.description, pattern_interfaces)
select {
test: testPatterns(interface.description, pattern_interfaces),
deviceName: device.name,
Location: device.locationName,
Tags: device.tagNames,
Vendor: platform.vendor,
Model: platform.model,
interfaceName: interface.name,
negotiatedSpeed: ethernet.negotiatedPortSpeed,
negotiatedMode: ethernet.negotiatedDuplexMode,
description: interface.description,
operStatus: interface.operStatus,
adminStatus: interface.adminStatus
}