To use this function add it to the class library file named PluginVCVirtualMachineService.ts
GitHub Repository: https://github.com/SimonSparksUK/Orchestrator
Filename: PluginVCVirtualMachineService.ts
Description: Build a vCenter Virtual PCI Passthrough
Private Function: buildVcVirtualPCIPassthrough
privatebuildVcVirtualPCIPassthrough(strVendorID:string,strDeviceID:string):VcVirtualPCIPassthrough{
// @ts-ignore
letobjVcVirtualPCIPassthroughAllowedDevice:VcVirtualPCIPassthroughAllowedDevice=newVcVirtualPCIPassthroughAllowedDevice();
objVcVirtualPCIPassthroughAllowedDevice.vendorId=strVendorID;
objVcVirtualPCIPassthroughAllowedDevice.deviceId=strDeviceID;
// @ts-ignore
letarrVcVirtualPCIPassthroughAllowedDevice:VcVirtualPCIPassthroughAllowedDevice[]= [];
arrVcVirtualPCIPassthroughAllowedDevice.push(objVcVirtualPCIPassthroughAllowedDevice);
// @ts-ignore
letobjVcVirtualPCIPassthroughDynamicBackingInfo:VcVirtualPCIPassthroughDynamicBackingInfo=newVcVirtualPCIPassthroughDynamicBackingInfo();
objVcVirtualPCIPassthroughDynamicBackingInfo.deviceName='';
objVcVirtualPCIPassthroughDynamicBackingInfo.allowedDevice=arrVcVirtualPCIPassthroughAllowedDevice;
letobjVcDescription:VcDescription=newVcDescription();
objVcDescription.summary='New PCI device';
objVcDescription.label='New PCI device';
letobjVcVirtualPCIPassthrough:VcVirtualPCIPassthrough=newVcVirtualPCIPassthrough();
objVcVirtualPCIPassthrough.backing=objVcVirtualPCIPassthroughDynamicBackingInfo;
objVcVirtualPCIPassthrough.deviceInfo=objVcDescription;
objVcVirtualPCIPassthrough.key=-102;
returnobjVcVirtualPCIPassthrough;
}TypeScriptDiscover more from Cloud Build Tools
Subscribe to get the latest posts sent to your email.
