m_find_macs_by_vlans

m_find_macs_by_vlans.script_main(script)
MULTIPLE device script
Author: Jamie Caesar

This script will provide a list of all the switches that have locally connected MAC addresses in their mac address table for a range of VLANs.

After launching the script, it will prompt for a CSV file with all of the devices the script should connect to. It will also prompt for a range of VLANs that it should look for MAC addresses This script checks that it will NOT be run in a connected tab.

Parameters:script (scripts.Script) – A subclass of the scripts.Script object that represents the execution of this particular script (either CRTScript or DirectScript)
m_find_macs_by_vlans.per_device_work(session, enable_pass, vlan_set)

This function contains the code that should be executed on each device that this script connects to. It is called after establishing a connection to each device in the loop above.

You can either put your own code here, or if there is a single-device version of a script that performs the correct task, it can be imported and called here, essentially making this script connect to all the devices in the chosen CSV file and then running a single-device script on each of them.