Is there a way to add an "or" statement in a NQE? We are checking IOS versions against a model and Cisco says it can be this or that but the NQE we have looks like it's looking for both and throwing a false positive.
Page 1 / 1
the syntax for logical OR in NQE is ||
Here is an example to identify this or that model:
foreach d in network.devices
where device.platform.model == “model1” || device.platform.model == “model2” || device.platform.model == “model3”
…
…
An alternative to check multiple device model is to
- generate a list of device model that you want to include
- take advantage of the item in list method
for example, the above nqe query can be rewritten as:
my_ios_model=>
“model1”,
“model2”,
“model3”
]
foreach d in network.devices
where d.platform.model in my_ios_model
...
...
Thanks
Reply
Sign up
Already have an account? Login
Welcome to the Forward Networks Community
Select a login option:
Register / Login Forward Employee LoginEnter your E-mail address. We'll send you an e-mail with instructions to reset your password.