We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
There is a problem with requesting the vlans from a Vlan Encap Block: "cobra.model.fvns.EncapBlk"
When configuring it can be done with an attribute "from_":
cobra.model.fvns.EncapBlk( fvnsVlanInstP, from_=u'vlan-123', name=u'', descr=u'', to=u'vlan-124', nameAlias=u'', allocMode=u'static' )
But when requesting, that doesn't work:
from cobra.mit.request import DnQuery, ClassQuery import cobra.mit.access import cobra.mit.session import cobra.model.pol apic="10.1.1.1" username="admin" password="admin123" ls = cobra.mit.session.LoginSession(f'https://{apic}', username, password, secure=False) aci = cobra.mit.access.MoDirectory(ls) aci.login() objtype = "fvnsEncapBlk" qry = ClassQuery(objtype) qry.orderBy = '{}.dn'.format(objtype) objects = aci.query(qry) vlencapblk = objects[0] print(f" VLAN block Name: {vlencapblk.name}") print(f" VLAN block DN: {vlencapblk.dn}") print(f" To VLAN: {vlencapblk.to}") # Problem: print(f" From VLAN: {vlencapblk.from}") # Workarround: print(f' from VLAN: {getattr(vlencapblk, "from")}')
the "vlencapblk.from" uses the reserved keyword "from" would it be possible to change this to "from_"
Thanks very much, Brian
The text was updated successfully, but these errors were encountered:
No branches or pull requests
There is a problem with requesting the vlans from a Vlan Encap Block:
"cobra.model.fvns.EncapBlk"
When configuring it can be done with an attribute "from_":
But when requesting, that doesn't work:
the "vlencapblk.from" uses the reserved keyword "from" would it be possible to change this to "from_"
Thanks very much,
Brian
The text was updated successfully, but these errors were encountered: