Create a Custom Button in UCS Director

Create a Custom Button in UCS Director

July 27, 2015 3 By Eric Shanks

Cisco UCS Director gives us some great automation and orchestration capabilities in the product. One thing I’ve noticed though is the need to customize the actions that can performed on virtual machines after deployment (Sometimes called Day 2 Operations). This post explains how to make some custom buttons for end users to manage their workloads more effectively.

Create Workflow

Creating a workflow is out of the scope of this post, but we need to have a workflow to use for our examples. I’ve created a very simple workflow to create a VM Snapshot and email the user when it happens. To create your own workflow Go to Policies –> Orchestration –> Workflows to get started.

 

UCSD-UserAction-Workflow1

Remove Default Buttons

There is a specific set of default buttons that are available out of the box. We can enable or disable these buttons in the “End User Policy.”

Go to Policies –> Virtual/Hypervisor Policies –> Service Delivery –> End User Self-Service Policy. Select or unselect the actions you need. In this case I’ve removed them to clean up the GUI.

 

UCSD-UserAction-EndUserPolicy

Create Custom User Action

Now we’re going to create the button. To do this we create a User Action Policy.

Go to Policies –> Orchestration –> User VM Action Policy and create a new policy. Give the policy a name and select the number of actions that will be part of the policy. A single policy can have multiple actions (or buttons) associate with it. In this case I’ve only picked one action.

UCSD-UserAction1

Under the VM Actions, give it a name. The name will be the name of the button that is displayed to the end user. Select the workflow we created earlier.

UCSD-UserAction2 UCSD-UserAction3

 

 

Modify VDC

Now we modify our VDC to include the new User Action Policy.

Go to Policies –> Virtual/HyperVisor Policies –> Virtual Data Centers

UCSD-UserAction-vdc1

User Catalog

Once all of the configuration settings have been done we can login to the UCS Director Portal as an end user. Select a VM that we’ve provisioned and our new button should show up. Notice that there is a “*” next to the button to show that its a custom button. If you’re wondering where the icon comes from well that is a bit of a mystery. Depending on the name you use, the button will look differently. If the name has “Add” in it then the icon is a plus sign, if it’s got “Delete” in it there is a red X for an icon.

 

UCSD-UserAction-Catalog1