Orchestrator Function: AVI Pool 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.

Private Function: AviPoolCreate

publicAviPoolCreate(objAviWorkflowRuntime:AviWorkflowRuntime,strAviCloud:string="Default-Cloud",strTenant:string="admin",strAlgorithm:string="LB_ALGORITHM_LEAST_CONNECTIONS",intPort:number,intRatio:number=1,intHTTPStatusCode:300|301|302|303|307|308,strLogicalRouterTier1:string,strFailActionURL:string,strStatusProtocol:string,strFailActionType:"FAIL_ACTION_CLOSE_CONN"|"FAIL_ACTION_HTTP_REDIRECT",strPoolName:string,arrServiceIpAddress:string[],strAviIpAddrType:"V4"|"V6",strPoolUUID:string,strHealthMonitorName:string):AviWorkflowRuntime{

letobjAviPool:AviPool=this.AviPoolBuild(strPoolName,strPoolUUID,strLogicalRouterTier1,strAlgorithm,arrServiceIpAddress,intPort,intRatio,strAviIpAddrType,strHealthMonitorName,strAviCloud,strTenant);

letobjAviFailAction:AviFailAction=newAviFailAction();
objAviFailAction.setType(strFailActionType);

if (strFailActionType==="FAIL_ACTION_HTTP_REDIRECT"){

letobjAviFailActionHTTPRedirect:AviFailActionHTTPRedirect=this.AviFailActionHTTPRedirectBuild(intHTTPStatusCode,strFailActionURL,strStatusProtocol);

objAviFailAction.setRedirect(objAviFailActionHTTPRedirect);
}

objAviPool.setFailAction(objAviFailAction);

letobjAviVroClient:AviVroClient=objAviWorkflowRuntime.getAviVroClient();
objAviVroClient.addObject(objAviPool,objAviWorkflowRuntime.getWorkflowId(),strTenant);

returnobjAviWorkflowRuntime;
}

Discover more from Cloud Build Tools

Subscribe to get the latest posts sent to your email.

You may also like