To use this function add it to the class library file named OrchestratorService.ts
GitHub Repository: https://github.com/SimonSparksUK/Orchestrator
Filename: OrchestratorService.ts
Description: Orchestrator Function to Get vSphere Replication Remote Site
Public Function: getVrRemoteSite
public getVrRemoteSite(objVRSite: VRSite): VRVcRemoteSite {
let arrVRVcRemoteSite: VRVcRemoteSite[] = objVRSite.getVcRemoteSites();
this.objLogger.debug("Fetching the vSphere Replication Remote site")
let objVRVcRemoteSite: VRVcRemoteSite = arrVRVcRemoteSite.find((objVRVcRemoteSite: VRVcRemoteSite): boolean => {
return objVRVcRemoteSite.name !== objVRSite.name;
});
if (!objVRVcRemoteSite) {
throw new GeneralError(`Replication Remote Site is missing for ${objVRSite.name}`);
}
return objVRVcRemoteSite;
}Discover more from Cloud Build Tools
Subscribe to get the latest posts sent to your email.
