Skip to content
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

Ownership selection in VPC tiers and VPC public IPs #9692

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

gpordeus
Copy link
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?

Copy link

codecov bot commented Sep 16, 2024

Codecov Report

Attention: Patch coverage is 11.42857% with 31 lines in your changes missing coverage. Please review.

Project coverage is 15.82%. Comparing base (5ff0b99) to head (147a534).
Report is 46 commits behind head on main.

Files with missing lines Patch % Lines
...src/main/java/com/cloud/api/ApiResponseHelper.java 16.00% 21 Missing ⚠️
...pache/cloudstack/api/response/NetworkResponse.java 0.00% 6 Missing ⚠️
...che/cloudstack/api/response/IPAddressResponse.java 0.00% 3 Missing ⚠️
...tack/api/command/user/network/ListNetworksCmd.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #9692      +/-   ##
============================================
+ Coverage     15.57%   15.82%   +0.24%     
- Complexity    12052    12564     +512     
============================================
  Files          5505     5629     +124     
  Lines        482738   492078    +9340     
  Branches      58961    62315    +3354     
============================================
+ Hits          75203    77879    +2676     
- Misses       399226   405877    +6651     
- Partials       8309     8322      +13     
Flag Coverage Δ
uitests 4.47% <ø> (+0.30%) ⬆️
unittests 16.62% <11.42%> (+0.26%) ⬆️

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.

@gpordeus gpordeus added this to the 4.21.0.0 milestone Sep 16, 2024
@sureshanaparti
Copy link
Contributor

@blueorangutan package

@blueorangutan
Copy link

@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

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

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.

3 participants