<?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: Workflows CLI Activity: how to assign device per activity? in ExtremeCloud IQ- Site Engine Management Center</title>
    <link>https://community.extremenetworks.com/t5/extremecloud-iq-site-engine/workflows-cli-activity-how-to-assign-device-per-activity/m-p/99902#M10131</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;don't overcomplicate this. Use an if-then expression to check the IP and apply the commands depending on the IP address.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Markus_Nikulski_0-1712151000162.png" style="width: 400px;"&gt;&lt;img src="https://community.extremenetworks.com/t5/image/serverpage/image-id/7065i4C34DF538F089A9A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Markus_Nikulski_0-1712151000162.png" alt="Markus_Nikulski_0-1712151000162.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 03 Apr 2024 13:30:08 GMT</pubDate>
    <dc:creator>Markus_Nikulski</dc:creator>
    <dc:date>2024-04-03T13:30:08Z</dc:date>
    <item>
      <title>Workflows CLI Activity: how to assign device per activity?</title>
      <link>https://community.extremenetworks.com/t5/extremecloud-iq-site-engine/workflows-cli-activity-how-to-assign-device-per-activity/m-p/99896#M10128</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;i want to automate a certain provisioning process with Workflow feature. The process requires to set several different CLI commands on some of our devices.&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;on device 1: CLI commands A and&amp;nbsp;&amp;nbsp;on device 2: CLI commands B&lt;/P&gt;&lt;P&gt;The devices which I want to use in the workflow are static, they are always the same eight devices from our inventory. But I need to run different commands on them.&lt;/P&gt;&lt;P&gt;I figured out to create a workflow with several CLI activities (one CLI activity per device). How can I pre-assign a CLI Activity to a certain device? I tried to set the device variable per activity (deleted the workflow device variable, and created new device variable in each activity).&amp;nbsp;I tried to enter Device Name of the switch and i tried to use the IP-Adress in this variable but I always get the "select device dialogue" when I start the workflow.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Apr 2024 09:25:06 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremecloud-iq-site-engine/workflows-cli-activity-how-to-assign-device-per-activity/m-p/99896#M10128</guid>
      <dc:creator>htw</dc:creator>
      <dc:date>2024-04-03T09:25:06Z</dc:date>
    </item>
    <item>
      <title>Re: Workflows CLI Activity: how to assign device per activity?</title>
      <link>https://community.extremenetworks.com/t5/extremecloud-iq-site-engine/workflows-cli-activity-how-to-assign-device-per-activity/m-p/99902#M10131</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;don't overcomplicate this. Use an if-then expression to check the IP and apply the commands depending on the IP address.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Markus_Nikulski_0-1712151000162.png" style="width: 400px;"&gt;&lt;img src="https://community.extremenetworks.com/t5/image/serverpage/image-id/7065i4C34DF538F089A9A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Markus_Nikulski_0-1712151000162.png" alt="Markus_Nikulski_0-1712151000162.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Apr 2024 13:30:08 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremecloud-iq-site-engine/workflows-cli-activity-how-to-assign-device-per-activity/m-p/99902#M10131</guid>
      <dc:creator>Markus_Nikulski</dc:creator>
      <dc:date>2024-04-03T13:30:08Z</dc:date>
    </item>
    <item>
      <title>Re: Workflows CLI Activity: how to assign device per activity?</title>
      <link>https://community.extremenetworks.com/t5/extremecloud-iq-site-engine/workflows-cli-activity-how-to-assign-device-per-activity/m-p/99909#M10132</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi Markus,&lt;/P&gt;&lt;P&gt;using your code as Phyton script activity I managed to send two different commands to two different devices of a three device test group. How can I implement variables into the commands? ( I am not very familiar with phyton.)&lt;/P&gt;&lt;P&gt;In my test CLI activity example I had&amp;nbsp;"disable port ${mycustomport}" which uses a defined variable&amp;nbsp; "mycustomport" which is defined as a custom workflow input.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Apr 2024 15:20:34 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremecloud-iq-site-engine/workflows-cli-activity-how-to-assign-device-per-activity/m-p/99909#M10132</guid>
      <dc:creator>htw</dc:creator>
      <dc:date>2024-04-03T15:20:34Z</dc:date>
    </item>
    <item>
      <title>Re: Workflows CLI Activity: how to assign device per activity?</title>
      <link>https://community.extremenetworks.com/t5/extremecloud-iq-site-engine/workflows-cli-activity-how-to-assign-device-per-activity/m-p/99913#M10134</link>
      <description>&lt;P&gt;After looking for some phyton variable basics and some example workflows from github i tried adding the workflow variable in main:&lt;/P&gt;&lt;P&gt;def main():&lt;BR /&gt;mycustomport = emc_vars["mycustomport"]&lt;/P&gt;&lt;P&gt;and then using it with cmds.append f.e.:&lt;/P&gt;&lt;P&gt;elif emc_vars['deviceIP'] == "192.168.100.200":&lt;BR /&gt;cmds.append('enable port '+mycustomport)&lt;/P&gt;&lt;P&gt;This seem to work.&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Apr 2024 17:38:13 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremecloud-iq-site-engine/workflows-cli-activity-how-to-assign-device-per-activity/m-p/99913#M10134</guid>
      <dc:creator>htw</dc:creator>
      <dc:date>2024-04-03T17:38:13Z</dc:date>
    </item>
    <item>
      <title>Re: Workflows CLI Activity: how to assign device per activity?</title>
      <link>https://community.extremenetworks.com/t5/extremecloud-iq-site-engine/workflows-cli-activity-how-to-assign-device-per-activity/m-p/99919#M10136</link>
      <description>&lt;P&gt;I cannot educate you about Python. Please use youtube / search engines / whatever.&lt;BR /&gt;If you are in Python using our Workflows you have a dictionary providing you access to the Workflow-wide variables.&lt;/P&gt;&lt;P&gt;Using placeholders (%s) to define the poison where the injecting should be. You can use ore than one variable. Here a example just with one:&lt;BR /&gt;&lt;STRONG&gt;cmds.append("show interface gigaeth %s" % emc_vars['&lt;EM&gt;mycustomport&lt;/EM&gt;'])&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Apr 2024 12:38:50 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremecloud-iq-site-engine/workflows-cli-activity-how-to-assign-device-per-activity/m-p/99919#M10136</guid>
      <dc:creator>Markus_Nikulski</dc:creator>
      <dc:date>2024-04-04T12:38:50Z</dc:date>
    </item>
  </channel>
</rss>

