From ddf8b2e7cf0bef74e2a8d1017ad6b500ffe0cd86 Mon Sep 17 00:00:00 2001 From: djpbessems Date: Wed, 12 May 2021 09:53:10 +0200 Subject: [PATCH] Add namespace declaration for XML attribute --- scripts/Update-OvfConfiguration.ps1 | 4 ++-- scripts/Update-OvfConfiguration.yml | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/scripts/Update-OvfConfiguration.ps1 b/scripts/Update-OvfConfiguration.ps1 index 3a9d36a..37075e8 100644 --- a/scripts/Update-OvfConfiguration.ps1 +++ b/scripts/Update-OvfConfiguration.ps1 @@ -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 diff --git a/scripts/Update-OvfConfiguration.yml b/scripts/Update-OvfConfiguration.yml index 5e1f1da..fb510db 100644 --- a/scripts/Update-OvfConfiguration.yml +++ b/scripts/Update-OvfConfiguration.yml @@ -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.
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