VMware Cloud Community
BillStreet00
Enthusiast
Enthusiast
Jump to solution

Add Disk OOTB WF

I need to add an additional disk to a request based on criteria.  I have been trying to use the OOTB WF, Add Disk.  I figured this would be fairly straight forward but I am running into some issues.  It requires an object called datastore (VC:datastore) and diskMode (VC:VirtualDiskMode).  I was able to get the datastore from the VM object but I am having a hard time finding the VirtualDiskMode object.  Does anyone know of a good way to set the value to persistent and convert it to the VC:VirtualDiskMode type?

Thanks

0 Kudos
1 Solution

Accepted Solutions
iiliev
VMware Employee
VMware Employee
Jump to solution

VirtualDiskMode is an enumeration.

Is your question about how to get the enumeration value for persistent via Javascript code? If yes, either one of the following snippets should work:

var mode = VcVirtualDiskMode.persistent;

System.log("disk mode: " + mode);

var mode = VcVirtualDiskMode.fromString("persistent");

System.log("disk mode: " + mode);

View solution in original post

0 Kudos
2 Replies
iiliev
VMware Employee
VMware Employee
Jump to solution

VirtualDiskMode is an enumeration.

Is your question about how to get the enumeration value for persistent via Javascript code? If yes, either one of the following snippets should work:

var mode = VcVirtualDiskMode.persistent;

System.log("disk mode: " + mode);

var mode = VcVirtualDiskMode.fromString("persistent");

System.log("disk mode: " + mode);

0 Kudos
BillStreet00
Enthusiast
Enthusiast
Jump to solution

Thanks!

0 Kudos