cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1109
Views
5
Helpful
3
Replies

How to cast types between UCSD tasks?

scottw80
Level 1
Level 1

Hi,

I'm struggling on what I assumed would be an easy workflow and was hoping someone could give some direction?

 

I'm trying to make a workflow to create a Vmware VM DRS Group and then create a DRS rule for that new VM Group.

I'm trying to use the existing Vmware Host tasks to achieve this. The Create DRS Group works fine, taking in the VM Group as one of the inputs as a gen_text_input type. 

I'm then trying to add a Create DRS Rule task to the workflow, expecting to use the same input or an output value from the previous task for the VM Group. However, the GUI won't allow me to do this as the VM Group within the Create DRS Rule is of a vmwareDRSVMgroupselector type rather than gen_text_input. I can't find a way though the options to cast between these types to pass the input through.

How would this usually be achieved within UCSD? (If possible?). Would it require a custom task to cast the input type and output it in the new type?

Are there any examples available for This?

Many thanks.

1 Accepted Solution

Accepted Solutions

John Weigand
Level 1
Level 1

It's definitely a little frustrating that there's no built in way to do this, but you can accomplish it by creating a very simple Custom Workflow Task.

 

Go to Orchestration > Custom Workflow Tasks, and create a new custom task (including name, label and category). On the Inputs, create an input named "a" of whatever type you're getting as an output from the prior task (sounds like gen_text_input). Then on the Outputs, create an output named "b" of whatever input type your next task needs (vmwareDRSVMgroupselector). Skip past the controller page, then get to the script page. In the script box, enter "input.a = output.b", then save the task, and call it in your workflow, in between the two tasks.

View solution in original post

3 Replies 3

John Weigand
Level 1
Level 1

It's definitely a little frustrating that there's no built in way to do this, but you can accomplish it by creating a very simple Custom Workflow Task.

 

Go to Orchestration > Custom Workflow Tasks, and create a new custom task (including name, label and category). On the Inputs, create an input named "a" of whatever type you're getting as an output from the prior task (sounds like gen_text_input). Then on the Outputs, create an output named "b" of whatever input type your next task needs (vmwareDRSVMgroupselector). Skip past the controller page, then get to the script page. In the script box, enter "input.a = output.b", then save the task, and call it in your workflow, in between the two tasks.

Thank you for this response. It's very helpful and much appreciated.

It certainly looks to be the cleanest option if you can't directly map between types.

Glad it helped! 

 

There's a been a bug report out there for a while (https://bst.cloudapps.cisco.com/bugsearch/bug/CSCvb75348) so hopefully we eventually get an "official" way to do this in the future.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Cisco UCS X-Series Energy Efficiency Offer