Orchestrator Function: Create a vCloud Event Log Entry

by Simon Sparks · 27 May 2014

To use this function add it to the class library file named vCloudService.ts

GitHub Repository: https://github.com/SimonSparksUK/Orchestrator

Filename: vCloudService.ts

Description: Orchestrator Function to Create a vCloud Event Log Entry

Function VclEventCreate

publicVclEventCreate(strErrorMessage:string,objVclUser:VclUser,objVclOrganization:VclOrganization):boolean{
try{
letobjVclEvent:VclEvent=newVclEvent();
objVclEvent.type="Task";
objVclEvent.typeFull=strErrorMessage;
objVclEvent.serviceNamespace="orchestrator.cloudbuildtools.com";
objVclEvent.success=true;
objVclEvent.owner=objVclUser.getReference();
objVclEvent.user=objVclUser.getReference();

letobjVclAdminOrganization:VclAdminOrganization=objVclOrganization.toAdminObject();

objVclAdminOrganization.createEvent(objVclEvent);

returntrue;
}
catch (objExeption){
returnfalse;
}
}

Discover more from Cloud Build Tools

Subscribe to get the latest posts sent to your email.

You may also like