Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
‎11-08-2018 08:44 PM
Hello,
how can I pass an IP of a switch to the script within a script or a workflow to access this IP via CLI / Python and send CLI commands to this IP?
Attention, this is not about the selection of the switch when starting a script or workflow, but a switch IP that is defined at runtime!
Example: You start the workflow for a switch (selected while hit run for the workflow) and then determine within the workflow that you have to configure another switch. In this case, a CLI command must be issued to this switch "new/additional" switch.
How can I achieve this?
Regards
Stephan
how can I pass an IP of a switch to the script within a script or a workflow to access this IP via CLI / Python and send CLI commands to this IP?
Attention, this is not about the selection of the switch when starting a script or workflow, but a switch IP that is defined at runtime!
Example: You start the workflow for a switch (selected while hit run for the workflow) and then determine within the workflow that you have to configure another switch. In this case, a CLI command must be issued to this switch "new/additional" switch.
How can I achieve this?
Regards
Stephan
Regards
Stephan
Solved! Go to Solution.
1 ACCEPTED SOLUTION
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
‎11-11-2018 09:30 PM
Hello,
I received a solution to my problem. Many thanks to Markus from Extreme, he has send me the solution.
Here is an example form an Python program as part of an workflow:
#Set the focus to the new switch with IP 1.1.1.1
cli_result = emc_cli.setIpAddress("1.1.1.1")
#Continue as always. All commands will use the new switch
res = emc_cli.send("create vlan XXX").getOutput()Regards
Stephan
I received a solution to my problem. Many thanks to Markus from Extreme, he has send me the solution.
Here is an example form an Python program as part of an workflow:
#Set the focus to the new switch with IP 1.1.1.1
cli_result = emc_cli.setIpAddress("1.1.1.1")
#Continue as always. All commands will use the new switch
res = emc_cli.send("create vlan XXX").getOutput()Regards
Stephan
Regards
Stephan
3 REPLIES 3
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
‎11-11-2018 09:30 PM
Hello,
I received a solution to my problem. Many thanks to Markus from Extreme, he has send me the solution.
Here is an example form an Python program as part of an workflow:
#Set the focus to the new switch with IP 1.1.1.1
cli_result = emc_cli.setIpAddress("1.1.1.1")
#Continue as always. All commands will use the new switch
res = emc_cli.send("create vlan XXX").getOutput()Regards
Stephan
I received a solution to my problem. Many thanks to Markus from Extreme, he has send me the solution.
Here is an example form an Python program as part of an workflow:
#Set the focus to the new switch with IP 1.1.1.1
cli_result = emc_cli.setIpAddress("1.1.1.1")
#Continue as always. All commands will use the new switch
res = emc_cli.send("create vlan XXX").getOutput()Regards
Stephan
Regards
Stephan
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
‎11-09-2018 06:00 AM
Hello John,
thank you for the explanation.
But I do not want to enter the IP address of the switch in a window that opens, but pass it as a variable (because its an automatic process without user interaction).
Unfortunately, I did not write that clearly in the previous post.
Example: A script opens a text file searches for the appropriate IP of the switch to be configured (write this IP into a variable), and the subsequent CLI commands are then executed on this switch.
For the sake of completeness, all the devices I want to communicate with are managed by the XMC.
Regards
Stephan
thank you for the explanation.
But I do not want to enter the IP address of the switch in a window that opens, but pass it as a variable (because its an automatic process without user interaction).
Unfortunately, I did not write that clearly in the previous post.
Example: A script opens a text file searches for the appropriate IP of the switch to be configured (write this IP into a variable), and the subsequent CLI commands are then executed on this switch.
For the sake of completeness, all the devices I want to communicate with are managed by the XMC.
Regards
Stephan
Regards
Stephan
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
‎11-08-2018 09:00 PM
Hi Stephan,
You can accomplish this via the Manage Inputs window.
To access it, select the activity you are configuring to have a user-defined IP (I'm assuming it's a script task) and select the Input tab in the Details section of the window (the right side of the Workflows tab). The Config button is located at the top of that tab. Click it to open the Manage Inputs window.
Create a new input, select devices as the Variable Reference, and then select the Prompt User checkbox. When the workflow is running and it reaches that activity, it will pause and open a window that asks you for the device on which you want to run the workflow.
For more information, see https://emc.extremenetworks.com/content/oneview/docs/tasks/docs/c_workflows.html?Highlight=workflow#...
Thanks!
John
You can accomplish this via the Manage Inputs window.
To access it, select the activity you are configuring to have a user-defined IP (I'm assuming it's a script task) and select the Input tab in the Details section of the window (the right side of the Workflows tab). The Config button is located at the top of that tab. Click it to open the Manage Inputs window.
Create a new input, select devices as the Variable Reference, and then select the Prompt User checkbox. When the workflow is running and it reaches that activity, it will pause and open a window that asks you for the device on which you want to run the workflow.
For more information, see https://emc.extremenetworks.com/content/oneview/docs/tasks/docs/c_workflows.html?Highlight=workflow#...
Thanks!
John
