Here's an example of map filter script to start with.
It shows sw-shelf node and nodes connected to ports of the switch that have names beginning with "gi1/0".
But this script only shows directly connected devices. Do I understand correctly, that you actually want all the hierarchy that is connected to a specific port of your core switch?
Code Select
if ($node->name == "sw-shelf") return true;
for (i:$node->interfaces) {
p = i->peerInterface;
n = i->peerNode;
if (n != null and p != null and n->name == "sw-shelf" and p->name->contains("gi1/0")) return true;
}
return false;It shows sw-shelf node and nodes connected to ports of the switch that have names beginning with "gi1/0".
But this script only shows directly connected devices. Do I understand correctly, that you actually want all the hierarchy that is connected to a specific port of your core switch?