Function: Get vSphere Replication Local Site

by Simon Sparks · 4 February 2026

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 Local Site

Public Function: getVrLocalSite

public getVrLocalSite(vcVmInstanceUuid: string): VRSite {

    let arrVRSite: VRSite[] = VRPluginConfig.getSites();

    this.objLogger.debug("Fetching the vSphere Replication Local Site");

    let objVRSite: VRSite = arrVRSite.find((objVRSite: VRSite): boolean => {
        return objVRSite.vcInstanceUuid === vcVmInstanceUuid;
    });

    if (!objVRSite) {
        throw new GeneralError(`Replication Local Site is missing for ${vcVmInstanceUuid}`);
    }

    return objVRSite;
}

Discover more from Cloud Build Tools

Subscribe to get the latest posts sent to your email.

You may also like