<?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 how to use the ACI Toolkit session module effectively ? in Controllers</title>
    <link>https://community.cisco.com/t5/controllers/how-to-use-the-aci-toolkit-session-module-effectively/m-p/3489842#M197</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I just want to know how to use the ACI session module. I am testing subscripting and would really like some very simple examples: such as&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here is how to create the session&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; session = acisession(a,b,c)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here is how to start subscribing&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; subscribe = session.subscribe()&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here is how to specify the class that you want to subscribe&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; subscribe = session.subscribe('aaaModLR')&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 17 Jun 2018 17:59:28 GMT</pubDate>
    <dc:creator>peterzhang</dc:creator>
    <dc:date>2018-06-17T17:59:28Z</dc:date>
    <item>
      <title>how to use the ACI Toolkit session module effectively ?</title>
      <link>https://community.cisco.com/t5/controllers/how-to-use-the-aci-toolkit-session-module-effectively/m-p/3489842#M197</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I just want to know how to use the ACI session module. I am testing subscripting and would really like some very simple examples: such as&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here is how to create the session&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; session = acisession(a,b,c)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here is how to start subscribing&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; subscribe = session.subscribe()&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here is how to specify the class that you want to subscribe&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; subscribe = session.subscribe('aaaModLR')&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 17 Jun 2018 17:59:28 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/how-to-use-the-aci-toolkit-session-module-effectively/m-p/3489842#M197</guid>
      <dc:creator>peterzhang</dc:creator>
      <dc:date>2018-06-17T17:59:28Z</dc:date>
    </item>
    <item>
      <title>Re: how to use the ACI Toolkit session module effectively ?</title>
      <link>https://community.cisco.com/t5/controllers/how-to-use-the-aci-toolkit-session-module-effectively/m-p/3489843#M198</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;made some progress, but I can't seem to get the count to increase, no matter what I do to the static binding. Any idea what's wrong with the code ? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;session = acisession.Session(&lt;SPAN style="color: #aa4926;"&gt;url, uid, pwd)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;session.login()&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;count = session.get_event_count(url)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;result = session.subscribe(&lt;SPAN style="color: #aa4926;"&gt;url&lt;/SPAN&gt;=url&lt;SPAN style="color: #cc7832;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #aa4926;"&gt;only_new&lt;/SPAN&gt;=&lt;SPAN style="color: #8888c6;"&gt;True&lt;/SPAN&gt;).json()&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; color: #cc7832;"&gt;if &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;count &amp;gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: #6897bb;"&gt;0&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #cc7832;"&gt;print&lt;/SPAN&gt;(result[&lt;SPAN style="color: #a5c261;"&gt;'imdata'&lt;/SPAN&gt;][&lt;SPAN style="color: #6897bb;"&gt;0&lt;/SPAN&gt;][&lt;SPAN style="color: #a5c261;"&gt;'fvRsPathAtt'&lt;/SPAN&gt;][&lt;SPAN style="color: #a5c261;"&gt;'attributes'&lt;/SPAN&gt;][&lt;SPAN style="color: #a5c261;"&gt;'dn'&lt;/SPAN&gt;])&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 17 Jun 2018 18:34:24 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/how-to-use-the-aci-toolkit-session-module-effectively/m-p/3489843#M198</guid>
      <dc:creator>peterzhang</dc:creator>
      <dc:date>2018-06-17T18:34:24Z</dc:date>
    </item>
    <item>
      <title>Re: how to use the ACI Toolkit session module effectively ?</title>
      <link>https://community.cisco.com/t5/controllers/how-to-use-the-aci-toolkit-session-module-effectively/m-p/4872552#M3147</link>
      <description>&lt;P&gt;I would try inserting print statement to see value of count and also print the type, as it may be string, that you would need to convert to integer.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;print(f'(the count is {count} and it is of type {type(count)}')&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You may also need to drill down into the 'session' object and see what else you can work with&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;print(dir(session))&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;*I'm assuming you're using Python3&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jul 2023 13:59:00 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/how-to-use-the-aci-toolkit-session-module-effectively/m-p/4872552#M3147</guid>
      <dc:creator>Alexander Stevenson</dc:creator>
      <dc:date>2023-07-12T13:59:00Z</dc:date>
    </item>
  </channel>
</rss>

