Function: vCenter Datastore IsType ?

by Simon Sparks · 23 January 2026

To use this function add it to the class library file named PluginVCDatastoreService.ts

GitHub Repository: https://github.com/SimonSparksUK/Orchestrator

Filename: PluginVCDatastoreService.ts

Description: Orchestrator Function to Check the Datastore Type

Function: IsType

private IsType(objVcDatastore: VcDatastore, strVcDatastoreType: string): boolean {

    let objVcDatastoreSummary: VcDatastoreSummary = objVcDatastore.summary;

    return objVcDatastoreSummary.type.toLowerCase() === strVcDatastoreType;
}

Public Functions:

public IsVSAN(objVcDatastore: VcDatastore): boolean {
    return this.IsType(objVcDatastore, "vsan");
}

public IsVMFS(objVcDatastore: VcDatastore): boolean {
    return this.IsType(objVcDatastore, "vmfs");
}

public IsNFS(objVcDatastore: VcDatastore): boolean {
    return this.IsType(objVcDatastore, "nfs");
}

public IsNFS41(objVcDatastore: VcDatastore): boolean {
    return this.IsType(objVcDatastore, "nfs41");
}

public IsVFFS(objVcDatastore: VcDatastore): boolean {
    return this.IsType(objVcDatastore, "vffs");
}

Discover more from Cloud Build Tools

Subscribe to get the latest posts sent to your email.

You may also like