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

allow users to add description to private gateway #9135

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

charlesweng
Copy link
Contributor

@charlesweng charlesweng commented May 28, 2024

Description

Adding a description to the private gateway tab inside the Network > Vpc > Private Gateway tab. This allows for administrators to easily identify what the private gateway is used for or pertains to.

Backend functionality is also added into the NetworkVO as well as the API interface in java.

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

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

image
image
image

How Has This Been Tested?

This has been tested using a local machine on Ubuntu 22.04 with a simulator deployed. The project builds locally and the ui passes npm run test:unit.

Copy link

boring-cyborg bot commented May 28, 2024

Congratulations on your first Pull Request and welcome to the Apache CloudStack community! If you have any issues or are unsure about any anything please check our Contribution Guide (https://github.com/apache/cloudstack/blob/main/CONTRIBUTING.md)
Here are some useful points:

Copy link

codecov bot commented May 28, 2024

Codecov Report

Attention: Patch coverage is 0% with 36 lines in your changes missing coverage. Please review.

Project coverage is 15.53%. Comparing base (5baac44) to head (22133d0).
Report is 15 commits behind head on main.

Files Patch % Lines
.../main/java/com/cloud/network/vpc/VpcGatewayVO.java 0.00% 8 Missing ⚠️
...src/main/java/com/cloud/network/dao/NetworkVO.java 0.00% 6 Missing ⚠️
...ain/java/com/cloud/network/vpc/VpcManagerImpl.java 0.00% 5 Missing ⚠️
...java/com/cloud/network/vpc/StaticRouteProfile.java 0.00% 4 Missing ⚠️
.../api/command/user/vpc/CreatePrivateGatewayCmd.java 0.00% 3 Missing ⚠️
...k/api/command/user/vpc/ListPrivateGatewaysCmd.java 0.00% 3 Missing ⚠️
...loudstack/api/response/PrivateGatewayResponse.java 0.00% 3 Missing ⚠️
...a/com/cloud/network/vpc/PrivateGatewayProfile.java 0.00% 3 Missing ⚠️
...src/main/java/com/cloud/api/ApiResponseHelper.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##               main    #9135    +/-   ##
==========================================
  Coverage     15.53%   15.53%            
- Complexity    11976    11979     +3     
==========================================
  Files          5496     5496            
  Lines        481335   481366    +31     
  Branches      58900    59768   +868     
==========================================
+ Hits          74783    74795    +12     
- Misses       398289   398303    +14     
- Partials       8263     8268     +5     
Flag Coverage Δ
uitests 4.18% <ø> (ø)
unittests 16.31% <0.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.

@charlesweng
Copy link
Contributor Author

closing, someone has already started working on this feature

@charlesweng charlesweng reopened this Jun 2, 2024
@charlesweng
Copy link
Contributor Author

Reopening - looking into this again.

@DaanHoogland
Copy link
Contributor

@charlesweng , one question: in your description you speak about adding descriptions to Proutes, but in the code I only see the value object (VO) for network being changed. Can you explain what the plan is here, please?

@charlesweng
Copy link
Contributor Author

@DaanHoogland thank you so much for responding. I added several changes in the commit - createprivatenetwork methods,*cmd.java, and many other classes. However, I may have missed something like you said. I will convert this pull request to draft and take a closer look and give you more screen shots!

@charlesweng charlesweng marked this pull request as draft June 3, 2024 13:34
@charlesweng charlesweng force-pushed the allow-users-to-add-description-to-private-gateway-and-static-routes branch 3 times, most recently from 9f29b39 to a229ff5 Compare June 11, 2024 21:37
@charlesweng charlesweng marked this pull request as ready for review June 11, 2024 21:37
@charlesweng charlesweng force-pushed the allow-users-to-add-description-to-private-gateway-and-static-routes branch from a229ff5 to eafc9d4 Compare June 11, 2024 21:39
@charlesweng charlesweng force-pushed the allow-users-to-add-description-to-private-gateway-and-static-routes branch from eafc9d4 to 87ed88f Compare June 11, 2024 21:40
@DaanHoogland
Copy link
Contributor

@charlesweng , I reviewed your changes and am still a bit confused. The changes look good but they seem to add descriptions to VpcGateways and Networks but not to static routes. Is the ttile of the PR misleading or are you not done yet?

btw, you have a lint error because of an EOF not being preceeded by an EOL in the sql file.

@charlesweng
Copy link
Contributor Author

@DaanHoogland will look into the lint errors in sql file and double check if description is needed in network, but VPCGateway description is definitely needed, thanks!

@DaanHoogland
Copy link
Contributor

@DaanHoogland will look into the lint errors in sql file and double check if description is needed in network, but VPCGateway description is definitely needed, thanks!

Yes @charlesweng the VPCGateway looks good. What I wonder about is the mention of static routes in the description of this PR. I see no change for those.

@charlesweng charlesweng changed the title allow users to add description to private gateway and static routes allow users to add description to private gateway Jun 14, 2024
@charlesweng
Copy link
Contributor Author

@DaanHoogland took a look at the code and I think the title of the issue and the PR was misleading with the static routes as there are static routes in both the UI and the backend. Here is the change for static routes in the backend:

api/src/main/java/com/cloud/network/vpc/StaticRouteProfile.java

I still need to test and see if this branch works without UPDATE: planning to remove description in network classes only keeping in vpc classes

@DaanHoogland
Copy link
Contributor

@DaanHoogland took a look at the code and I think the title of the issue and the PR was misleading with the static routes as there are static routes in both the UI and the backend. Here is the change for static routes in the backend:

api/src/main/java/com/cloud/network/vpc/StaticRouteProfile.java

I still need to test and see if this branch works without UPDATE: planning to remove description in network classes only keeping in vpc classes

thnx @charlesweng , I am marking this as draft untill you are done. You can mark it as ready at your will.

@DaanHoogland DaanHoogland marked this pull request as draft August 12, 2024 11:55
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.

2 participants