QuestionQ422
Cisco Platforms and Development
Refer to the exhibit. Drag the code options from the bottom to the boxes with missing code to add a subnet to each bridge domain in the Ten1 tenant. Not all options are used.
Drag & Drop
fvBD
fvTenant
ClassQuery
bdname
DnQuery
ClassName
commit
from cobra.model import fv from cobra.mit.request import ClassQuery, DnQuery import cobra.mit.access import cobra.mit.session tenname = "Ten1" ls = cobra.mit.session.LoginSession( 'https://10.100.1.200', "admin", "Lab123!3") aci = cobra.mit.access.MoDirectory(ls) aci.login() c = cobra.mit.request.ConfigRequest() qry1 = (f'uni/tn-{tenname}') fvTenant = aci.query(qry1)[0] qry2 = ("fvBD") qry2.propFilter = f'and(wcard(fvBD.dn,"{fvTenant.dn}"))' fvBDs = aci.query(qry2) i=0 for fvBD in fvBDs: fvSubnet = cobra.model.fv.Subnet( , ip=f'10.114.{i}.1/24') c.addMo(fvBD) aci. (c) i+=
Community Discussion