Quantcast
Channel: VMware Communities : Discussion List - vRealize Orchestrator
Viewing all articles
Browse latest Browse all 6251

Utilizing composite types and foreach element/loop in workflow to return multidimensional array.

$
0
0

Greetings,

 

I have a couple of workflows I have created:

 

1) That returns a status of a VM where status consist of:

  • Host name and ID
  • Power State
  • ConnectState
  • ResourcePool
  • GuestIPAddress
  • cpuCount
  • memoryMB
  • Networks
  • computeResource

 

in the form of an array/string and

 

2) Which returns all vmnames in a folder in an array/strings format.

 

I have written code to utilize the two workflows separately, and it runs in about 7 seconds against a handful of VMs in 1 folder. I figured it would probably be a little quicker to execute a single workflow all at once.  I messed around with creating a composite type and using a foreach loop but I was not able to figure out either. Ive also looked at the batch workflow in order to make this happen. In the end I need to returned a stringified multidimensional array in the following format:

 

vmname1, on, connected, pool, 192.168.1.7, 8, 4096, blah, blah

vmname2, on, connected, pool, 192.168.1.7, 11 4096, blah, blah

....

 

Any thoughts or advice?

 

Thanks,


Viewing all articles
Browse latest Browse all 6251

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>