-
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: 4.19
Are you sure you want to change the base?
Update CIDR/Gateway of the Shared Networks from Guest IP ranges #11249
Conversation
…(and some code improvements)
… table columns for cidr/gateway list
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 ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 4.19 #11249 +/- ##
============================================
+ Coverage 4.28% 15.18% +10.89%
- Complexity 0 11368 +11368
============================================
Files 372 5417 +5045
Lines 29746 476015 +446269
Branches 5230 58111 +52881
============================================
+ Hits 1274 72269 +70995
- Misses 28327 395660 +367333
- Partials 145 8086 +7941
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)
|
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?