Add upstream code (extra:Config)
Some checks reported errors
continuous-integration/drone/push Build was killed
Some checks reported errors
continuous-integration/drone/push Build was killed
This commit is contained in:
parent
32087d9d28
commit
e74d0a23e3
@ -63,6 +63,22 @@ If ($OVFConfig.DeploymentConfigurations.Count -gt 0) {
|
|||||||
$XMLAttrTransport = $XML.CreateAttribute('transport', $XML.DocumentElement.ovf)
|
$XMLAttrTransport = $XML.CreateAttribute('transport', $XML.DocumentElement.ovf)
|
||||||
$XMLAttrTransport.Value = 'com.vmware.guestInfo'
|
$XMLAttrTransport.Value = 'com.vmware.guestInfo'
|
||||||
[void]$XML.SelectSingleNode('//Any:VirtualHardwareSection', $NS).Attributes.Append($XMLAttrTransport)
|
[void]$XML.SelectSingleNode('//Any:VirtualHardwareSection', $NS).Attributes.Append($XMLAttrTransport)
|
||||||
|
ForEach ($ExtraConfig in $OVFConfig.AdvancedOptions) {
|
||||||
|
$XMLExtraConfig = $XML.CreateElement('vmw:ExtraConfig', $XML.DocumentElement.vmw)
|
||||||
|
|
||||||
|
$XMLExtraConfigAttrRequired = $XML.CreateAttribute('required', $XML.DocumentElement.ovf)
|
||||||
|
$XMLExtraConfigAttrRequired.Value = "$([boolean]$ExtraConfig.Required)".ToLower()
|
||||||
|
$XMLExtraConfigAttrKey = $XML.CreateAttribute('key', $XML.DocumentElement.vmw)
|
||||||
|
$XMLExtraConfigAttrKey.Value = $ExtraConfig.Key
|
||||||
|
$XMLExtraConfigAttrValue = $XML.CreateAttribute('value', $XML.DocumentElement.vmw)
|
||||||
|
$XMLExtraConfigAttrValue.Value = $ExtraConfig.Value
|
||||||
|
|
||||||
|
[void]$XMLExtraConfig.Attributes.Append($XMLExtraConfigAttrRequired)
|
||||||
|
[void]$XMLExtraConfig.Attributes.Append($XMLExtraConfigAttrKey)
|
||||||
|
[void]$XMLExtraConfig.Attributes.Append($XMLExtraConfigAttrValue)
|
||||||
|
[void]$XML.SelectSingleNode('//Any:VirtualHardwareSection', $NS).AppendChild($XMLExtraConfig)
|
||||||
|
}
|
||||||
|
Write-Host "Added $($OVFConfig.AdvancedOptions.Count) 'vmw:ExtraConfig' nodes"
|
||||||
|
|
||||||
$XMLProductSection = $XML.SelectSingleNode('//Any:ProductSection', $NS)
|
$XMLProductSection = $XML.SelectSingleNode('//Any:ProductSection', $NS)
|
||||||
If ($XMLProductSection -eq $Null) {
|
If ($XMLProductSection -eq $Null) {
|
||||||
|
Loading…
Reference in New Issue
Block a user