06-27-2016 12:05 PM - edited 06-27-2016 12:06 PM
I'm trying to find out the device_id of a device (and other fields) given a device name via webAPI.
Though I have a functional script using Perl API.
I'm not sure how do I use val_c_DeviceName and op_DeviceName in the weAPI link together?
I tried using below which failed terribly.
Ironically when I'm running this I'm getting a list of all the availabvle devices discovred by NetMRI.(I'm expecting 1 result not ALL)
Can someone explain?
Solved! Go to Solution.
06-27-2016 12:26 PM
06-27-2016 01:29 PM
For the detailed and prompt reply!!
Still have some question about search and index but 'find' did work for me.
if you use python, i made this function for this kind of need. i let it here, maybe it will help:
if device_name.lower() in d.lower():
DeviceID_field = DeviceID_right.partition("}")
print("WARNING: device: "+device_name+" does NOT exist in NETMRI")