QuestionQ82
VerifiedController-Based Network AutomationAn engineer needs to schedule code-driven firmware upgrades for Cisco Meraki switches across a specific network to remediate vulnerabilities. The engineer must use the Meraki Dashboard API to schedule the next upgrade for the switch product and specify the target version. Drag the code snippets into the boxes to build the artifact. Not all options are used.
Drag & Drop
import meraki, datetime API_KEY = "MERAKI_API_KEY" dashboard = meraki.DashboardAPI(API_KEY, output_log=False, suppress_logging=True) network_id = "N_1234567890" schedule_time = (datetime.datetime.utcnow() + datetime.timedelta(days=2)).replace(microsecond=0).isoformat() + "Z" payload = { "": { "": { "nextUpgrade": { "time": schedule_time, "": "switch-15-20" } } } } resp = dashboard.networks.(network_id, **payload) print("Scheduled:", resp.get("id", "ok"))
Community Discussion