Attached to this post is a UCSDirector Export that contains a the Custom Task Sample and an Example Workflow using it, and the related Python Script file that is being called by the Task. The Python file doesn't do anything terribly interesting, but the framework is there to enable you to run whatever you need in Python and send relevant details back to UCS Director. I'm also attaching the sample CloupiaScript text for reference as well.
Though I'll be using this primarily with Python, there is nothing that would prevent this same framework from working with any other scripting language. All that is needed is a script that can be called leveraging command line parameters that can print out JSON text. So feel free to leverage this with bash, perl, python, go, or any other language you might want to work in.
Also, you could use the UCS Director appliance itself to run the script files from, rather than need a separate host. I opted to not do this for now because the python versions shipping on the UCSD appliance are a bit older and I like to stick with at least 2.7.x.
Walkthrough of the example!
Executing the UCS Director Workflow
The Workflow Task User Inputs Screen
The Workflow Task Admin Inputs Screen
The Credential Policy for the Python Host
The Service Request Log showing the script running and returned data
The CloupiaScript for the Sample Task
The Python Script being Executed
EZ Cloud New vDC Utilities
Set of Custom Tasks to create new vDC, Policies, and Manipulate Categories
Built and Tested with UCSD 184.108.40.206
Workflow and Tasks
Instructions for Regular Workflow Use:
Download the attached .ZIP file below to your computer. *Remember the location of the saved file on your computer.
Unzip the file on your computer. Should end up with a .WFD file.
Log in to UCS Director as a user that has "system-admin" privileges.
Navigate to "Policies-->Orchestration" and click on "Import".
Click "Browse" and navigate to the location on your computer where the .WFD file resides. Choose the .WFD file and click "Open".
Click "Upload" and then "OK" once the file upload is completed. Then click "Next".
Click the "Select" button next to "Import Workflows". Click the "Check All" button to check all checkboxes and then the "Select" button.
2016-02-05 Sample UCSD Custom Task for Python Script.wfdx.zip
Dear Experts,I understand how to pass an Output of one Task to another but i have following Scenario. Assume there are total 3 Tasks. 1st Task check existance of an object and if it exist then get the object id as a Output of this Task. 2nd Task is execut...
I need to get a list of Orgs in a newly added UCSM Account, after it has been added, to populate an output variable to be used in the next workflow task. I have been looking through the API for hours with no luck. EditI have found that the old contro...
Hola a todos, solicite su ayuda, si alguien tiene conocimiento en como puedo implementar dentro del simulador de UCS un servidor físico y así mismo generar la conexión con los dos interruptores, ya que es mi primera vez manejando esta consola y...
Hello *, for our Server Teams I have to provide the information how the network configuration for the server (connected to cisco aci fabric) looks like.My first idea was at first to create an workflow to collect the information from the fabric ...
Hi, I am looking for a function, that takes a Service Request ID as input and returns the error messages from this (failed) workflow. I found this Workflow, which is almost as I needed: https://community.cisco.com/t5/ucs-director-documents/...