vRO Workflow to Get a DV Portgroup By Name

By | 9 November 2015

I recently needed a vRO workflow to get a distributed port group object to perform some work on. I had access to the name of the port group but I couldn’t find a workflow that would allow me to get the port group object by a name without manual intervention. I was writing an automated process so I needed the lookup to run without intervention.

What I wrote does the following:
1) Looks up the portgtoup on a name passed as a string and a DV Switch object.
2) Returns a DV Portgroup as a VC:DistributedVirtualPortgroup object.
3) Errors out if a port group is not found.

vRO Workflow Schema:
WorkflowSchema

Workflow Input and Output:
WorkflowInputOutput

vRO Script Contents:
ScriptContents

Script Visual Binding:
ScriptBinding

Using this workflow, you can easily get a port group from a distributed virtual switch. You can download the workflow here. As always, this post is my own and not endorsed or supported by VMware.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.