<?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: Running XMC workflow scripts in pc for testing in Scripting</title>
    <link>https://community.extremenetworks.com/t5/scripting/running-xmc-workflow-scripts-in-pc-for-testing/m-p/19434#M82</link>
    <description>Password is "emc"&lt;BR /&gt;Need to set that when emailing it, else it gets clobbered by email virus checking!</description>
    <pubDate>Fri, 07 Jan 2022 13:12:00 GMT</pubDate>
    <dc:creator>Ludovico_Steven</dc:creator>
    <dc:date>2022-01-07T13:12:00Z</dc:date>
    <item>
      <title>Running XMC workflow scripts in pc for testing</title>
      <link>https://community.extremenetworks.com/t5/scripting/running-xmc-workflow-scripts-in-pc-for-testing/m-p/19431#M79</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;I'm creating some workflows in XMC and I would like to run them&amp;nbsp;on my PC first just for testing.&lt;/P&gt;
&lt;P&gt;Is there a class or functions that I can import just to simulate the script and check for errors, even if it is just syntax error, before running it on the XMC?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;José Chaves&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jan 2022 01:02:00 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/scripting/running-xmc-workflow-scripts-in-pc-for-testing/m-p/19431#M79</guid>
      <dc:creator>Jose_Chaves</dc:creator>
      <dc:date>2022-01-07T01:02:00Z</dc:date>
    </item>
    <item>
      <title>RE: Running XMC workflow scripts in pc for testing</title>
      <link>https://community.extremenetworks.com/t5/scripting/running-xmc-workflow-scripts-in-pc-for-testing/m-p/19432#M80</link>
      <description>Actually, that is what I do when I write XMC/XIQ-SE Python scripts (or individual workflow Python activities).&lt;BR /&gt;I have this code at the beginning of my code:&lt;BR /&gt;&lt;BR /&gt;
&lt;PRE style="font-family: 'Courier New'; font-size: 13pt; color: #000000; background: #ffffff;"&gt;&lt;SPAN class="cg2"&gt;##########################################################
&lt;/SPAN&gt;&lt;SPAN class="cg3"&gt;try&lt;/SPAN&gt;&lt;SPAN class="cg1"&gt;:
    emc_vars
    execution &lt;/SPAN&gt;&lt;SPAN class="cg3"&gt;= &lt;/SPAN&gt;&lt;SPAN class="cg4"&gt;'xmc'
&lt;/SPAN&gt;&lt;SPAN class="cg3"&gt;except&lt;/SPAN&gt;&lt;SPAN class="cg1"&gt;: &lt;/SPAN&gt;&lt;SPAN class="cg2"&gt;# If not running on XMC Jython...
    &lt;/SPAN&gt;&lt;SPAN class="cg2"&gt;# These lines only needed to run XMC Python script locally (on my laptop)
    &lt;/SPAN&gt;&lt;SPAN class="cg2"&gt;# They can also be pasted to XMC, but will not execute
    &lt;/SPAN&gt;&lt;SPAN class="cg3"&gt;import &lt;/SPAN&gt;&lt;SPAN class="cg3"&gt;sys
    &lt;/SPAN&gt;&lt;SPAN class="cg3"&gt;import&lt;/SPAN&gt;&lt;SPAN class="cg1"&gt; json
    &lt;/SPAN&gt;&lt;SPAN class="cg3"&gt;import&lt;/SPAN&gt;&lt;SPAN class="cg1"&gt; java&lt;/SPAN&gt;&lt;SPAN class="cg3"&gt;.util
    &lt;/SPAN&gt;&lt;SPAN class="cg3"&gt;import&lt;/SPAN&gt;&lt;SPAN class="cg1"&gt; emc_cli      &lt;/SPAN&gt;&lt;SPAN class="cg2"&gt;# Own local replica
    &lt;/SPAN&gt;&lt;SPAN class="cg3"&gt;import&lt;/SPAN&gt;&lt;SPAN class="cg1"&gt; emc_nbi      &lt;/SPAN&gt;&lt;SPAN class="cg2"&gt;# Own local replica
    &lt;/SPAN&gt;&lt;SPAN class="cg3"&gt;import&lt;/SPAN&gt;&lt;SPAN class="cg1"&gt; emc_results  &lt;/SPAN&gt;&lt;SPAN class="cg2"&gt;# Own local replica
&lt;/SPAN&gt;&lt;SPAN class="cg1"&gt;    execution &lt;/SPAN&gt;&lt;SPAN class="cg3"&gt;= &lt;/SPAN&gt;&lt;SPAN class="cg4"&gt;'dev'
    &lt;/SPAN&gt;&lt;SPAN class="cg3"&gt;if &lt;/SPAN&gt;&lt;SPAN class="cg5"&gt;len&lt;/SPAN&gt;&lt;SPAN class="cg1"&gt;(&lt;/SPAN&gt;&lt;SPAN class="cg3"&gt;sys&lt;/SPAN&gt;&lt;SPAN class="cg1"&gt;.argv) &lt;/SPAN&gt;&lt;SPAN class="cg3"&gt;&amp;gt; &lt;/SPAN&gt;&lt;SPAN class="cg5"&gt;1&lt;/SPAN&gt;&lt;SPAN class="cg1"&gt;: &lt;/SPAN&gt;&lt;SPAN class="cg2"&gt;# Json file as 1st argv
&lt;/SPAN&gt;&lt;SPAN class="cg1"&gt;        emc_vars &lt;/SPAN&gt;&lt;SPAN class="cg3"&gt;=&lt;/SPAN&gt;&lt;SPAN class="cg1"&gt; json.load(&lt;/SPAN&gt;&lt;SPAN class="cg5"&gt;open&lt;/SPAN&gt;&lt;SPAN class="cg1"&gt;(&lt;/SPAN&gt;&lt;SPAN class="cg3"&gt;sys&lt;/SPAN&gt;&lt;SPAN class="cg1"&gt;.argv[&lt;/SPAN&gt;&lt;SPAN class="cg5"&gt;1&lt;/SPAN&gt;&lt;SPAN class="cg1"&gt;]))
    &lt;/SPAN&gt;&lt;SPAN class="cg3"&gt;else&lt;/SPAN&gt;&lt;SPAN class="cg1"&gt;:
        emc_vars &lt;/SPAN&gt;&lt;SPAN class="cg3"&gt;=&lt;/SPAN&gt;&lt;SPAN class="cg1"&gt; json.load(&lt;/SPAN&gt;&lt;SPAN class="cg5"&gt;open&lt;/SPAN&gt;&lt;SPAN class="cg1"&gt;(&lt;/SPAN&gt;&lt;SPAN class="cg4"&gt;'emc_vars.json'&lt;/SPAN&gt;&lt;SPAN class="cg1"&gt;))
&lt;/SPAN&gt;&lt;SPAN class="cg2"&gt;##########################################################
&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;BR /&gt;And I use the attached bogus classes which simply read the emc_vars or CLI command output directly from a json file I edit.</description>
      <pubDate>Fri, 07 Jan 2022 11:35:00 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/scripting/running-xmc-workflow-scripts-in-pc-for-testing/m-p/19432#M80</guid>
      <dc:creator>Ludovico_Steven</dc:creator>
      <dc:date>2022-01-07T11:35:00Z</dc:date>
    </item>
    <item>
      <title>RE: Running XMC workflow scripts in pc for testing</title>
      <link>https://community.extremenetworks.com/t5/scripting/running-xmc-workflow-scripts-in-pc-for-testing/m-p/19433#M81</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;The file is password protected.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;José Chaves</description>
      <pubDate>Fri, 07 Jan 2022 13:04:00 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/scripting/running-xmc-workflow-scripts-in-pc-for-testing/m-p/19433#M81</guid>
      <dc:creator>Jose_Chaves</dc:creator>
      <dc:date>2022-01-07T13:04:00Z</dc:date>
    </item>
    <item>
      <title>RE: Running XMC workflow scripts in pc for testing</title>
      <link>https://community.extremenetworks.com/t5/scripting/running-xmc-workflow-scripts-in-pc-for-testing/m-p/19434#M82</link>
      <description>Password is "emc"&lt;BR /&gt;Need to set that when emailing it, else it gets clobbered by email virus checking!</description>
      <pubDate>Fri, 07 Jan 2022 13:12:00 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/scripting/running-xmc-workflow-scripts-in-pc-for-testing/m-p/19434#M82</guid>
      <dc:creator>Ludovico_Steven</dc:creator>
      <dc:date>2022-01-07T13:12:00Z</dc:date>
    </item>
    <item>
      <title>RE: Running XMC workflow scripts in pc for testing</title>
      <link>https://community.extremenetworks.com/t5/scripting/running-xmc-workflow-scripts-in-pc-for-testing/m-p/19435#M83</link>
      <description>&lt;P&gt;Thanks, Ludovico&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That is exactly what I was looking for.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;José Chaves&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jan 2022 14:25:00 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/scripting/running-xmc-workflow-scripts-in-pc-for-testing/m-p/19435#M83</guid>
      <dc:creator>Jose_Chaves</dc:creator>
      <dc:date>2022-01-07T14:25:00Z</dc:date>
    </item>
  </channel>
</rss>

