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 Update an AVI Pool.
Private Function: AviPoolUpdate
public AviPoolUpdate(objAviWorkflowRuntime: AviWorkflowRuntime, arrIpAddress: string[], strPoolName: string, strAviIpAddrType: "V4" | "V6", intRatio: number, intPort: number): void {
let objAviVroClient: AviVroClient = objAviWorkflowRuntime.getAviVroClient();
let objAviCredentials: AviCredentials = objAviVroClient.cred;
let arrAviServer: AviServer[] = arrIpAddress.map((strIpAddress: string): AviServer => {
let objAviServer: AviServer = this.AviServerBuild(strIpAddress, intPort, strAviIpAddrType, intRatio);
return objAviServer;
});
let objAviPool: AviPool = objAviVroClient.getObjectByName("pool", strPoolName, objAviCredentials.tenant) as AviPool;
objAviPool.setServers(arrAviServer);
objAviVroClient.addObject(objAviPool, objAviWorkflowRuntime.getWorkflowId(), objAviCredentials.tenant);
objAviVroClient.executeWorkflow();
}Discover more from Cloud Build Tools
Subscribe to get the latest posts sent to your email.
