<?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 Re: ACIToolkit - Listing Endpoints [Key Error] in Controllers</title>
    <link>https://community.cisco.com/t5/controllers/acitoolkit-listing-endpoints-key-error/m-p/4993971#M3219</link>
    <description>&lt;P&gt;Hi &lt;a href="https://community.cisco.com/t5/user/viewprofilepage/user-id/293649"&gt;@Marcel Zehnder&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Thanks for your response. I have taken the script from below sample script. I am not sure why I am getting this error while executing below script from GitHub. I have installed &lt;STRONG&gt;Cobra SDK and ACITOOLKIT&lt;/STRONG&gt; libraries and modules. On the other hand, other script is running properly from below sample GitHub folder.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/datacenter/acitoolkit/blob/master/samples/aci-show-endpoints.py" target="_blank"&gt;https://github.com/datacenter/acitoolkit/blob/master/samples/aci-show-endpoints.py&lt;/A&gt;&lt;/P&gt;&lt;P&gt;It would be highly appreciated if you assist me on this below script according to shared screenshot.&lt;/P&gt;&lt;P&gt;Thanking you.&lt;/P&gt;&lt;P&gt;Erfan&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 10 Jan 2024 21:40:39 GMT</pubDate>
    <dc:creator>euahmed</dc:creator>
    <dc:date>2024-01-10T21:40:39Z</dc:date>
    <item>
      <title>ACIToolkit - Listing Endpoints [Key Error]</title>
      <link>https://community.cisco.com/t5/controllers/acitoolkit-listing-endpoints-key-error/m-p/4505482#M48</link>
      <description>&lt;P&gt;Hi everyone,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am just studying for DevNet Associate exam and I am currently trying out DC Automation with Python.&amp;nbsp;&lt;/P&gt;&lt;P&gt;So i downloaded ACIToolkit and imported it into my script. I can list tenants, EPGs you name it...&amp;nbsp;&lt;/P&gt;&lt;P&gt;However when I try to list endpoints i do get an error message saying that there is an key error within some of the ACIToolkit files.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I created this little test-script for showcasing:&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;import&lt;/SPAN&gt;&lt;SPAN&gt; sys&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;import&lt;/SPAN&gt;&lt;SPAN&gt; acitoolkit.acitoolkit &lt;/SPAN&gt;&lt;SPAN&gt;as&lt;/SPAN&gt;&lt;SPAN&gt; aci&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;APIC_URL = &lt;/SPAN&gt;&lt;SPAN&gt;"&lt;A href="https://sandboxapicdc.cisco.com" target="_blank" rel="noopener"&gt;https://sandboxapicdc.cisco.com&lt;/A&gt;"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;USER = "username"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;PASS = &lt;/SPAN&gt;&lt;SPAN&gt;"password"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;# Login to APIC&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;SESSION = aci.Session(APIC_URL, USER, PASS)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;RESP = SESSION.login()&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;if&lt;/SPAN&gt; &lt;SPAN&gt;not&lt;/SPAN&gt;&lt;SPAN&gt; RESP.ok:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; print(&lt;/SPAN&gt;&lt;SPAN&gt;"Could not login to APIC"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; sys.exit()&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;ENDPOINTS = aci.Endpoint.get(SESSION)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;for&lt;/SPAN&gt;&lt;SPAN&gt; ENDPOINT &lt;/SPAN&gt;&lt;SPAN&gt;in&lt;/SPAN&gt;&lt;SPAN&gt; ENDPOINTS:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; print(ENDPOINT.name)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;However when I log in with the appropriate sandbox credentials I receive the following error message:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;PS C:\Path_to_File&amp;gt; python .\acitoolkit_test.py&lt;BR /&gt;Traceback (most recent call last):&lt;BR /&gt;File "C:\Path_to_File\acitoolkit_test.py", line 27, in &amp;lt;module&amp;gt;&lt;BR /&gt;ENDPOINTS = aci.Endpoint.get(SESSION)&lt;BR /&gt;File "C:\Path_to_File\acitoolkit\acitoolkit.py", line 5432, in get&lt;BR /&gt;endpoints = Endpoint._get(session, endpoint_name, interfaces,&lt;BR /&gt;File "C:\Path_to_File\acitoolkit\acitoolkit.py", line 5388, in _get&lt;BR /&gt;endpoint.ip = str(ep['ip'])&lt;BR /&gt;KeyError: 'ip'&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Does someone know what I am missing here ? Or is it an error within the acitoolkit.py file ?&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Like I said there are no problems in displaying tenants, epgs etc. but when i want to display the endpoints there is this error.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Looking forward to your answers.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Thanks in regards!&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Niklas&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;EDIT:&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;So I did a little troubleshooting and I saw that in line 5388 the file "acitoolkit.py" which comes with the ACI Toolkit wants to get the endpoints IP address (&lt;SPAN&gt;endpoint.ip = str(ep['ip'])) however while testing with Postman I saw that the response does not contain a field for "ip".&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;So when commenting the "endpoint.ip = str(ep["ip"]))" out I started to receive data again.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Does someone know how I can see the endpoints IP address then ?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 19 Nov 2021 14:23:53 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/acitoolkit-listing-endpoints-key-error/m-p/4505482#M48</guid>
      <dc:creator>Nik1709</dc:creator>
      <dc:date>2021-11-19T14:23:53Z</dc:date>
    </item>
    <item>
      <title>Re: ACIToolkit - Listing Endpoints [Key Error]</title>
      <link>https://community.cisco.com/t5/controllers/acitoolkit-listing-endpoints-key-error/m-p/4672865#M49</link>
      <description>&lt;P&gt;I get no error with TE&lt;SPAN&gt;NTANTS = aci.Tenant.get(SESSION).&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;I guess there is no Endpoint in that Pod.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 20 Aug 2022 20:38:10 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/acitoolkit-listing-endpoints-key-error/m-p/4672865#M49</guid>
      <dc:creator>RiekCyber</dc:creator>
      <dc:date>2022-08-20T20:38:10Z</dc:date>
    </item>
    <item>
      <title>Re: ACIToolkit - Listing Endpoints [Key Error]</title>
      <link>https://community.cisco.com/t5/controllers/acitoolkit-listing-endpoints-key-error/m-p/4992305#M3217</link>
      <description>&lt;P&gt;Dear All ,&lt;/P&gt;&lt;P&gt;I am getting this below error while trying to execute aci show endpoints details using ACITOOLKIT .&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="euahmed_0-1704755916511.png" style="width: 400px;"&gt;&lt;img src="https://community.cisco.com/t5/image/serverpage/image-id/206673i1DE4A807F1234E55/image-size/medium?v=v2&amp;amp;px=400" role="button" title="euahmed_0-1704755916511.png" alt="euahmed_0-1704755916511.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Please can anyone suggest me how to fix this Acitoolkits script for endpoints details .&amp;nbsp;&lt;/P&gt;&lt;P&gt;It would be highly appreciated if anyone reply on this issue .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;with regards&amp;nbsp;&lt;/P&gt;&lt;P&gt;Erfan&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jan 2024 23:20:28 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/acitoolkit-listing-endpoints-key-error/m-p/4992305#M3217</guid>
      <dc:creator>euahmed</dc:creator>
      <dc:date>2024-01-08T23:20:28Z</dc:date>
    </item>
    <item>
      <title>Re: ACIToolkit - Listing Endpoints [Key Error]</title>
      <link>https://community.cisco.com/t5/controllers/acitoolkit-listing-endpoints-key-error/m-p/4992479#M3218</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.cisco.com/t5/user/viewprofilepage/user-id/1561191"&gt;@euahmed&lt;/a&gt;, can you please post your code/script?&lt;/P&gt;
&lt;P&gt;Thanks&lt;BR /&gt;Marcel&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jan 2024 08:04:43 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/acitoolkit-listing-endpoints-key-error/m-p/4992479#M3218</guid>
      <dc:creator>Marcel Zehnder</dc:creator>
      <dc:date>2024-01-09T08:04:43Z</dc:date>
    </item>
    <item>
      <title>Re: ACIToolkit - Listing Endpoints [Key Error]</title>
      <link>https://community.cisco.com/t5/controllers/acitoolkit-listing-endpoints-key-error/m-p/4993971#M3219</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.cisco.com/t5/user/viewprofilepage/user-id/293649"&gt;@Marcel Zehnder&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Thanks for your response. I have taken the script from below sample script. I am not sure why I am getting this error while executing below script from GitHub. I have installed &lt;STRONG&gt;Cobra SDK and ACITOOLKIT&lt;/STRONG&gt; libraries and modules. On the other hand, other script is running properly from below sample GitHub folder.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/datacenter/acitoolkit/blob/master/samples/aci-show-endpoints.py" target="_blank"&gt;https://github.com/datacenter/acitoolkit/blob/master/samples/aci-show-endpoints.py&lt;/A&gt;&lt;/P&gt;&lt;P&gt;It would be highly appreciated if you assist me on this below script according to shared screenshot.&lt;/P&gt;&lt;P&gt;Thanking you.&lt;/P&gt;&lt;P&gt;Erfan&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2024 21:40:39 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/acitoolkit-listing-endpoints-key-error/m-p/4993971#M3219</guid>
      <dc:creator>euahmed</dc:creator>
      <dc:date>2024-01-10T21:40:39Z</dc:date>
    </item>
    <item>
      <title>Re: ACIToolkit - Listing Endpoints [Key Error]</title>
      <link>https://community.cisco.com/t5/controllers/acitoolkit-listing-endpoints-key-error/m-p/4994468#M3220</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.cisco.com/t5/user/viewprofilepage/user-id/1561191"&gt;@euahmed&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There is already an open issue for this: &lt;A href="https://github.com/datacenter/acitoolkit/issues/388" target="_blank"&gt;https://github.com/datacenter/acitoolkit/issues/388&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Looking at the code, the problem is related to endpoint objects with no "ip" attribute: Line 5394 will not work (&lt;A href="https://github.com/datacenter/acitoolkit/blob/master/acitoolkit/acitoolkit.py#L5394" target="_blank"&gt;https://github.com/datacenter/acitoolkit/blob/master/acitoolkit/acitoolkit.py#L5394&lt;/A&gt;). We should get the dict values via ep.get(&amp;lt;attribute_name&amp;gt;) and not via ep[&amp;lt;attribute_name&amp;gt;], I will check if there is PR for this, if not I will create one.&lt;/P&gt;
&lt;P&gt;Also I'm not sure if acitoolkit is still maintained.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Cheers&lt;BR /&gt;Marcel&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jan 2024 16:09:05 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/acitoolkit-listing-endpoints-key-error/m-p/4994468#M3220</guid>
      <dc:creator>Marcel Zehnder</dc:creator>
      <dc:date>2024-01-11T16:09:05Z</dc:date>
    </item>
    <item>
      <title>Re: ACIToolkit - Listing Endpoints [Key Error]</title>
      <link>https://community.cisco.com/t5/controllers/acitoolkit-listing-endpoints-key-error/m-p/4994472#M3221</link>
      <description>&lt;P&gt;Follow up, PR is already created:&amp;nbsp;&lt;A href="https://github.com/datacenter/acitoolkit/pull/382" target="_blank"&gt;https://github.com/datacenter/acitoolkit/pull/382&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jan 2024 16:10:30 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/acitoolkit-listing-endpoints-key-error/m-p/4994472#M3221</guid>
      <dc:creator>Marcel Zehnder</dc:creator>
      <dc:date>2024-01-11T16:10:30Z</dc:date>
    </item>
  </channel>
</rss>

