<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Why is class FexInterface derived from object instead of BaseInterface?!! in Controllers</title>
    <link>https://community.cisco.com/t5/controllers/why-is-class-fexinterface-derived-from-object-instead-of/m-p/3459571#M223</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to attach a static binding to a FEX interface.&lt;/P&gt;&lt;P&gt;With normal interfaces you would do it like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #999988; font-style: italic;"&gt;# Create the physical interface object&lt;BR /&gt;&lt;/SPAN&gt;intf &lt;SPAN style="font-weight: bold;"&gt;= &lt;/SPAN&gt;ACI.Interface(INTERFACE[&lt;SPAN style="color: #dd1144;"&gt;'type'&lt;/SPAN&gt;],&lt;/P&gt;&lt;P&gt;&amp;nbsp; INTERFACE[&lt;SPAN style="color: #dd1144;"&gt;'pod'&lt;/SPAN&gt;],&lt;/P&gt;&lt;P&gt;&amp;nbsp; INTERFACE[&lt;SPAN style="color: #dd1144;"&gt;'node'&lt;/SPAN&gt;],&lt;/P&gt;&lt;P&gt;&amp;nbsp; INTERFACE[&lt;SPAN style="color: #dd1144;"&gt;'module'&lt;/SPAN&gt;],&lt;/P&gt;&lt;P&gt;&amp;nbsp; INTERFACE[&lt;SPAN style="color: #dd1144;"&gt;'port'&lt;/SPAN&gt;])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #999988; font-style: italic;"&gt;# Create a VLAN interface and attach to the physical interface&lt;BR /&gt;&lt;/SPAN&gt;vlan_intf &lt;SPAN style="font-weight: bold;"&gt;= &lt;/SPAN&gt;ACI.L2Interface(VLAN[&lt;SPAN style="color: #dd1144;"&gt;'name'&lt;/SPAN&gt;], VLAN[&lt;SPAN style="color: #dd1144;"&gt;'encap_type'&lt;/SPAN&gt;], VLAN[&lt;SPAN style="color: #dd1144;"&gt;'encap_id'&lt;/SPAN&gt;], VLAN[&lt;SPAN style="color: #dd1144;"&gt;'encap_mode'&lt;/SPAN&gt;])&lt;/P&gt;&lt;P&gt;vlan_intf.attach(intf)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #999988; font-style: italic;"&gt;# Attach the EPG to the VLAN interface&lt;BR /&gt;&lt;/SPAN&gt;epg.set_deployment_immediacy(&lt;SPAN style="color: #dd1144;"&gt;'immediate'&lt;/SPAN&gt;)&lt;/P&gt;&lt;P&gt;epg.attach(vlan_intf)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Trying the same thinig with "FexInterface" does result in an error:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: courier new,courier;"&gt;&amp;nbsp; File "aci-attach-epg-to-interface.py", line 71, in &amp;lt;module&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; vlan_intf.attach(intfFex)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&gt;&amp;nbsp; File "build/bdist.linux-x86_64/egg/acitoolkit/acibaseobject.py", line 574, in attach&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: courier new,courier;"&gt;AttributeError: 'FexInterface' object has no attribute '_attachments'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is obvious since you are not using the foreseen class "BaseInterface" as foundation for the FexInterface class.&lt;/P&gt;&lt;P&gt;How would you solve that problem on a proper way? Is there any workaround (besides compiling some nasty JSON/XML strings) &lt;IMG src="https://community.cisco.com/legacyfs/online/emoticons/angry.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks!&lt;/P&gt;&lt;P&gt;Beat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 30 Dec 2015 09:06:04 GMT</pubDate>
    <dc:creator>ax-sys-erb</dc:creator>
    <dc:date>2015-12-30T09:06:04Z</dc:date>
    <item>
      <title>Why is class FexInterface derived from object instead of BaseInterface?!!</title>
      <link>https://community.cisco.com/t5/controllers/why-is-class-fexinterface-derived-from-object-instead-of/m-p/3459571#M223</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to attach a static binding to a FEX interface.&lt;/P&gt;&lt;P&gt;With normal interfaces you would do it like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #999988; font-style: italic;"&gt;# Create the physical interface object&lt;BR /&gt;&lt;/SPAN&gt;intf &lt;SPAN style="font-weight: bold;"&gt;= &lt;/SPAN&gt;ACI.Interface(INTERFACE[&lt;SPAN style="color: #dd1144;"&gt;'type'&lt;/SPAN&gt;],&lt;/P&gt;&lt;P&gt;&amp;nbsp; INTERFACE[&lt;SPAN style="color: #dd1144;"&gt;'pod'&lt;/SPAN&gt;],&lt;/P&gt;&lt;P&gt;&amp;nbsp; INTERFACE[&lt;SPAN style="color: #dd1144;"&gt;'node'&lt;/SPAN&gt;],&lt;/P&gt;&lt;P&gt;&amp;nbsp; INTERFACE[&lt;SPAN style="color: #dd1144;"&gt;'module'&lt;/SPAN&gt;],&lt;/P&gt;&lt;P&gt;&amp;nbsp; INTERFACE[&lt;SPAN style="color: #dd1144;"&gt;'port'&lt;/SPAN&gt;])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #999988; font-style: italic;"&gt;# Create a VLAN interface and attach to the physical interface&lt;BR /&gt;&lt;/SPAN&gt;vlan_intf &lt;SPAN style="font-weight: bold;"&gt;= &lt;/SPAN&gt;ACI.L2Interface(VLAN[&lt;SPAN style="color: #dd1144;"&gt;'name'&lt;/SPAN&gt;], VLAN[&lt;SPAN style="color: #dd1144;"&gt;'encap_type'&lt;/SPAN&gt;], VLAN[&lt;SPAN style="color: #dd1144;"&gt;'encap_id'&lt;/SPAN&gt;], VLAN[&lt;SPAN style="color: #dd1144;"&gt;'encap_mode'&lt;/SPAN&gt;])&lt;/P&gt;&lt;P&gt;vlan_intf.attach(intf)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #999988; font-style: italic;"&gt;# Attach the EPG to the VLAN interface&lt;BR /&gt;&lt;/SPAN&gt;epg.set_deployment_immediacy(&lt;SPAN style="color: #dd1144;"&gt;'immediate'&lt;/SPAN&gt;)&lt;/P&gt;&lt;P&gt;epg.attach(vlan_intf)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Trying the same thinig with "FexInterface" does result in an error:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: courier new,courier;"&gt;&amp;nbsp; File "aci-attach-epg-to-interface.py", line 71, in &amp;lt;module&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; vlan_intf.attach(intfFex)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&gt;&amp;nbsp; File "build/bdist.linux-x86_64/egg/acitoolkit/acibaseobject.py", line 574, in attach&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: courier new,courier;"&gt;AttributeError: 'FexInterface' object has no attribute '_attachments'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is obvious since you are not using the foreseen class "BaseInterface" as foundation for the FexInterface class.&lt;/P&gt;&lt;P&gt;How would you solve that problem on a proper way? Is there any workaround (besides compiling some nasty JSON/XML strings) &lt;IMG src="https://community.cisco.com/legacyfs/online/emoticons/angry.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks!&lt;/P&gt;&lt;P&gt;Beat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Dec 2015 09:06:04 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/why-is-class-fexinterface-derived-from-object-instead-of/m-p/3459571#M223</guid>
      <dc:creator>ax-sys-erb</dc:creator>
      <dc:date>2015-12-30T09:06:04Z</dc:date>
    </item>
    <item>
      <title>Re: Why is class FexInterface derived from object instead of BaseInterface?!!</title>
      <link>https://community.cisco.com/t5/controllers/why-is-class-fexinterface-derived-from-object-instead-of/m-p/3459572#M224</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have the same issue. Did you ever figure this out?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Mar 2017 17:28:24 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/why-is-class-fexinterface-derived-from-object-instead-of/m-p/3459572#M224</guid>
      <dc:creator>Matt Carey</dc:creator>
      <dc:date>2017-03-27T17:28:24Z</dc:date>
    </item>
  </channel>
</rss>

