|Task Name||Converting Variables in UCSD|
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.
- Click "Submit".
- A new folder should appear in "Policies-->Orchestration" that contains the imported workflow. You will now need to update the included tasks with information about the specific environment.
This examples shows ho to convert a generic Text to a VLAN ID variable.
The custom task:
The Generic Input Text:
The VLAN ID output varaible:
The Script in the Custom Task:
var a1 = input.A;
logger.addInfo("a1 ; " + a1);
output.A_Prime = a1;
The use of the Custom task:
The input is generic text:
Now using a task that has a VLAN ID as input the output of the custom task does show up:
The actual content of the variable may be another problem…
So for example …
If variable A has a content of A@B@C@D
But variable B expects some format like D@B@A
Then you would have to massage the input (A) to be of the expected format for variable (B).
Tthere are usually two parts to this…
1) Variable type
2) Content of the variable..
As to 1)
As to 2)
#123 (building of the vSwitch name buried in the code)