UCSD Custom SSH Task (Rollback)

Version 4
    Task Name

     

    Custom SSH

    Description

    Custom SSH

    Prerequisites
    CategoryWorkflow
    ComponentsvSphere 5.x
    User Inputs
    Output

    Instructions for Regular Workflow Use:

    1. Download the attached .ZIP file below to your computer. *Remember the location of the saved file on your computer.
    2. Unzip the file on your computer. Should end up with a .WFD file.
    3. Log in to UCS Director as a user that has "system-admin" privileges.
    4. Navigate to "Policies-->Orchestration" and click on "Import".
    5. Click "Browse" and navigate to the location on your computer where the .WFDX file resides. Choose the .WFDX file and click "Open".
    6. Click "Upload" and then "OK" once the file upload is completed. Then click "Next".
    7. Click the "Select" button next to "Import Workflows". Click the "Check All" button to check all checkboxes and then the "Select" button.
    8. Click "Submit".
    9. 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.

     

    Example of a Rollback function:

     

     

    Use the following code filling in the appropriate param names for your task/environment. This should be a function that is placed and called at the end of your provisioning or create custom task…and then of course you have to have created the undo custom task as well…

     

    You may or may not have 3 params….you can remove any you don’t need…

     

    <CODE>

     

     

    //-------Register Rollback------->>

     

    function registerUndoTask(<param0>, <param1>, <param2>) {

    var undoHandler = “<rollback_custom_task_name>”; //might be something like “custom_rollback_my_task"

    var undoContext = ctxt.createInnerTaskContext(undoHandler);

    undoConfig = undoContext.getConfigObject();

    undoConfig.<param0> = <param0>;

    undoConfig.<param1> = <param1>; //These are the params or inputs that are required for the rollback task to complete

    undoConfig.<param2> = <param2>;

    ctxt.getChangeTracker().undoableResourceModified("Rollback <provisioning task name>", "rollback", "Rollback <provisioning task name> ", "rollback", undoHandler,undoConfig);

    }

    registerUndoTask(<param0>,<param1>,<param2>);

     

    </CODE>

     

    Hope that helps…