Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix extraconfig xml #690

Merged
merged 3 commits into from
Jun 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .changes/v2.25.0/690-bug-fixes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* Patched `vm.updateExtraConfig` method that could sometimes fail due to random mishandling of XML namespaces in upstream libraries [GH-690]
13 changes: 7 additions & 6 deletions govcd/vm.go
Original file line number Diff line number Diff line change
Expand Up @@ -2171,12 +2171,13 @@ func (vm *VM) updateExtraConfig(update []*types.ExtraConfigMarshal, wantDelete b
}

requestVirtualHardwareSection := &types.RequestVirtualHardwareSection{
Info: "Virtual hardware requirements",
Ovf: types.XMLNamespaceOVF,
Rasd: types.XMLNamespaceRASD,
Vssd: types.XMLNamespaceVSSD,
Ns4: types.XMLNamespaceVCloud,
Vmw: types.XMLNamespaceVMW,
Info: "Virtual hardware requirements",
Ovf: types.XMLNamespaceOVF,
Rasd: types.XMLNamespaceRASD,
Vssd: types.XMLNamespaceVSSD,
Ns4: types.XMLNamespaceVCloud,
Vmw: types.XMLNamespaceVMW,
Xmlns: types.XMLNamespaceVCloud,

Type: virtualHardwareSection.Type,
System: virtualHardwareSection.System,
Expand Down
1 change: 1 addition & 0 deletions types/v56/vm_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ type Adapter struct {
type RequestVirtualHardwareSection struct {
// Extends OVF Section_Type
XMLName xml.Name `xml:"ovf:VirtualHardwareSection"`
Xmlns string `xml:"xmlns,attr,omitempty"`
Ovf string `xml:"xmlns:ovf,attr"`
Vssd string `xml:"xmlns:vssd,attr"`
Rasd string `xml:"xmlns:rasd,attr"`
Expand Down
Loading