To use this function add it to the class library file named vRealizeAutomation.ts
GitHub Repository: https://github.com/SimonSparksUK/Orchestrator
Filename: vRealizeAutomation.ts
Function registerVCACVirtualMachine
Description: The following code Registers a VCAC Virtual Machine.
publicregisterVCACVirtualMachine (strOwner:string,objVCACEntityHostReservationToStorage:VCACEntity,objVCACEntityVirtualMachine:VCACEntity,objVCACEntitySystemBlueprint:VCACEntity,objVCACEntityHostReservation:VCACEntity,objVCACVirtualMachine:vCACVirtualMachine):void
{
letstrTemplateID:string=objVCACEntitySystemBlueprint.getProperty("VirtualMachineTemplateID");
letstrHostReservationID:string=objVCACEntityHostReservation.getProperty("HostReservationID");
letstrHostStorageReservationID:string=objVCACEntityHostReservationToStorage.getProperty("HostReservationToStorageID");
System.log("===== Template ID '"+strTemplateID+"'.");
System.log("===== Host Reservation ID '"+strHostReservationID+"'.");
System.log("===== Host Storage Reservation ID '"+strHostStorageReservationID+"'.");
letobjPropertiesArguments:Properties=newProperties();
objPropertiesArguments.put("user",strOwner);
objPropertiesArguments.put("identityUser",strOwner);
objPropertiesArguments.put("templateId",strTemplateID);
objPropertiesArguments.put("hostReservationId",strHostReservationID);
objPropertiesArguments.put("hostStorageReservationId",strHostStorageReservationID);
objVCACVirtualMachine.registerVm(objPropertiesArguments,null);
}Discover more from Cloud Build Tools
Subscribe to get the latest posts sent to your email.
