Hyper-V API: Snapshots feature#4722
Draft
xmkg wants to merge 317 commits intofeature/hyperv-api-backend-virtual-machinefrom
Draft
Hyper-V API: Snapshots feature#4722xmkg wants to merge 317 commits intofeature/hyperv-api-backend-virtual-machinefrom
xmkg wants to merge 317 commits intofeature/hyperv-api-backend-virtual-machinefrom
Conversation
Member
xmkg
commented
Mar 11, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
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.
- 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.
921de08 to
e32e80a
Compare
Signed-off-by: Mustafa Kemal Gilor <mustafa.gilor@canonical.com>
This reverts commit 421d99c.
cb9b720 to
5c39aaa
Compare
f086551 to
1bc3d2a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.