vRO Return Datastores over a specified TB size

This code will return only the datastores over a specified Terabyte size.

Set two input parameters

inputTB as type number, this will be the TB size that will determine the Datastores to return.

set another input parameter as inDS as array type VC:Datastore

Set the output parameter as outDS as array type VC:Datastore


var tbSize = inputTB * 1073741824;

System.log("Variable tbSize is "+tbSize);

var ds = new Array();

for each (d in inDS){ if (d.summary.capacity >= tbSize){ ds.push(d);} System.log("name: " + d.name +" Size: "+ d.summary.capacity);}

outDS = ds;

2 thoughts on “vRO Return Datastores over a specified TB size

  1. Could you please help me how to give custom hostnames which are precreated in infoblox while submitting a catalog request for multiple instances from a single blueprint.

    For ex: I have created host records for 3 machines, windows1, windows5, Windows29. I want to give these hostnames with pre-allocated IP addresses while rasing the machine provisioning request, when I select 3 instances, however, I can see only one form to give first hostname, I do not see any input option for other hostnames, i e windows5 and windows29. Please let me know if there is a way to fulfill my requirement.

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s