-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Update CIDR/Gateway of the Shared Networks from Guest IP ranges #11249
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
base: main
Are you sure you want to change the base?
Update CIDR/Gateway of the Shared Networks from Guest IP ranges #11249
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR enhances shared network functionality by allowing network CIDR and gateway fields to store comma-separated values representing multiple IP ranges. When guest IP ranges are added or removed from a shared network, the corresponding CIDR and gateway values are automatically updated to reflect all active ranges.
- Adds utility methods for managing comma-separated strings and extracting first values
- Modifies network CIDR/gateway management to support multiple values during IP range operations
- Updates API responses to display only the first CIDR/gateway value for backward compatibility
Reviewed Changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated 5 comments.
Show a summary per file
File | Description |
---|---|
StringUtils.java | Adds utility methods for comma-separated string manipulation and first value extraction |
ConfigurationManagerImpl.java | Updates VLAN creation/deletion to maintain network CIDR/gateway lists |
ApiResponseHelper.java | Modifies network response to show first CIDR/gateway value only |
schema-41930to41940.sql | Increases database column sizes for CIDR and gateway fields |
schema-41930to41940-cleanup.sql | Empty cleanup script for database migration |
Upgrade41930to41940.java | Database upgrade handler for version 4.19.3.0 to 4.19.4.0 |
Upgrade41920to41930.java | Database upgrade handler for version 4.19.2.0 to 4.19.3.0 |
DatabaseUpgradeChecker.java | Registers new upgrade handlers in the upgrade chain |
server/src/main/java/com/cloud/configuration/ConfigurationManagerImpl.java
Outdated
Show resolved
Hide resolved
server/src/main/java/com/cloud/configuration/ConfigurationManagerImpl.java
Outdated
Show resolved
Hide resolved
engine/schema/src/main/resources/META-INF/db/schema-41930to41940.sql
Outdated
Show resolved
Hide resolved
engine/schema/src/main/resources/META-INF/db/schema-41930to41940.sql
Outdated
Show resolved
Hide resolved
engine/schema/src/main/resources/META-INF/db/schema-41930to41940.sql
Outdated
Show resolved
Hide resolved
server/src/main/java/com/cloud/configuration/ConfigurationManagerImpl.java
Outdated
Show resolved
Hide resolved
server/src/main/java/com/cloud/configuration/ConfigurationManagerImpl.java
Outdated
Show resolved
Hide resolved
@blueorangutan package |
@sureshanaparti a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #11249 +/- ##
============================================
- Coverage 16.76% 16.76% -0.01%
+ Complexity 14285 14283 -2
============================================
Files 5767 5767
Lines 512657 512734 +77
Branches 62359 62370 +11
============================================
- Hits 85950 85941 -9
- Misses 417108 417194 +86
Partials 9599 9599
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:
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 14271 |
@blueorangutan test |
@sureshanaparti a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
[SF] Trillian test result (tid-13831)
|
server/src/main/java/com/cloud/configuration/ConfigurationManagerImpl.java
Outdated
Show resolved
Hide resolved
server/src/main/java/com/cloud/configuration/ConfigurationManagerImpl.java
Outdated
Show resolved
Hide resolved
engine/schema/src/main/java/com/cloud/upgrade/DatabaseUpgradeChecker.java
Outdated
Show resolved
Hide resolved
engine/schema/src/main/resources/META-INF/db/schema-41930to41940.sql
Outdated
Show resolved
Hide resolved
01ef7f3
to
278a0b4
Compare
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch. |
…(and some code improvements)
278a0b4
to
500d375
Compare
@blueorangutan package |
@sureshanaparti a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
Packaging result [SF]: ✖️ el8 ✖️ el9 ✔️ debian ✖️ suse15. SL-JID 14374 |
@blueorangutan package |
@sureshanaparti a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 14377 |
@blueorangutan test |
@nvazquez a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
[SF] Trillian test result (tid-13902)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clgtm
@blueorangutan test keepEnv |
@DaanHoogland a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
[SF] Trillian test result (tid-13920)
|
Description
This PR updates the CIDR/Gateway of the Shared Networks from Guest IP ranges.
CIDR/Gateway list are maintained for shared networks in networks table (null when there are no Guest IP ranges), and only the first one would be returned through the list networks response (for backward compatibility).
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
Created a shared network with gateway/netmask/startip/endip, Checked the network cidr/gateway after the following operations - added more guest ip ranges to the shared network, removed some ranges and added new ranges, removed all ranges and added new ranges. Deployed instances on the shared network.
How did you try to break this feature and the system with this change?