Replies: 1 comment
-
I haven't used the vsan API much myself, but looks like generated code just needs to use interface type for that field. The vsan package needs updating in general, patch below in the meantime. diff --git a/govc/vsan/info.go b/govc/vsan/info.go
index 7d3438d4..3840ca08 100644
--- a/govc/vsan/info.go
+++ b/govc/vsan/info.go
@@ -26,6 +26,7 @@ import (
"github.com/vmware/govmomi/govc/cli"
"github.com/vmware/govmomi/govc/flags"
+ vim "github.com/vmware/govmomi/vim25/types"
"github.com/vmware/govmomi/vsan"
"github.com/vmware/govmomi/vsan/types"
)
@@ -118,6 +119,11 @@ func (r *infoResult) Write(w io.Writer) error {
}
fmt.Fprintf(tw, " Unmap Enabled:\t%t\n", unmapEnabled)
+
+ switch p := cluster.Info.PerfsvcConfig.Profile.(type) {
+ case *vim.VirtualMachineDefinedProfileSpec:
+ fmt.Fprintf(tw, " Profile ID:\t%s\n", p.ProfileId)
+ }
}
return tw.Flush()
diff --git a/vsan/types/types.go b/vsan/types/types.go
index b8b8e110..1e39643f 100644
--- a/vsan/types/types.go
+++ b/vsan/types/types.go
@@ -5799,7 +5799,7 @@ type VsanPerfsvcConfig struct {
types.DynamicData
Enabled bool `xml:"enabled"`
- Profile *types.VirtualMachineProfileSpec `xml:"profile,omitempty"`
+ Profile types.BaseVirtualMachineProfileSpec `xml:"profile,omitempty"`
DiagnosticMode *bool `xml:"diagnosticMode"`
VerboseMode *bool `xml:"verboseMode"`
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am trying to get the profile id from VsanPerfsvcConfig. I've tried asserting the type and force converting it but those don't work. I see in the debug log that vsphere SOAP is indeed responding with VirtualMachineDefinedProfileSpec. Is there a way I can convert them back and forth?
Beta Was this translation helpful? Give feedback.
All reactions