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

public AviPoolCreate(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 {

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

    let objAviFailAction: AviFailAction = new AviFailAction();
    objAviFailAction.setType(strFailActionType);

    if (strFailActionType === "FAIL_ACTION_HTTP_REDIRECT") {

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

        objAviFailAction.setRedirect(objAviFailActionHTTPRedirect);
    }

    objAviPool.setFailAction(objAviFailAction);

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

    return objAviWorkflowRuntime;
}

Discover more from Cloud Build Tools

Subscribe to get the latest posts sent to your email.

You may also like