Skip to content

Ownership selection in VPC tiers and VPC public IPs#9692

Open
gp-santos wants to merge 8 commits into
apache:mainfrom
scclouds:main-vpc-tier-and-ip-ownership-selection
Open

Ownership selection in VPC tiers and VPC public IPs#9692
gp-santos wants to merge 8 commits into
apache:mainfrom
scclouds:main-vpc-tier-and-ip-ownership-selection

Conversation

@gp-santos
Copy link
Copy Markdown
Collaborator

Description

This PR adds the "ownership selection" UI fields to VPC tiers and VPC public IPs.

The "vpcAccess" response attribute was added so the UI can know if the caller has access to the VPC without needing to make a whole new request. This is needed to avoid 404 links (since router.resolve is assembled through API permissions) and so the UI can present the correct public IPs to their possible network tiers (e.g. if the User has tiers of two different VPCs, they can't use one's public IP in the other).

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):

New tier possible owners' listing

image

Tier listing

image

User accessing their tier of the Admin's VPC

image

Possible owners for new IP

image

How Has This Been Tested?

Environment with domains Root (with accounts Root Admin and User), Root/1 (with a Domain Admin), Root/A (with a Domain Admin) and Root/A/B (with a Domain Admin and a User). There is a Project in each domain, owned by the respective admins.

Situation Test
As Root Admin with VPC owned by self. Every account and project listed as possible owners in Tier creation
As Root Admin with VPC owned by self and one tier for each account and project. Every account and project listed as possible owners in acquiring public IP.
Same as previous, but remove some of the tiers. The deleted tiers' owners also disappeared from IP possible owners' list, except Root Admin itself.
As Root Admin with VPC owned by self, create one tier with a private ACL for the User. User's access to network page did not present the 'ACL' attribute.
As Root Admin with VPC owned by self, create one tier with a global ACL for the User. User's access to network page showed 'ACL' attribute.

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

@codecov
Copy link
Copy Markdown

codecov Bot commented Sep 16, 2024

Codecov Report

❌ Patch coverage is 75.00000% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 18.09%. Comparing base (5893ba5) to head (bc106fd).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
...che/cloudstack/api/response/IPAddressResponse.java 0.00% 3 Missing ⚠️
...pache/cloudstack/api/response/NetworkResponse.java 50.00% 3 Missing ⚠️
...src/main/java/com/cloud/api/ApiResponseHelper.java 90.00% 3 Missing ⚠️
...tack/api/command/user/network/ListNetworksCmd.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##               main    #9692   +/-   ##
=========================================
  Coverage     18.09%   18.09%           
- Complexity    16723    16725    +2     
=========================================
  Files          6037     6037           
  Lines        542580   542671   +91     
  Branches      66427    66451   +24     
=========================================
+ Hits          98155    98179   +24     
- Misses       433399   433465   +66     
- Partials      11026    11027    +1     
Flag Coverage Δ
uitests 3.51% <ø> (-0.01%) ⬇️
unittests 19.25% <75.00%> (+<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.

@gp-santos gp-santos added this to the 4.21.0.0 milestone Sep 16, 2024
@sureshanaparti
Copy link
Copy Markdown
Contributor

@blueorangutan package

@blueorangutan
Copy link
Copy Markdown

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

@blueorangutan
Copy link
Copy Markdown

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

Comment thread api/src/main/java/org/apache/cloudstack/api/response/IPAddressResponse.java Outdated
Comment thread api/src/main/java/org/apache/cloudstack/api/response/NetworkResponse.java Outdated
Comment thread server/src/main/java/com/cloud/api/ApiResponseHelper.java Outdated
Comment thread ui/src/views/network/IpAddressesTab.vue
Comment thread ui/src/views/network/VpcTiersTab.vue Outdated
Comment thread ui/src/views/network/VpcTiersTab.vue Outdated
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 9, 2025

This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.

@JoaoJandre
Copy link
Copy Markdown
Contributor

@gpordeus could you fix the conflicts?

@rajujith
Copy link
Copy Markdown
Contributor

@gpordeus Since this is for the 4.22.1 release, could you retarget the PR to the 4.22 branch?

@gp-santos gp-santos force-pushed the main-vpc-tier-and-ip-ownership-selection branch from 68a3bfe to 369984b Compare May 18, 2026 21:45
@gp-santos
Copy link
Copy Markdown
Collaborator Author

Hi, @rajujith, @sureshanaparti, @JoaoJandre and @winterhazel

Sorry for taking so long on getting back to this, it had been a while since I made this and the conflicts with 4.22 threw me for a loop.

I fixed the conflicts with the main branch and I fixed the instance listing when the tier belongs to a project.

Could you take another look?

@gp-santos gp-santos marked this pull request as ready for review May 19, 2026 19:09
@sureshanaparti
Copy link
Copy Markdown
Contributor

@blueorangutan package

@blueorangutan
Copy link
Copy Markdown

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

@blueorangutan
Copy link
Copy Markdown

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants