To use this function add it to the class library file named PluginVCVirtualMachineService.ts
GitHub Repository: https://github.com/SimonSparksUK/Orchestrator
Filename: PluginVCVirtualMachineService.ts
Function: ReconfigureForBootFromHTTP
public ReconfigureForBootFromHTTP(objVcVirtualMachine: VcVirtualMachine, strNetworkBootProtocol: "httpv4" | "httpv6", strNetworkBootUri: string, strCaCertificateDefaultValueInHexadecimalFormat: string): boolean {
// Make strCaCertificateDefaultValueInHexadecimalFormat using "echo | cat ca_cert_file 2>/dev/null | openssl x509 -outform DER | hexdump -v -e '1/1 " %02x";
let objProperties: Properties = new Properties();
objProperties.put("uefi.tls.CaCertificateDefault.present", "TRUE");
objProperties.put("uefi.tls.CaCertificateDefault.value0", strCaCertificateDefaultValueInHexadecimalFormat);
objProperties.put("networkBootProtocol", strNetworkBootProtocol);
objProperties.put("networkBootUri", strNetworkBootUri);
let blnReturn:boolean = this.ReconfigureAdvancedParameters(objVcVirtualMachine, objProperties);
return blnReturn;
}Discover more from Cloud Build Tools
Subscribe to get the latest posts sent to your email.
