cloudstack icon indicating copy to clipboard operation
cloudstack copied to clipboard

allow users to add description to private gateway

Open charlesweng opened this issue 1 year ago • 12 comments

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)
  • [x] 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
  • [x] Minor

Bug Severity

  • [ ] BLOCKER
  • [ ] Critical
  • [ ] Major
  • [x] 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.

charlesweng avatar May 28 '24 19:05 charlesweng

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:

  • In case of a new feature add useful documentation (raise doc PR at https://github.com/apache/cloudstack-documentation)
  • Be patient and persistent. It might take some time to get a review or get the final approval from the committers.
  • Pay attention to the quality of your code, ensure tests are passing and your PR doesn't have conflicts.
  • Please follow ASF Code of Conduct for all communication including (but not limited to) comments on Pull Requests, Issues, Mailing list and Slack.
  • Be sure to read the CloudStack Coding Conventions. Apache CloudStack is a community-driven project and together we are making it better 🚀. In case of doubts contact the developers at: Mailing List: [email protected] (https://cloudstack.apache.org/mailing-lists.html) Slack: https://apachecloudstack.slack.com/

boring-cyborg[bot] avatar May 28 '24 19:05 boring-cyborg[bot]

Codecov Report

:x: Patch coverage is 0% with 36 lines in your changes missing coverage. Please review. :white_check_mark: Project coverage is 17.46%. Comparing base (f417c6b) to head (3282ef2).

Files with missing lines Patch % Lines
.../main/java/com/cloud/network/vpc/VpcGatewayVO.java 0.00% 8 Missing :warning:
...src/main/java/com/cloud/network/dao/NetworkVO.java 0.00% 6 Missing :warning:
...ain/java/com/cloud/network/vpc/VpcManagerImpl.java 0.00% 5 Missing :warning:
...java/com/cloud/network/vpc/StaticRouteProfile.java 0.00% 4 Missing :warning:
.../api/command/user/vpc/CreatePrivateGatewayCmd.java 0.00% 3 Missing :warning:
...k/api/command/user/vpc/ListPrivateGatewaysCmd.java 0.00% 3 Missing :warning:
...loudstack/api/response/PrivateGatewayResponse.java 0.00% 3 Missing :warning:
...a/com/cloud/network/vpc/PrivateGatewayProfile.java 0.00% 3 Missing :warning:
...src/main/java/com/cloud/api/ApiResponseHelper.java 0.00% 1 Missing :warning:
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #9135      +/-   ##
============================================
- Coverage     17.46%   17.46%   -0.01%     
  Complexity    15516    15516              
============================================
  Files          5913     5913              
  Lines        529385   529416      +31     
  Branches      64679    64679              
============================================
+ Hits          92448    92449       +1     
- Misses       426518   426548      +30     
  Partials      10419    10419              
Flag Coverage Δ
uitests 3.58% <ø> (ø)
unittests 18.52% <0.00%> (-0.01%) :arrow_down:

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

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

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

codecov[bot] avatar May 28 '24 20:05 codecov[bot]

closing, someone has already started working on this feature

charlesweng avatar May 29 '24 17:05 charlesweng

Reopening - looking into this again.

charlesweng avatar Jun 02 '24 02:06 charlesweng

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

DaanHoogland avatar Jun 03 '24 09:06 DaanHoogland

@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 avatar Jun 03 '24 13:06 charlesweng

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

DaanHoogland avatar Jun 12 '24 12:06 DaanHoogland

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

charlesweng avatar Jun 13 '24 16:06 charlesweng

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

DaanHoogland avatar Jun 14 '24 06:06 DaanHoogland

@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

charlesweng avatar Jul 30 '24 18:07 charlesweng

@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 avatar Aug 12 '24 11:08 DaanHoogland

@charlesweng , are you still interested in moving this forwards?

DaanHoogland avatar Dec 12 '25 09:12 DaanHoogland