Add namespace declaration for XML attribute
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Danny Bessems 2021-05-12 09:53:10 +02:00
parent 0fc1cb12c7
commit ddf8b2e7cf
2 changed files with 8 additions and 8 deletions

View File

@ -172,12 +172,12 @@ If ($OVFConfig.DeploymentConfigurations.Count -gt 0) {
# Add updated resourceType nodes
ForEach ($Configuration in $OVFConfig.DeploymentConfigurations) {
$XMLCPU = $XMLCPUTemplate.CloneNode($True)
[void]$XMLCPU.SetAttribute('ovf:configuration', $Configuration.Id)
[void]$XMLCPU.SetAttribute('configuration', $NS.LookupNamespace('ovf'), $Configuration.Id)
$XMLCPU.SelectSingleNode('rasd:ElementName', $NS).InnerText = '{0} virtual CPU(s)' -f $Configuration.Size.CPU
$XMLCPU.SelectSingleNode('rasd:VirtualQuantity', $NS).InnerText = $Configuration.Size.CPU
$XMLMemory = $XMLMemoryTemplate.CloneNode($True)
[void]$XMLMemory.SetAttribute('ovf:configuration', $Configuration.Id)
[void]$XMLMemory.SetAttribute('configuration', $NS.LookupNamespace('ovf'), $Configuration.Id)
$XMLMemory.SelectSingleNode('rasd:ElementName', $NS).InnerText = '{0}MB of memory' -f $Configuration.Size.Memory
$XMLMemory.SelectSingleNode('rasd:VirtualQuantity', $NS).InnerText = $Configuration.Size.Memory

View File

@ -1,25 +1,25 @@
DeploymentConfigurations:
- Id: domainmember-medium
Label: Domain member
Description: Windows Server joined to an Active Directory domain
Description: Windows Server joined to an Active Directory domain.<br/>2 vCPU/4GB RAM
Size:
CPU: 2
Memory: 4096
- Id: domainmember-large
Label: Domain member
Description: Windows Server joined to an Active Directory domain [LARGE]
Label: Domain member [LARGE]
Description: Windows Server joined to an Active Directory domain.`n4 vCPU and 8GB RAM
Size:
CPU: 4
Memory: 8192
- Id: standalone-medium
Label: Stand-alone
Description: Stand-alone Windows Server
Description: Stand-alone Windows Server. 2 vCPU/4GB RAM
Size:
CPU: 2
Memory: 4096
- Id: standalone-large
Label: Stand-alone
Description: Stand-alone Windows Server [LARGE]
Label: Stand-alone [LARGE]
Description: Stand-alone Windows Server.\n4 vCPU, 8GB RAM
Size:
CPU: 4
Memory: 8192