UCS Director Dynamic List of Values
August 10, 2015When you execute a Cisco UCS Director workflow you’re usually prompted to enter in some information. Usually this is something like a virtual machine name, or an IP Address, even some credentials possibly. The values that you enter can be formatted so that they come from a list and the user just has to select the right value. This helps immensely in the amount of troubleshooting you have to do because only specific verified values can be displayed.
So what happens when you have a list of values (LOV) that is dependent upon another selection? To do this in UCS Director we rely on the filter criteria. Lets assume that I’ve got a workflow that wants to get a food order from a popular fast food chain. Depending on which fast food restaurant is selected, the menu items are different. For instance, only McDonalds has a Big Mac.
Go to Policies –> Orchestration –> Custom Workflow Inputs tab and create a custom workflow input. In the example below I’ve created a list of three popular fast food chains.
Now we create a second list of values for food items. In the example below, I’ve created fast food items that might exist in each of the fast food chains, but notice the label has the name of the chain in it. This is an important step. The label must contain the name of the referenced item from above and it must be spelled the same way!
Now we create a workflow. Go to Policies –> Orchestration –> Workflows and add a new workflow. In the User Inputs section of the workflow, add the two List of Values you’ve created earlier. I added both the Restaurant and the FoodItem Lists I created earlier.
On the second list of values, enter an “Admin Input Criteria.” This criteria should look like “CONTAINS ${InputlabelofList1}.” The filter criteria I used was “CONTAINS ${Restaurant}.” This means that the FoodItem must contain the same value as the Restaurant item selected earlier.
To demonstrate this, I can execute the workflow. If I select the Restaurant “In-N-Out” the only food items that I’m able to select also have “In-N-Out” in the title.
Conversely, if I select “McDonalds” as the Restaurant, I am only able to pick the “McDonalds” food items.
There are plenty of other cool things to do with UCS Director and some publicly available workflows that you can download right from the Cisco Communities site. Please take a look at this site if you’re looking for examples or pre-build workflows for your environment. A big thanks to Orf Gelbrich for his time and efforts with the site.