Skip to content

Prepend VPC name to VPC network tier name - #9780

Merged
yadvr merged 7 commits into
apache:mainfrom
abh1sar:vpc-prepend
Dec 3, 2024
Merged

Prepend VPC name to VPC network tier name#9780
yadvr merged 7 commits into
apache:mainfrom
abh1sar:vpc-prepend

Conversation

@abh1sar

@abh1sarabh1sar commented Oct 8, 2024

Copy link
Copy Markdown
Contributor

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

DaanHooglandand others added 4 commits October 2, 2024 16:50
… than English (apache#9766)
* Fix updateTemplatePermission UI in non-english language
* Improve fix
---------
Co-authored-by: Lucas Martins <lucas.martins@scclouds.com.br>
@codecov

codecovBot commented Oct 8, 2024

Copy link
Copy Markdown

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 linesPatch %Lines
...ain/java/com/cloud/network/vpc/VpcManagerImpl.java14.28%6 Missing ⚠️
...ain/java/com/cloud/network/NetworkServiceImpl.java87.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 
FlagCoverage Δ
uitests4.04% <ø> (ø)
unittests16.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.

Comment threadengine/components-api/src/main/java/com/cloud/network/vpc/VpcManager.java Outdated
Comment threadengine/components-api/src/main/java/com/cloud/network/vpc/VpcManager.java Outdated
Comment threadserver/src/main/java/com/cloud/network/NetworkServiceImpl.java Outdated

@sureshanapartisureshanaparti left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

clgtm

@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 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
Copy Markdown
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
Copy Markdown
ContributorAuthor

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
Copy Markdown
ContributorAuthor

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@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
Copy Markdown

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

@abh1sar

Copy link
Copy Markdown
ContributorAuthor

@blueorangutan test

@blueorangutan

Copy link
Copy Markdown

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

@blueorangutan

Copy link
Copy Markdown

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

TestResultTime (s)Test File

@alexandremattioli

Copy link
Copy Markdown
Contributor

@abh1sar are there any documentation changes?

@abh1sar

Copy link
Copy Markdown
ContributorAuthor

@abh1sar are there any documentation changes?

@alexandremattioli yes. apache/cloudstack-documentation#445

@kiranchavalakiranchavala left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

Test Case ExecutionResult
Verify the functionality of global setting (vpc.tier.name.prepend.delimiter)Pass
Test the global settings at account and project levelPass
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
@yadvryadvr modified the milestones: 4.20.1, 4.21.0Dec 3, 2024
@yadvr
yadvr merged commit ef6c0c4 into apache:mainDec 3, 2024
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 <lucas.martins@scclouds.com.br>
* 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 <daan@onecht.net>
Co-authored-by: Lucas Martins <56271185+lucas-a-martins@users.noreply.github.com>
Co-authored-by: Lucas Martins <lucas.martins@scclouds.com.br>
@abh1sar
abh1sar deleted the vpc-prepend branch April 18, 2026 01:02
Sign up for freeto 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

@abh1sar@sureshanaparti@blueorangutan@alexandremattioli@kiranchavala@DaanHoogland@yadvr@lucas-a-martins