cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1932
Views
0
Helpful
1
Replies

Why is class FexInterface derived from object instead of BaseInterface?!!

ax-sys-erb
Level 4
Level 4

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)

Many thanks!

Beat

1 Reply 1

Matt Carey
Level 1
Level 1

I have the same issue. Did you ever figure this out?