Skip to content

Fix project scoped network filtering during unmanaged instance import - #14008

Open
dheeraj12347 wants to merge 1 commit into
apache:4.22from
dheeraj12347:fix-import-network-scope-4.22
Open

Fix project scoped network filtering during unmanaged instance import#14008
dheeraj12347 wants to merge 1 commit into
apache:4.22from
dheeraj12347:fix-import-network-scope-4.22

Conversation

@dheeraj12347

Copy link
Copy Markdown
Contributor

Description

Fix network selection for project-scoped unmanaged instance imports.

When importing an unmanaged instance from a project scope, the network selection component was not receiving the project ID. As a result, listNetworks could fall back to account/domain-based filtering instead of retrieving networks for the selected project.

This change passes the project ID to MultiNetworkSelection and uses it when fetching networks.

Changes

  • Pass form.projectid from ImportUnmanagedInstance.vue to MultiNetworkSelection.
  • Add projectid as an optional prop to MultiNetworkSelection.
  • Refresh the available networks when the project ID changes.
  • Use projectid for the listNetworks API request when a project scope is selected.
  • Preserve the existing domainid + account behavior when no project ID is provided.
  • Add unit tests covering project-scoped and account/domain-scoped network requests and project changes.

Testing

  • git diff --check passes.
  • Added unit coverage for the new project-scoped network filtering behavior.
  • Full UI unit-test execution could not be run locally because the UI dependencies are not installed in the current environment.

Related

Fixes the project-scoped network selection issue during unmanaged instance import.

@dheeraj12347

Copy link
Copy Markdown
Contributor Author

Hi @DaanHoogland and @weizhouapache , quick update on the two PRs:

Please let me know if you’d like me to take any further action on either PR.

Thanks!

@codecov

codecov Bot commented Aug 31, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 17.80%. Comparing base (7ea1dca) to head (4f4d078).

Additional details and impacted files
@@            Coverage Diff            @@
##               4.22   #14008   +/-   ##
=========================================
  Coverage     17.79%   17.80%           
- Complexity    15995    15997    +2     
=========================================
  Files          5928     5928           
  Lines        534306   534309    +3     
  Branches      65383    65384    +1     
=========================================
+ Hits          95069    95115   +46     
+ Misses       428467   428420   -47     
- Partials      10770    10774    +4     
Flag Coverage Δ
uitests 3.77% <ø> (+0.08%) ⬆️
unittests 18.88% <ø> (+<0.01%) ⬆️

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

☔ View full report in Codecov by Harness.
📢 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.

@DaanHoogland DaanHoogland moved this from Backlog to Ready in CloudStack Testing Aug 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Ready

Development

Successfully merging this pull request may close these issues.

2 participants