vRO Classes

Storage Class

Create a new Instance

Methods

addSCSIAdapter

Creates a device config spec to add a SCSI adapter to a Virtual Machine

use: storage.addSCSIAdapter(type, counter)

String type allowed values SAS, LSI, PARA

Number counter

return Number counter

example:

addDisk

Creates a device config spec to add a Disk to a Virtual Machine

use: storage.addDisk(sizeInGB, controllerKey, diskIndex, diskMode, thinProvisioned, counter)

String sizeInGB

String controllerKey e.g. 0 (scsi 0)

String DiskIndex e.g. 0 (disk Index)

String diskMode

boolean thinProvisioned

number counter#

return Number counter

Example:

Network Class

Create a new Instance

Methods

addNetwork

Creates a device config spec to add aNetwork to a Virtual Machine

use: ii = net.addNetwork(networks[network],null, „vmxnet3“, ii)

vC:Network network

String macAddress  if null autoted generated

String netType (pcnet32, e1000, e1000e, vmxnet2, vmxnet3, sriov)

Number counter

return Number counter

Example:

addDVSNetwork

Creates a device config spec to add a DVS Network to a Virtual Machine

use: ii = net.addNetwork(networks[network],null, „vmxnet3“, ii)

vC:DistributedVirtualPortgroup network

String macAddress  if null autoted generated

String netType (pcnet32, e1000, e1000e, vmxnet2, vmxnet3, sriov)

Number counter

return Number counter

Example:

 

Helper Class

Create a new Instance

Methods

addItemIfNotExists

Add a item to an existing array if it not exists in the provided array

use: scsiNumbers = helper.addItemIfNotExists(diskProps[p].get(„scsiid“).split(„:“)[0], scsiNumbers);

String Item

Array Array/String

return Array/String

Example:

Output: [2018-02-22 10:28:39.678] [I] 1,2,3,4

sqlToJsDate

Converts a MSSQL date into a Javascript Date

SQLDate sqlDate

return Date

Example:

Output:

[2018-02-22 10:24:47.590] [I] Thu Jan 26 2023 09:22:03 GMT+0100 (CET)

 

         

hferch has written 76 articles

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">