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 18.02% 18.01% -0.01%
- Complexity 16460 16462 +2
============================================
Files 5968 5973 +5
Lines 537213 537461 +248
Branches 65975 65989 +14
============================================
+ Hits 96825 96833 +8
- Misses 429469 429707 +238
- Partials 10919 10921 +2
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 |
|
@DaanHoogland @vishesh92 @abh1sar could we run the CI here? |
|
@blueorangutan test |
|
@sureshanaparti a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
|
[SF] Trillian Build Failed (tid-15735) |
|
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch. |
|
@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 17291 |
|
@blueorangutan test |
|
@DaanHoogland a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
|
[SF] Trillian test result (tid-15775)
|
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?