Add API to enable/disable NICs for KVM#12819
Conversation
|
@blueorangutan package |
|
@hsato03 a [SL] Jenkins job has been kicked to build packages. It will be bundled with no SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 17163 |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #12819 +/- ##
============================================
+ Coverage 17.95% 18.02% +0.06%
- Complexity 16259 16453 +194
============================================
Files 5954 5973 +19
Lines 534838 537334 +2496
Branches 65423 65975 +552
============================================
+ Hits 96010 96828 +818
- Misses 428053 429584 +1531
- Partials 10775 10922 +147
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
api/src/main/java/org/apache/cloudstack/api/command/user/vm/UpdateVmNicCmd.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
@hsato03
Code lgtm (apart from @JoaoJandre's review)
I also tested locally by enabling/disabling the NIC and using ip a inside the VM, I also tested:
- Using the API through the UI and CMK.
- Editing the default NIC when the VM has multiple NICs.
- Editing the NIC with the VM stopped and then starting it.
Everything worked as expected.
|
@blueorangutan package |
|
@hsato03 a [SL] Jenkins job has been kicked to build packages. It will be bundled with no SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 17189 |
Description
This PR introduces the
updateVmNicAPI, allowing users to enable or disable their VMs network interface cards (NICs).Currently, this API supports only KVM with the following parameters:
nicidenabledEnabled; otherwise, sets the NIC state toDisabledFuture updates will extend this API to support additional NIC properties and hypervisors.
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
All tests were performed using only one NIC in the VM. Furthermore, the results of all tests were obtained using the
ip acommand executed inside the VM.EnabledtoDisabledDisabledtoEnabledEnabledstateDisabledstateHow did you try to break this feature and the system with this change?