Orchestrator Function: AVI Pool Group Create

by Simon Sparks · 11 March 2026

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

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

Filename: PluginAVIService.ts

Description: Orchestrator Function to Create an AVI Pool Group.

Private Function: AviPoolGroupCreate

publicAviPoolGroupCreate(objAviWorkflowRuntime:AviWorkflowRuntime,strAviCloud:string="Default-Cloud",strTenant:string="admin",strAviIpAddrType:"V4"|"V6",strPoolGroupUUID:string,strPoolUUID:string,strAlgorithm:string,strLogicalRouterTier1:string,intPort:number,intRatio:number=5,strHealthMonitorName:string,arrServiceIpAddressFirst:string[],arrServiceIpAddressSecond:string[],strPoolGroupName:string):AviWorkflowRuntime{

letobjAviVroClient:AviVroClient=objAviWorkflowRuntime.getAviVroClient();

letstrPoolNameFirst:string=strPoolGroupName+"_Pool1";
letstrPoolNameSecond:string=strPoolGroupName+"_Pool2";

letobjAviPoolFirst:AviPool=this.AviPoolBuild(strPoolNameFirst,strPoolUUID,strLogicalRouterTier1,strAlgorithm,arrServiceIpAddressFirst,intPort,intRatio,strAviIpAddrType,strHealthMonitorName,strAviCloud,strTenant);

objAviVroClient.addObject(objAviPoolFirst,objAviWorkflowRuntime.getWorkflowId(),strTenant);

letobjAviPoolSecond:AviPool=this.AviPoolBuild(strPoolNameSecond,strPoolUUID,strLogicalRouterTier1,strAlgorithm,arrServiceIpAddressSecond,intPort,intRatio,strAviIpAddrType,strHealthMonitorName,strAviCloud,strTenant);

objAviVroClient.addObject(objAviPoolSecond,objAviWorkflowRuntime.getWorkflowId(),strTenant);

letobjAviPoolGroupMemberFirst:AviPoolGroupMember=newAviPoolGroupMember();
objAviPoolGroupMemberFirst.setPoolRef("/api/pool?name="+strPoolNameFirst);

letobjAviPoolGroupMemberSecond:AviPoolGroupMember=newAviPoolGroupMember();
objAviPoolGroupMemberSecond.setPoolRef("/api/pool?name="+strPoolNameSecond);

letarrAviPoolGroupMember:AviPoolGroupMember[]= [];
arrAviPoolGroupMember.push(objAviPoolGroupMemberFirst);
arrAviPoolGroupMember.push(objAviPoolGroupMemberSecond);

letobjAviPoolGroup:AviPoolGroup=this.AviPoolGroupBuild(strPoolGroupName,strPoolGroupUUID,arrAviPoolGroupMember,strAviCloud,strTenant);

objAviVroClient.addObject(objAviPoolGroup,objAviWorkflowRuntime.getWorkflowId(),strTenant);

returnobjAviWorkflowRuntime;
}

Discover more from Cloud Build Tools

Subscribe to get the latest posts sent to your email.

You may also like