Skip to content

Conversation

shwstppr
Copy link
Contributor

@shwstppr shwstppr commented Sep 6, 2025

Description

Currently, acquire or associate IP action in the UI will load only 500 addresses (or whatever defined by config default.page.size). Also, it will load all 500 of them together. This PR uses InfiniteScrollSelect to iteratively load more addresses. To facilitate retrieving both Free and Reserved addresses api and server change has been made for the listPublicIpAddresses API to pass a comma-separated list of states for state parameter.

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)
  • build/CI
  • test (unit or integration test code)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

image

How Has This Been Tested?

How did you try to break this feature and the system with this change?

Currently, acquire or associate IP action in the UI will load only 500 addresses. ALso, it will load all 500 of them together.
This PR uses InfiniteScrollSelect to iteratively load more addresses.
To facilitate retrieving both Free and Reserved addresses api and server
change has been made for the listPublicIpAddresses API to pass a
comma-separated list of states for state parameter.

Signed-off-by: Abhishek Kumar <[email protected]>
Copy link

codecov bot commented Sep 6, 2025

Codecov Report

❌ Patch coverage is 23.80952% with 16 lines in your changes missing coverage. Please review.
✅ Project coverage is 17.36%. Comparing base (3ddd802) to head (68bfa1b).
⚠️ Report is 20 commits behind head on main.

Files with missing lines Patch % Lines
...in/java/com/cloud/server/ManagementServerImpl.java 23.80% 16 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##               main   #11591   +/-   ##
=========================================
  Coverage     17.36%   17.36%           
- Complexity    15235    15245   +10     
=========================================
  Files          5888     5888           
  Lines        525740   525835   +95     
  Branches      64164    64183   +19     
=========================================
+ Hits          91272    91302   +30     
- Misses       424168   424227   +59     
- Partials      10300    10306    +6     
Flag Coverage Δ
uitests 3.63% <ø> (-0.01%) ⬇️
unittests 18.40% <23.80%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@shwstppr
Copy link
Contributor Author

shwstppr commented Sep 6, 2025

@blueorangutan package

@blueorangutan
Copy link

@shwstppr 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.

@blueorangutan
Copy link

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 14878

@DaanHoogland
Copy link
Contributor

@blueorangutan test keepEnv

@blueorangutan
Copy link

@DaanHoogland a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests

Signed-off-by: Abhishek Kumar <[email protected]>
@shwstppr shwstppr requested a review from Copilot September 10, 2025 09:10
Copy link

@Copilot Copilot AI left a 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 pull request enhances the public IP address listing functionality in CloudStack by enabling iterative loading through infinite scroll and supporting multiple states. The primary improvement is in the UI's IP acquisition/association interface, which previously loaded only 500 addresses synchronously.

Key changes include:

  • Modified listPublicIpAddresses API to accept comma-separated states parameter
  • Replaced static select component with infinite scroll select in UI
  • Updated server-side filtering to handle multiple states
  • Enhanced test coverage for new multi-state functionality

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
ui/src/views/network/IpAddressesTab.vue Replaces static select with InfiniteScrollSelect component and removes manual IP loading logic
ui/src/components/widgets/InfiniteScrollSelect.vue Adds support for custom label functions and auto-selection of first option
server/src/main/java/com/cloud/server/ManagementServerImpl.java Implements comma-separated state parameter parsing and multi-state filtering
api/src/main/java/org/apache/cloudstack/api/command/user/address/ListPublicIpAddressesCmd.java Updates API documentation to reflect comma-separated state support
server/src/test/java/com/cloud/server/ManagementServerImplTest.java Updates test methods to accommodate new multi-state parameter structure

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Signed-off-by: Abhishek Kumar <[email protected]>
Copy link
Contributor

@harikrishna-patnala harikrishna-patnala left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code LGTM

@harikrishna-patnala
Copy link
Contributor

@blueorangutan package

@blueorangutan
Copy link

@harikrishna-patnala 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.

@blueorangutan
Copy link

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 14949

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

4 participants