Who Me Too'd this topic

About Data Infrastructure Management Software Discussions
Connect with peers about the NetApp OnCommand suite of storage management software, including OnCommand Unified Manager, OnCommand System Manager, OnCommand Insight, OnCommand Balance, and OnCommand Workflow Automation.

Working with Variables

I’m working on my first WFA development project and have ran into a hurdle I can’t seem to jump over. I ‘m looking for the way to take a location a user specifies and turn it into a local cluster name.  From there I’ll be selecting an aggregate to create a new volume in for a new VMware datastore.

I created the short bit of code below to translate datacenter location to the correct site cluster name as a couple sites have multiple cluster but only one for VMware.  My issue is feeding this newly assigned cluster name into the rest of the workflow so it uses the $ClusterName variable specified below throughout the workflow.  I’m not necessarily looking for a complete solution but rather the general way to make this work.

param (

[parameter(Mandatory=$false, HelpMessage="Datacenter Location")]



[parameter(Mandatory=$false, HelpMessage="Name of Cluster")]



if ($DCLocation = 'Valley Forge')

            {$ClusterName = 'Amazon'}

elseif ($DCLocation = 'Denver')

            {$ClusterName = 'Phoenix'}

elseif ($DCLocation = 'Ft. Worth')

            {$ClusterName = 'Griffin'}

Who Me Too'd this topic