<?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: Workflow emc.cli question(s) in ExtremeCloud IQ- Site Engine Management Center</title>
    <link>https://community.extremenetworks.com/t5/extremecloud-iq-site-engine/workflow-emc-cli-question-s/m-p/99461#M10086</link>
    <description>&lt;P&gt;Yes, the emc_cli.close() was the secret for me. Thanks so much.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 28 Feb 2024 17:37:17 GMT</pubDate>
    <dc:creator>XTRMUser</dc:creator>
    <dc:date>2024-02-28T17:37:17Z</dc:date>
    <item>
      <title>Workflow emc.cli question(s)</title>
      <link>https://community.extremenetworks.com/t5/extremecloud-iq-site-engine/workflow-emc-cli-question-s/m-p/99442#M10083</link>
      <description>&lt;P&gt;I'm working on developing a workflow that will show where a mac address is in my network. I can't query XIQ, since a number of the mac addresses aren't there, and I don't have the IP address and use "show ip arp &amp;lt;ip address&amp;gt;" on the VOSS cores.&lt;/P&gt;&lt;P&gt;In my workflow, python script, I have the following (there is more, but this is the appropriate stuff, I think).&lt;/P&gt;&lt;LI-CODE lang="python"&gt;from xmclib import emc_vars

# Ask for a complete list of all my switches
my_query1 = '''{network{devices{ip,sysName,nosId}}}'''
my_result1 = emc_nbi.query(my_query1)['network']['devices']

# Now cycle through the switches
for my_switch in my_result1:
    my_switch_ip = my_switch['ip']
    my_switch_name = my_switch['sysName']
    my_os = my_switch['nosId']

# I know that BOSS and VOSS (I don't have EXOS) syntax commands are different. I'm using BOSS in the example below 
# I use the show mac-addr addr &amp;lt;mac-address&amp;gt;
            client_command = 'show mac-addr addr ' + mac_address_ers
            emc_cli.setIpAddress(my_switch_ip)
            my_search_results = emc_cli.send(client_command).getOutput()
            #more processing here

&lt;/LI-CODE&gt;&lt;P&gt;The first time through the loop, everything works correctly. The 2nd (and subsequent)&amp;nbsp; time (it uses another IP address), the field "my_search_results" gives the first time through results.&lt;/P&gt;&lt;P&gt;Do I need to clear the emc_cli or the getOutput or something???&lt;/P&gt;&lt;P&gt;Thanks for any tips.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Feb 2024 18:43:56 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremecloud-iq-site-engine/workflow-emc-cli-question-s/m-p/99442#M10083</guid>
      <dc:creator>XTRMUser</dc:creator>
      <dc:date>2024-02-27T18:43:56Z</dc:date>
    </item>
    <item>
      <title>Re: Workflow emc.cli question(s)</title>
      <link>https://community.extremenetworks.com/t5/extremecloud-iq-site-engine/workflow-emc-cli-question-s/m-p/99450#M10084</link>
      <description>&lt;P&gt;if you like to change the device context you have to close the session first before establishing a new one.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Markus_Nikulski_0-1709127242265.png" style="width: 400px;"&gt;&lt;img src="https://community.extremenetworks.com/t5/image/serverpage/image-id/7012i8819FAE7B8F2F1DC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Markus_Nikulski_0-1709127242265.png" alt="Markus_Nikulski_0-1709127242265.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Feb 2024 13:34:27 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremecloud-iq-site-engine/workflow-emc-cli-question-s/m-p/99450#M10084</guid>
      <dc:creator>Markus_Nikulski</dc:creator>
      <dc:date>2024-02-28T13:34:27Z</dc:date>
    </item>
    <item>
      <title>Re: Workflow emc.cli question(s)</title>
      <link>https://community.extremenetworks.com/t5/extremecloud-iq-site-engine/workflow-emc-cli-question-s/m-p/99459#M10085</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;try to do some cleanup before you open new session:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;        emc_cli.setIpAddress(varDevice)
        sendConfigCmds(varCMDS)
        emc_cli.close()
        emc_cli.setCliRule(None)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;this worked for me.&lt;/P&gt;&lt;P&gt;good luck&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Feb 2024 14:05:18 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremecloud-iq-site-engine/workflow-emc-cli-question-s/m-p/99459#M10085</guid>
      <dc:creator>Zdeněk_Pala</dc:creator>
      <dc:date>2024-02-28T14:05:18Z</dc:date>
    </item>
    <item>
      <title>Re: Workflow emc.cli question(s)</title>
      <link>https://community.extremenetworks.com/t5/extremecloud-iq-site-engine/workflow-emc-cli-question-s/m-p/99461#M10086</link>
      <description>&lt;P&gt;Yes, the emc_cli.close() was the secret for me. Thanks so much.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Feb 2024 17:37:17 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremecloud-iq-site-engine/workflow-emc-cli-question-s/m-p/99461#M10086</guid>
      <dc:creator>XTRMUser</dc:creator>
      <dc:date>2024-02-28T17:37:17Z</dc:date>
    </item>
  </channel>
</rss>

