I'm trying to attach a static binding to a FEX interface.
With normal interfaces you would do it like this:
# Create the physical interface object
intf = ACI.Interface(INTERFACE['type'],
INTERFACE['pod'],
INTERFACE['node'],
INTERFACE['module'],
INTERFACE['port'])
# Create a VLAN interface and attach to the physical interface
vlan_intf = ACI.L2Interface(VLAN['name'], VLAN['encap_type'], VLAN['encap_id'], VLAN['encap_mode'])
vlan_intf.attach(intf)
# Attach the EPG to the VLAN interface
epg.set_deployment_immediacy('immediate')
epg.attach(vlan_intf)
Trying the same thinig with "FexInterface" does result in an error:
File "aci-attach-epg-to-interface.py", line 71, in <module>
vlan_intf.attach(intfFex)
File "build/bdist.linux-x86_64/egg/acitoolkit/acibaseobject.py", line 574, in attach
AttributeError: 'FexInterface' object has no attribute '_attachments'
This is obvious since you are not using the foreseen class "BaseInterface" as foundation for the FexInterface class.
How would you solve that problem on a proper way? Is there any workaround (besides compiling some nasty JSON/XML strings) ![](/legacyfs/online/emoticons/angry.png)
Many thanks!
Beat