Cisco
300-435 · Question #119
Refer to the exhibit. A network engineer must create a script that provides alerts from their Cisco Meraki network. All alerts must be printed on the screen, and the critical alerts must also be sent
Sign in or unlock 300-435 to reveal the answer and full explanation for question #119. The question stem and answer options stay visible for context.
Controller-Based Network Automation
Question
Refer to the exhibit. A network engineer must create a script that provides alerts from their Cisco Meraki network. All alerts must be printed on the screen, and the critical alerts must also be sent to a Cisco Webex room. Which code snippet must be added to the box in the code to perform this task?
from flask import Flask, request
import my_webex_module #custom made module for Cisco Webex functions
APP = Flask(__name__)
@APP.route("/", methods=["POST"])
def webhook():
data = request.json
print("() alert: {}".format(alert_level, alert_type))
if alert_level == "critical":
my_webex_module.send_alert(alert_type)
return "Alert sent"
else:
return "No alert sent"
# MISSING LINE HERE
Options
- Aalert_level = data["alertLevel"]json alert_type = data["alertType"]json
- Balert_level = data["alertLevel"] alert_type = data["alertType"]
- Calert_level = data["response"]["alertLevel"] alert_type = data["response"]["alertType"]
- Dalert_level = data["item"]["alertLevel"] alert_type = data["item"]["alertType"]
Unlock 300-435 to see the answer
You've previewed enough free 300-435 questions. Unlock 300-435 for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.
Topics
#Python#Flask#Webhooks#JSON parsing