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

Add "AggregatedSnapshotCapacityInMb" to cnstype #3358

Merged
merged 2 commits into from
Feb 8, 2024

Conversation

lipingxue
Copy link
Contributor

Description

Add "AggregatedSnapshotCapacityInMb" in "CnsBlockBackingDetails" struct.

Type of change

Please mark options that are relevant:

  • Bug fix (non-breaking change which fixes an issue)
  • [ X] New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to
    not work as expected)
  • This change requires a documentation update
  • Build related change

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:

  • My code follows the CONTRIBUTION guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged

Copy link
Member

@dougm dougm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @lipingxue

@dougm dougm merged commit 4dd8843 into vmware:main Feb 8, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants