To use this function add it to the class library file named PluginVCHostSystemService.ts
GitHub Repository: https://github.com/SimonSparksUK/Orchestrator
Filename: PluginVCHostSystemService.ts
Description: Orchestrator Function to Find vCenter Host Service by Name
Function FindByName
public FindByName(objVcHostServiceSystem:VcHostServiceSystem, strVcHostServiceName:string): VcHostService {
let objVcHostServiceInfo:VcHostServiceInfo = objVcHostServiceSystem.serviceInfo;
let arrVcHostService:VcHostService[] = objVcHostServiceInfo.service;
let objVcHostService:VcHostService = arrVcHostService.find((objVcHostService:VcHostService): void => {
return objVcHostService.key === strVcHostServiceName;
});
return objVcHostService;
}Discover more from Cloud Build Tools
Subscribe to get the latest posts sent to your email.
