Implementing Automation for Cisco Data Center Solutions (DCAUTO) — Question 17
Which Python code creates a VRF in an ACI tenant using the Cobra SDK?
Answer options
- A. Vrf(fvTenant(uniMo, 'CustA'), 'CustA_VRF')
- B. Ctx(Tenant(uniMo, 'CustA'), 'CustA_VRF')
- C. Vrf(Tenant(uniMo, 'CustA'), 'CustA_VRF')
- D. Ctx(fvTenant(uniMo, 'CustA'), 'CustA_VRF')
Correct answer: B
Explanation
The correct answer is B because the Ctx class is specifically designed for creating context instances, including VRFs, within an ACI tenant. Options A and C incorrectly use the Vrf class, which is not the appropriate method for this task, and option D also misuses the context by referencing fvTenant instead of Tenant.