Task Name | Create VDC and all of its policies Example |
Description | Create VDC and all of its policies Example |
Prerequisites | - Tested on 5.2.0.1 / Tested on 6.0.1
|
Category | Workflow tasks |
Components | Create VDC and all of its policies Example |
- 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 .wfdx file resides. Choose the .wfdx 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.
Thank you goes out to Niraj Kumar.
The workflow:
System policy is updated in new VDC:
Some of the interesting output:
Make sure the tasks are updated with your inputs (Or make global workflow variables out of these task variables and link them) :
On Rollback the System Policy is deleted:
Custom task to delete System Policy is included:
Rollback:
So I added roll back for the service Delivery policy… here is the code… (workflow and task are coming..) this is just a FYI how this works…
function registerUndoTask()
{
// register undo task
var undoHandler = "custom_Delete System Policy";
var undoContext = ctxt.createInnerTaskContext(undoHandler);
var undoConfig = undoContext.getConfigObject();
undoConfig.SystemPolicyName = syspoltmp;
logger.addInfo("Registering syspoltmp var: "+syspoltmp);
ctxt.getChangeTracker().undoableResourceModified("DeleteSystemPolicy-Commands-Undo",
"DeleteSystemPolicy "+ syspoltmp,
"DeleteSystemPolicy: "+ syspoltmp,
"DeleteSystemPolicy: "+ syspoltmp,
undoHandler,
undoConfig);
}
#1 custom_Delete System Policy
- this is actually a new task –
- you can register a task for roll back
#2 undoConfig.SystemPolicyName = syspoltmp
- this is where you register the exact variable names the task is using and its desired input at roll back time…
- in this case we want to delete the system policy with the name we gave it when it was created
Attached is the whole workflow and its components before they were tweaked to generate more output.