I have a bit of a newbie question here, and I was wondering if someone can help clear it up for me. I noticed that there are two methods of updating a vRA property within vRO:
1. System.getModule("com.vmware.library.vcac").addUpdatePropertyFromVirtualMachineEntity(host,virtualMachineEntity,propertyName,propertyValue,propertyIsHidden,propertyIsRuntime,propertyIsEncrypted,doNotUpdate) and
2. VirtualMachineAddOrUpdateProperties = new Properties();
VirtualMachineAddOrUpdateProperties.put(propertyName, value);
What is the difference between the two? Is one better than the other? Is it an old vs new way of doing things? Which method should I get myself into the habit of using most?
Thank you,
The code in the second point does nothing - it just creates a new empty Properties object in memory and puts one entry in it. It doesn't update anything.
Thank you guys for replying this make sense. So I guess it's good habit to always use method 1 unless you are doing a quick one off update?
The reason I'm asking and trying to understand this a little bit more is I'm currently working on a deployment blueprint, and I have like 5 properties to edit during the provisioning process and a sixth one to create from scratch. The properties are mainly networking properties so network name, and IP address.
Thanks