Automating Cisco Data Center Solutions (DCAUTO)
60 questions across 1 topics, with suggested answers, explanations where available, and imported community discussion. The first 6 questions are free to preview.
Topics
| # | Topic | Questions | Free |
|---|---|---|---|
| 1 | Network Element Programmability | 14 | 6 |
Preview
6 of 14 accessibleWhich Python snippet creates an application policy named OrderProcess containing two application endpoint groups under the SuperEats tenant by making direct calls to the ACI REST API? Assume authentication and library imports are correct. <DragDrop items={["DATA = {\n \"FVTenant\": {\"attributes\": {\"name\": \"SuperEats\"},\n \"children\": [{\"FVAP\": {\"attributes\": {\"name\": \"OrderProcess\"},\n \"children\": [\n {\"FVAEPg\": {\"attributes\": {\"name\": \"app\"}}},\n {\"FVAEPg\": {\"attributes\": {\"name\": \"web\"}}}\n ]\n }}]\n }\n}\nRESPONSE = requests.post(APIC+OPERATION, json=DATA, cookies=COOKIE)","DATA = {\n \"fvTenant\": {\"attributes\": {\"name\": \"SuperEats\"},\n \"children\": [{\"fvAp\": {\"attributes\": {\"name\": \"OrderProcess\"},\n \"children\": [\n {\"fvAEPg\": {\"attributes\": {\"name\": \"app\"}}},\n {\"fvAEPg\": {\"attributes\": {\"name\": \"web\"}}}\n ]\n }}]\n }\n}\nRESPONSE = requests.get(APIC+OPERATION, cookies=COOKIE)","DATA = {\n \"fvTenant\": {\"attributes\": {\"rn\": \"SuperEats\"},\n \"children\": [{\"fvAp\": {\"attributes\": {\"rn\": \"OrderProcess\"},\n \"children\": [\n {\"fvAEPg\": {\"attributes\": {\"rn\": \"app\"}}},\n {\"fvAEPg\": {\"attributes\": {\"rn\": \"web\"}}}\n ]\n }}]\n }\n}\nRESPONSE = requests.post(APIC+OPERATION, json=DATA, cookies=COOKIE)","DATA = {\n \"fvTenant\": {\"attributes\": {\"name\": \"SuperEats\"},\n \"children\": [{\"fvAp\": {\"attributes\": {\"name\": \"OrderProcess\"},\n \"children\": [\n {\"fvAEPg\": {\"attributes\": {\"name\": \"app\"}}},\n {\"fvAEPg\": {\"attributes\": {\"name\": \"web\"}}}\n ]\n }}]\n }\n}\nRESPONSE = requests.post(APIC+OPERATION, json=DATA, cookies=COOKIE)"]} slots={[{"answer":"DATA = {\n \"fvTenant\": {\"attributes\": {\"name\": \"SuperEats\"},\n \"children\": [{\"fvAp\": {\"attributes\": {\"name\": \"OrderProcess\"},\n \"children\": [\n {\"fvAEPg\": {\"attributes\": {\"name\": \"app\"}}},\n {\"fvAEPg\": {\"attributes\": {\"name\": \"web\"}}}\n ]\n }}]\n }\n}\nRESPONSE = requests.post(APIC+OPERATION, json=DATA, cookies=COOKIE)","id":"code"}]} template={"import requests\n\nUSER = \"admin\"\nPASS = \"password\"\nAPIC = 'https://apic.supereats.com'\n\nOPERATION = 'api/aaaLogin.json'\nDATA = {\"aaaUser\": {\"attributes\": {\"name\":USER, \"pwd\":PASS}}}\nRESPONSE = requests.post(APIC+OPERATION, json=DATA, verify=False)\n\nTOKEN = RESPONSE.json()[\"imdata\"][0][\"aaaLogin\"][\"attributes\"][\"token\"]\nCOOKIE = {'APIC-cookie': TOKEN}\n\n{{code}}\n\nOPERATION = 'api/aaaLogout.json'\nDATA = {\n \"aaaLogout\": {\n \"attributes\": {\n \"token\":TOKEN\n }\n }\n}\nRESPONSE = requests.post(APIC+OPERATION, json=DATA, cookies=COOKIE, verify=False)"} explanation={"Creating ACI managed objects through the REST API requires the correct case-sensitive managed-object classes (`fvTenant`, `fvAp`, and `fvAEPg`) and a POST request. The `name` attributes create the SuperEats tenant, the OrderProcess application profile, and the app and web endpoint groups; the APIC authentication cookie authorizes the request."} reuse={false} />
What action is required to enable the REST API browser in Cisco UCS Director?
Refer to the exhibit. Which configuration command must be run on the Cisco NX-OS device for this command to work?