vmware / govmomi

Go library for the VMware vSphere API
Apache License 2.0
2.3k stars 910 forks source link

Add "AggregatedSnapshotCapacityInMb" to cnstype #3358

Closed lipingxue closed 7 months ago

lipingxue commented 7 months ago

Description

Add "AggregatedSnapshotCapacityInMb" in "CnsBlockBackingDetails" struct.

Type of change

Please mark options that are relevant:

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. If applicable, please also list any relevant details for your test configuration.

Run unit test, and can see this new field is available in the QueryVolume result.

client_test.go:244: Successfully Queried Volumes. queryResult: &types.CnsQueryResult{ Volumes: []types.CnsVolume{ { VolumeId: types.CnsVolumeId{ Id: "1aea2f18-d51c-4c67-a793-3c03d587100a", }, DatastoreUrl: "ds:///vmfs/volumes/65b980ec-15046ef0-c7e0-0200aec77050/", Name: "pvc-901e87eb-c2bd-11e9-806f-005056a0c9a0", VolumeType: "BLOCK",
StoragePolicyId: "", Metadata: types.CnsVolumeMetadata{ ContainerCluster: types.CnsContainerCluster{ ClusterType: "KUBERNETES", ClusterId: "demo-cluster-id", VSphereUser: "Administrator@vsphere.local", ClusterFlavor: "VANILLA", ClusterDistribution: "OpenShift", }, EntityMetadata: nil, ContainerClusterArray: []types.CnsContainerCluster{ { ClusterType: "KUBERNETES", ClusterId: "demo-cluster-id", VSphereUser: "Administrator@vsphere.local", ClusterFlavor: "VANILLA", ClusterDistribution: "OpenShift", }, }, }, BackingObjectDetails: &types.CnsBlockBackingDetails{ CnsBackingObjectDetails: types.CnsBackingObjectDetails{ CapacityInMb: 5120, }, BackingDiskId: "1aea2f18-d51c-4c67-a793-3c03d587100a", BackingDiskUrlPath: "", BackingDiskObjectId: "", AggregatedSnapshotCapacityInMb: 0, }, ComplianceStatus: "", DatastoreAccessibilityStatus: "accessible", HealthStatus: "green", }, },

Checklist: