AnsweredAssumed Answered

Workflow question: How to access VMware properties in If Else clause?

Question asked by Ben Conrad on Jan 13, 2015
Latest reply on Feb 9, 2015 by adam.ringenberg



I'm doing a demo of UCSD and wanted to jump right into the workflow setup.  I'm able to create a simple workflow using the built in tasks.


I normally write all my orchestration using Powershell and have the advantage of error checking and many logic clauses (like if-else, foreach, try{} catch{}, hashes, custom objects, etc).


In the workflow below I get a failure if the VM in question is turned off.  Naturally I don't want to have a special workflow just for VMs that are turned off so what I'd want to do is use an If Else task in this workflow.  Pseudo code would be:


$vm_selector = input from user form  # Input type = 'VM Selector'

$memory_size_selector  = input from user form # Input type = 'memory size selector'


if ($vm_selector.powerstate -eq 'poweredOn') {


} else {

  "vm already powered off, proceed to next step"




How to get access to the vmware specific methods and properties that are exposed in $vm_selector.


I've looked at the Cisco UCS Director Cloupia Script Configuration Guide and I see a note that says "browser-based objects are not supported because the Cloupia script contains a server-side scripting"


Maybe I should be looking at Custom Workflow Inputs?  I see I can pick input type 'vm' and then filter with Power Status EQUALS ON but I don't see where I can use that in the workflow.




2015-01-13 09_34_07-Cisco UCS Director.png