To use this function add it to the class library file named vCenterServerService.ts
GitHub Repository: https://github.com/SimonSparksUK/Orchestrator
Filename: vCenterServerService.ts
Public Function: VcClusterComputeResourceNtpServerConfigure
publicVcClusterComputeResourceNtpServerConfigure(objVcClusterComputeResource:VcClusterComputeResource,arrNtpServerIp:string[]):void{
this.VcClusterComputeResourceNtpServerConfigure(objVcClusterComputeResource,arrNtpServerIp);
}Public Function: VcClusterComputeResourceNtpServerUnconfigure
publicVcClusterComputeResourceNtpServerUnconfigure(objVcClusterComputeResource:VcClusterComputeResource):void{
this.VcClusterComputeResourceNtpServerConfigure(objVcClusterComputeResource, []);
}Private Function: VcClusterComputeResourceNtpServerToggle
privateVcClusterComputeResourceNtpServerConfigure(objVcClusterComputeResource:VcClusterComputeResource,arrNtpServerIp:string[]):void{
letobjVcHostNtpConfig:VcHostNtpConfig=newVcHostNtpConfig();
objVcHostNtpConfig.server=arrNtpServerIp
letobjVcHostDateTimeConfig:VcHostDateTimeConfig=newVcHostDateTimeConfig();
objVcHostDateTimeConfig.ntpConfig=objVcHostNtpConfig;
letarrVcHostSystem:VcHostSystem[]=objVcClusterComputeResource.host;
arrVcHostSystem.forEach((objVcHostSystem:VcHostSystem):void=>{
this.VcHostSystemNtpServerConfigure(objVcHostSystem,arrNtpServerIp);
});
}Discover more from Cloud Build Tools
Subscribe to get the latest posts sent to your email.
