This is a sample of how to create service which extends the PluginBaseService using the Build Tools.
GitHub Repository: https://github.com/SimonSparksUK/Orchestrator
Filename: PluginVRAService.ts
import{MissingRequiredParameterError}from"../../utilities/Extensions";
import{PluginBaseService}from"./PluginBaseService";
exportclassPluginVRAServiceextendsPluginBaseService{
constructor(strProjectID:string){
if (!strProjectID){
thrownewMissingRequiredParameterError('strProjectID');
}
super(strProjectID,"PluginVRA");
}
publicFindAllForType<T>(strObjectType:"BlockDevice"|"CloudAccount"|"CloudAccountNsxT"|"CloudAccountNsxV"|"CloudAccountVsphere"|"DataCollector"|"FabricNetwork"|"FlavorProfile"|"Host"|"ImageProfile"|"Infrastructure"|"Machine"|"MachinesFolder"|"Network"|"NetworkInterface"|"NetworkProfile"|"Project"|"Region"|"RequestTracker"|"Snapshot"|"StorageProfile"|"Tag"|"Zone",strXPathQuery?:string):T[]{
letstrObjectTypePrefix:string="VRA";
letstrObjectTypeName:string=`${strObjectTypePrefix}:${strObjectType}`;
letarrObjectType:T[]=this.serverFindAllForType<T>(strObjectTypeName,strXPathQuery);
returnarrObjectType;
}
publicFindForType<T>(strObjectType:"BlockDevice"|"CloudAccount"|"CloudAccountNsxT"|"CloudAccountNsxV"|"CloudAccountVsphere"|"DataCollector"|"FabricNetwork"|"FlavorProfile"|"Host"|"ImageProfile"|"Infrastructure"|"Machine"|"MachinesFolder"|"Network"|"NetworkInterface"|"NetworkProfile"|"Project"|"Region"|"RequestTracker"|"Snapshot"|"StorageProfile"|"Tag"|"Zone",strObjectID:string):T{
letstrObjectTypePrefix:string="VRA";
letstrObjectTypeName:string=`${strObjectTypePrefix}:${strObjectType}`;
letobjObjectType:T=this.serverFindForType<T>(strObjectTypeName,strObjectID);
returnobjObjectType;
}
}Class Functions:
- Orchestrator Function: Server Find All For Type ( VRA )
- Orchestrator Function: Server Find For Type ( VRA )
- Orchestrator Function: vRA Cloud Account Service Create
- Orchestrator Function: vRA Cloud Zone Service Create
- Orchestrator Function: vRA Host Create
- Orchestrator Function: vRA Host Delete
- Orchestrator Function: vRA Host Get All
- Orchestrator Function: vRA Host Get By Name
- Orchestrator Function: vRA Host Update
- Orchestrator Function: vRA Host Validate
- Orchestrator Function: vRA Request Service Create
- Orchestrator Function: vRA Request Tracker Await Response
- Orchestrator Function: vRA Request Tracker Delete
- Orchestrator Function: vRA REST Request Get Url
- Orchestrator Function: vRA vSphere Cloud Account Create
- Orchestrator Function: vRA vSphere Cloud Account Delete
- Orchestrator Function: vRA vSphere Cloud Account Update
- Orchestrator Function: vRA vSphere Cloud Zone Create
- Orchestrator Function: vRA vSphere Cloud Zone Delete
- Orchestrator Function: vRA vSphere Cloud Zone Update
- Orchestrator Functions: vRA REST Requests
Discover more from Cloud Build Tools
Subscribe to get the latest posts sent to your email.
