Skip to content

Hyper-V API: Snapshots feature#4722

Draft
xmkg wants to merge 317 commits intofeature/hyperv-api-backend-virtual-machinefrom
feature/hyperv-api-snapshots
Draft

Hyper-V API: Snapshots feature#4722
xmkg wants to merge 317 commits intofeature/hyperv-api-backend-virtual-machinefrom
feature/hyperv-api-snapshots

Conversation

@xmkg
Copy link
Member

@xmkg xmkg commented Mar 11, 2026

@codecov
Copy link

codecov bot commented Mar 11, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.65%. Comparing base (364e5e5) to head (5c39aaa).
⚠️ Report is 3 commits behind head on feature/hyperv-api-backend-virtual-machine.

Additional details and impacted files
@@                             Coverage Diff                             @@
##           feature/hyperv-api-backend-virtual-machine    #4722   +/-   ##
===========================================================================
  Coverage                                       87.65%   87.65%           
===========================================================================
  Files                                             258      258           
  Lines                                           14124    14124           
===========================================================================
  Hits                                            12379    12379           
  Misses                                           1745     1745           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

xmkg added 29 commits March 17, 2026 21:45
Also, simplify boilerplate code by wrapping MockFuncion with StrictMock
which allows us to eliminate the need for EXPECT_NO_CALL stubs.
[hyperv_test_utils] improve make_tempfile_path
- move GUID formatter to the platform_win.h header
- update unit test usages
- Introduce two new types, HcsScsiDevice & HcsScsiDeviceType
- Provide proper formatting for the HcsScsiDevice
- Remove vhdx_path & cloudinit_iso_path variables from create params
- Introduce scsi_devices paraneter to create params
- Update the code that refers to the vhdx_path & cloudinit_iso_path
- replace "endpoints" with "network_adapters" in create params
- Introduce new HcsNetworkAdapter type
- Implement proper JSON formatter for HcsNetworkAdapter
- Update relevant references in code
- add_endpoint function now takes compute system name as the rest of
  the API does
- Updated code references
to simplify the interaction between the smart pointers and the C API
a lean out_ptr type is implemented based on P1132R6 paper, which is
already accepted into the C++23 standard.

- open_host_compute_system and create_host_compute system now uses the
  out_ptr to avoid creating a temporary raw pointer for the API calls.
- update one more location that has been missed
modify_compute_system is the generic function for doing runtime CS
modification.
xmkg added 25 commits March 17, 2026 21:46
- Use c++20 designated initializers to avoid IILEs
- removed redundant instance_guid filed from HcsNetworkAdapter
- Add ASSERT_THROW for suspend failure test as it throws now on pause fail.
It'll be introduced later in a separate branch.
These two functions allow querying info about HCN networks. Filtering
networks through win32 API is a bit guesswork so let's do it in the
intended way.
Also added integration tests for the query_network and enumerate_networks
Now the networks() call return vSwitches and links populated properly
the prepare_networking() function works as intended and the custom net
setup code is no longer necessary.
It'll be introduced in a separate branch.
@xmkg xmkg force-pushed the feature/hyperv-api-backend-virtual-machine branch from 921de08 to e32e80a Compare March 17, 2026 18:47
xmkg added 2 commits March 17, 2026 21:50
Signed-off-by: Mustafa Kemal Gilor <mustafa.gilor@canonical.com>
@xmkg xmkg force-pushed the feature/hyperv-api-snapshots branch from cb9b720 to 5c39aaa Compare March 17, 2026 21:06
@xmkg xmkg force-pushed the feature/hyperv-api-backend-virtual-machine branch from f086551 to 1bc3d2a Compare March 19, 2026 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant