Skip to content

Conversation

Pearl1594
Copy link
Contributor

@Pearl1594 Pearl1594 commented Aug 7, 2025

Description

This PR adds LB service to Network and VPC offerings (in NAT mode) created for Netris Provider

Fixes: #11411

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

How Has This Been Tested?

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

Copy link

codecov bot commented Aug 7, 2025

Codecov Report

❌ Patch coverage is 0% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 17.35%. Comparing base (7d59bfe) to head (0438189).
⚠️ Report is 10 commits behind head on main.

Files with missing lines Patch % Lines
...ommand/admin/network/CreateNetworkOfferingCmd.java 0.00% 4 Missing ⚠️
...ck/api/command/admin/vpc/CreateVPCOfferingCmd.java 0.00% 4 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #11410      +/-   ##
============================================
- Coverage     17.35%   17.35%   -0.01%     
+ Complexity    15232    15229       -3     
============================================
  Files          5885     5885              
  Lines        525618   525622       +4     
  Branches      64157    64161       +4     
============================================
- Hits          91225    91213      -12     
- Misses       424094   424113      +19     
+ Partials      10299    10296       -3     
Flag Coverage Δ
uitests 3.63% <ø> (ø)
unittests 18.39% <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.

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

@Pearl1594 Pearl1594 changed the title Add LB service to Custom VPC/Network offerings Add LB service to Custom Netris VPC/Network offerings Aug 7, 2025
Copy link

sonarqubecloud bot commented Aug 7, 2025

@@ -297,7 +297,8 @@ public List<String> getSupportedServices() {
SourceNat.getName(),
PortForwarding.getName()));
}
if (getNsxSupportsLbService()) {
if (getNsxSupportsLbService() || (provider != null && provider.equalsIgnoreCase("Netris") &&
Copy link
Contributor

Choose a reason for hiding this comment

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

@Pearl1594 Please see if the methods below will help improve readability. Otherwise LGTM

private boolean isNsxWithLb() {
return "Nsx".equalsIgnoreCase(provider) && getNsxSupportsLbService();
}

private boolean isNsxWithoutLb() {
return "Nsx".equalsIgnoreCase(provider) && !getNsxSupportsLbService();
}

private boolean isNetrisNatted() {
return "Netris".equalsIgnoreCase(provider) &&
NetworkOffering.NetworkMode.NATTED.name().equalsIgnoreCase(getNetworkMode());
}

private boolean isNetrisRouted() {
return "Netris".equalsIgnoreCase(provider) &&
NetworkOffering.NetworkMode.ROUTED.name().equalsIgnoreCase(getNetworkMode());
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

Creation of Netris NAT VPC Offerings and Network Offerings missing the Lb service
3 participants