Delay upgrades in sensitive Meraki networks to a specific date in the future or a set amount of days into the future.
The Cisco Meraki platform makes the process of managing firmware upgrades across large fleets of devices very simple and intuitive, and it also helps its customers stay up to date with the latest patches and features by scheduling upgrades automatically for customers at their preferred time of day and time of the week. This is a big part of the value proposition of Cisco Meraki, as it ensures customers stay protected from the latest threats and delivers new functionalities in a timely manner, without running into orphaned networks that have not received upgrades in a very long time.
However, for some customer sites and deployments this behavior can be troublesome, as the customer may not be able to upgrade at that specific time or some of their key staff may be out during the programmed maintenance window. While it is possible to re-schedule these upgrades or even cancel them from the GUI, if you have very large numbers of sites it can be hard to do this at scale. This is why Meraki introduced a set of Firmware Upgrade management functionalities via their API.
This script allows a customer to identify a subset of networks through a tag (fw-delay
), and delay the scheduled upgrades of these networks to a set time in the future, or offset by a certain number of days.
requirements.txt
git clone https://github.com/Francisco-1088/merakiUpgradeSensitivity.git
config.py
api_key
in line 2Mkiconf.org_id
appliance
, camera
, cellularGateway
, wireless
, switch
and sensor
. You should only include the specific product lines you want to delay upgrades for.delay_use_days
or delay_use_specific_date
to True
.delay_use_days
is set to True
, specify a number of days into the future to delay your upgrades to. This can never be more than 30 days. The time of the upgrade will be kept the same, only the day in which it occurs will change.delay_specific_date
is set to True
, specify a date in the future that you want to delay your upgrades to. This day cannot be more than 30 days into the future. In this case, time and date will be modified.verbose
displays additional information about the data gathered from the source networks. supervised
prompts you before every configuration change, allowing you to skip it. console_logging
enables API log messages to appear in the console. You may set any of these to False
if you do not want this level of logging.pip install -r requirements.txt
from your terminalconfig.py
under delay_tag
When tagging networks bound to templates, ALL networks bound to the template must have the fw-delay
tag, as it is not possible to only upgrade a specific network in the template while not the others. The upgrade time will match whatever timezone you have configured in the child network.
Run the script with python main.py
After executing the script, make sure to go to Organization - Firmware upgrades - Scheduled changes
and verify that the new upgrade dates and times match your expectation
Note: If using the supervised=True
configuration in the config.py
file, every time the script will apply configuration changes it will prompt you to accept whether you want to continue or not. The prompt ONLY accepts Y
for continuing, or N
for skipping, and it is cap-sensitive. Any other input will break execution.
delay_tag
delay_days
instead of a specific date with delay_specific_date
Code Exchange Community
Get help, share code, and collaborate with other developers in the Code Exchange community.View Community