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

api: Add ExtendVirtualDisk method on VirtualDiskManager #3479

Merged
merged 1 commit into from
Jul 2, 2024

Conversation

spacegospod
Copy link
Contributor

Description

Adding a binding for extendVirtualDisk on VirtualDiskManager.

hashicorp/terraform-provider-vsphere#851

Type of change

Please mark options that are relevant:

  • Bug fix (non-breaking change which fixes an issue)
  • 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?

Extended the tests for virtual_disk_manager.go with new scenarios that cover
1.[POSITIVE] Extending a disk
2.[NEGATIVE] Attempting to shrink a disk
3.[NEGATIVE] Attempting to extend a disk that does not exist

The simulation for virtual disks did not include metadata for the disk size.
I've modified it so that it writes the size value (in KB) in the file itself.

Manually verified the same scenarios on a real VMDK.

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

@spacegospod spacegospod self-assigned this Jul 1, 2024
@spacegospod spacegospod changed the title Feature/extend disk api: Add ExtendVirtualDisk method on VirtualDiskManager Jul 1, 2024
@spacegospod spacegospod force-pushed the feature/extend-disk branch 4 times, most recently from 386005f to fd8d753 Compare July 1, 2024 14:05
Signed-off-by: Stoyan Zhelyazkov <stoyan.zhelyazkov@broadcom.com>
@spacegospod spacegospod force-pushed the feature/extend-disk branch from fd8d753 to 3139de3 Compare July 1, 2024 14:22
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 @spacegospod , lgtm. Although, VirtualDiskManager has been deprecated for quite some time. Has TF considered switching to First Class Disks (aka VStorageObjectManager) ? That'd be ExtendDisk in this case.

@spacegospod
Copy link
Contributor Author

Thanks @spacegospod , lgtm. Although, VirtualDiskManager has been deprecated for quite some time. Has TF considered switching to First Class Disks (aka VStorageObjectManager) ? That'd be ExtendDisk in this case.

Hey @dougm I will try switching the TF provider to VStorageObjectManager.
Lets still have this merged, just as a back up

@spacegospod spacegospod merged commit 5867109 into vmware:main Jul 2, 2024
10 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