how to draw device's L3 gateway using python script

  • 6 February 2022
  • 1 reply

I have been dabbling with the Qapp Python scripting lately and i want to build a qapp wherein the user can have multiple end device ips as input and have their L2 connected switch and L3 Gateways automatically drawn on the map using one-ip-table information. However, looks like the gateways cannot be resolved by one ip table that’s why it is not being drawn. Then i noticed when the end device is drawn, i am able to see the L3 neighbor by extending the plus sign. Is there a Qapp API or a combination of them that can see the L3 neighbor? Or is there a better way to achieve this? Thank you!


import PyDataModel

output = GetOneIpTableItem($Input1.IP,"","","")

output has no entry for gw.






Best answer by bogdan.andrus 21 March 2022, 10:26

View original

1 reply

Hi jpmackz,

thank for your inquiry!


Please use the GetNeighborIdsOfDevice() api to get the L3 gateway for end systems using the topo_type "L3_Topo_Type" parameter. Description here:


and then draw the device on the map using: DrawDevice(device_name[, auto_link, topology_type, map_name, page_name]). Details here:


For all python api documentation please refer to the pages:





Community |  Ideas

Facebook |  Instagram |  Youtube |  Twitter |  LinkedIn
Privacy & Security Statement  |  Terms & Conditions |  Impressum  |  UK Modern Slavery Statement