Question 12 of 32 from exam 300-635-DCAUTO: Automating and Programming Cisco Data Center Solutions

Question 12 of 32 from exam 300-635-DCAUTO: Automating and Programming Cisco Data Center Solutions

Question

import requests

USER = "admin"
PASS = "password"
APIC = 'https://apic.supereats.com'

OPERATION = ‘api/aaaLogin.json"
DATA = ("aaaUser": {"attributes": {"name":USER, "pwd":PASS}}}
RESPONSE = requests.post (APIC+OPERATION, json=DATA, verify-False)

TOKEN = RESPONSE. json() {"imdata”] [0] ("aaaLogin”] ("attributes") ["token"]
COOKIE = {"APIC-cookie': TOKEN)

OPERATION = ‘api/aaaLogout.json"
DATA = {
“aaaLogout": {
"attributes": (
"token": TOKEN

,
)

RESPONSE = requests.post (APIC+OPERATION, json=DATA, cookies.COOKIE, verify=False}

Which Python snippets create an application policy named OrderProcess that contains two application endpoint groups under Tenant SuperEats using direct calls to the ACI REST API? Assume that authentication and library imports are correct.

A.

OPERATION = 'api/node/mo/uni.json'
DATA = {
“EVTenant": {"attributes": {"name": "SuperEats"},
"children": [{"FVAp": {"attributes": {"name": “OrderProcess")},
"children": [
{"FVAEPg": {"attributes": {"name": "app"}}},

{"FVAEPg": {"attributes": {"name": "web"}}}
1}

1)
}
RESPONSE = requests.post (APIC+OPERATION, json=DATA, cookies=COOKIE)

B.

OPERATION = ‘api/node/mo/uni.json'
DATA = {
“fvTenant": {"attributes": {"name": “SuperEats"},
“children”: [("fvAp": {"attributes": {"name": “OrderProcess"},
"children": [
{"fVAEPg": {"attributes": {"name": "app"}})},

{"fVAEPg”: {"attributes": {"name": "web"}}}
1}

1}
}
RESPONSE = requests.get (APIC+OPERATION, cookies=COOKIE)

C.

OPERATION = ‘api/node/mo/uni.json'
DATA = {
"fvTenant": {"attributes": {"rn": "SuperEats"},
"children": [{"fvAp": {"attributes": {"rn": "OrderProcess"},
"children": [
{"fVAEPg": {"attributes": {"rn": "“app"}}},

{"f£VAEPg": {"attributes": {"rn": "web"}}}
1}

1}
}
RESPONSE = requests.post (APIC+OPERATION, json=DATA, cookies=COOKIE)

D.

OPERATION = 'api/node/mo/uni.json'
DATA = {
“fvTenant": {"attributes": {"name": “SuperEats"},
“children”: [{"fvAp": {"attributes": {"name": "OrderProcess"},
"children": [
{"fVAEPg": {"attributes": {"name": "app"}}},

{"fvAEPg": {"attributes": {"name": "web"}}}
1}

1}
}
RESPONSE = requests.post (APIC+OPERATION, json=DATA, cookies=COOKIE)

Explanations

D.