Skip to content

Conversation

@abh1sar
Copy link
Collaborator

@abh1sar abh1sar commented Oct 8, 2024

Description

Network tiers which belong to a VPC have their own individual names, in the networks tab they are listed with all other networks, in order to make it easier to identify those networks and correlate them with the VPCs. their names should be prepended with the name of the VPC they belong to.

This PR prepends VPC name to the network tier name using a delimiter.
This feature can be enabled using a global setting which is disabled by default.
The delimiter can also be changed using a global setting. " " by default.

Doc PR : apache/cloudstack-documentation#445

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

Screenshot 2024-10-08 at 11 22 16 AM Screenshot 2024-10-08 at 11 23 36 AM

How Has This Been Tested?

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

@codecov
Copy link

codecov bot commented Oct 8, 2024

Codecov Report

Attention: Patch coverage is 58.82353% with 7 lines in your changes missing coverage. Please review.

Project coverage is 15.78%. Comparing base (019f2c6) to head (27b393a).
Report is 532 commits behind head on main.

Files with missing lines Patch % Lines
...ain/java/com/cloud/network/vpc/VpcManagerImpl.java 14.28% 6 Missing ⚠️
...ain/java/com/cloud/network/NetworkServiceImpl.java 87.50% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##               main    #9780     +/-   ##
===========================================
  Coverage     15.78%   15.78%             
- Complexity    12564    12568      +4     
===========================================
  Files          5627     5628      +1     
  Lines        492250   492266     +16     
  Branches      61405    63361   +1956     
===========================================
+ Hits          77710    77719      +9     
- Misses       406066   406072      +6     
- Partials       8474     8475      +1     
Flag Coverage Δ
uitests 4.04% <ø> (ø)
unittests 16.60% <58.82%> (+<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.

@abh1sar abh1sar requested a review from sureshanaparti October 8, 2024 11:55
@abh1sar abh1sar requested a review from sureshanaparti October 8, 2024 12:44
Copy link
Contributor

@sureshanaparti sureshanaparti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clgtm

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

Comment on lines 1791 to 1797
if (vpcId != null && VpcManager.VpcTierNamePrepend.value()) {
final String delimiter = VpcManager.VpcTierNamePrependDelimiter.value();
Vpc vpc = _vpcDao.findById(vpcId);
if (vpc != null) {
name = vpc.getName() + delimiter + name;
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can this be a method called at the moment name is being set?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. please check.

@abh1sar
Copy link
Collaborator Author

abh1sar commented Oct 9, 2024

@blueorangutan package

@blueorangutan
Copy link

@abh1sar 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 11308

@abh1sar
Copy link
Collaborator Author

abh1sar commented Oct 9, 2024

@blueorangutan test

@blueorangutan
Copy link

@abh1sar a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests

@blueorangutan
Copy link

[SF] Trillian test result (tid-11644)
Environment: kvm-ol8 (x2), Advanced Networking with Mgmt server ol8
Total time taken: 52798 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr9780-t11644-kvm-ol8.zip
Smoke tests completed. 141 look OK, 0 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File

@alexandremattioli
Copy link
Contributor

@abh1sar are there any documentation changes?

@abh1sar
Copy link
Collaborator Author

abh1sar commented Oct 10, 2024

@abh1sar are there any documentation changes?

@alexandremattioli yes. apache/cloudstack-documentation#445

Copy link
Contributor

@kiranchavala kiranchavala left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Test Case Execution Result
Verify the functionality of global setting (vpc.tier.name.prepend.delimiter) Pass
Test the global settings at account and project level Pass
Verify the functionality of global setting (vpc.tier.name.prepend) Pass

@abh1sar abh1sar marked this pull request as ready for review October 21, 2024 07:04
@rohityadavcloud rohityadavcloud modified the milestones: 4.20.1, 4.21.0 Dec 3, 2024
@rohityadavcloud rohityadavcloud merged commit ef6c0c4 into apache:main Dec 3, 2024
26 checks passed
dhslove pushed a commit to ablecloud-team/ablestack-cloud that referenced this pull request Dec 12, 2024
* Fix `updateTemplatePermission` when the UI is set to a language other than English (apache#9766)

* Fix updateTemplatePermission UI in non-english language

* Improve fix

---------

Co-authored-by: Lucas Martins <[email protected]>

* Prepend vpc name to vpc tier network name based on global setting

* Added UT for createVpcGuestNetwork

* rename connector to delimiter and add configKey.Category.Network

* Move setting the name to a new method

---------

Co-authored-by: Daan Hoogland <[email protected]>
Co-authored-by: Lucas Martins <[email protected]>
Co-authored-by: Lucas Martins <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

8 participants