Skip to content

Clarify VR public IP labels#13240

Open
andrijapanicsb wants to merge 4 commits into
apache:mainfrom
andrijapanicsb:clarify-vr-public-ip-label
Open

Clarify VR public IP labels#13240
andrijapanicsb wants to merge 4 commits into
apache:mainfrom
andrijapanicsb:clarify-vr-public-ip-label

Conversation

@andrijapanicsb
Copy link
Copy Markdown
Contributor

Description

This PR clarifies the wording for the optional public IPv4 address assigned to virtual routers during isolated network and VPC creation.

The existing label.routerip text was reused for sourcenatipaddress in the isolated network and VPC forms, where the value represents the optional public interface / Source NAT address of the VR. The old wording, IPv4 address for the VR in this Network, could be confused with the internal router IP or gateway address. The label now reads Public IPv4 address for the VR.

The API descriptions for sourcenatipaddress are also updated to explicitly describe the value as optional and assigned to the public interface. The VPC API wording now refers to the VPC router and VPC implementation rather than a generic Network router/implementation.

Shared network router IP fields are not necessarily public. To avoid changing their meaning, CreateSharedNetworkForm.vue now uses the dedicated shared-network labels, label.sharedrouterip and label.sharedrouteripv6, instead of the generic label.routerip and label.routeripv6. This keeps shared network creation wording unchanged while allowing the generic label to be accurate for the Source NAT/public VR address fields.

No functional behavior is changed; this is a UI/API-description wording improvement only.

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

N/A

How Has This Been Tested?

  • Parsed ui/public/locales/en.json successfully.
  • Ran git diff --check on the changed files.
  • Verified shared network creation uses label.sharedrouterip and label.sharedrouteripv6, so shared network router IP fields do not inherit the new public IPv4 wording.

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

Checked each use of the affected labels in the network creation views to confirm the public wording is only used by the sourcenatipaddress fields in isolated network and VPC creation, while shared network creation retains dedicated shared-network labels.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 26, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 18.10%. Comparing base (f6efda5) to head (7cf4a33).
⚠️ Report is 45 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main   #13240      +/-   ##
============================================
+ Coverage     18.09%   18.10%   +0.01%     
- Complexity    16721    16749      +28     
============================================
  Files          6037     6037              
  Lines        542546   542935     +389     
  Branches      66431    66488      +57     
============================================
+ Hits          98159    98293     +134     
- Misses       433368   433594     +226     
- Partials      11019    11048      +29     
Flag Coverage Δ
uitests 3.51% <ø> (-0.01%) ⬇️
unittests 19.26% <ø> (+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 thread ui/public/locales/en.json
"label.router.health.checks": "Health checks",
"label.routercount": "Total of virtual routers",
"label.routerip": "IPv4 address for the VR in this Network.",
"label.routerip": "Public IPv4 address for the VR",
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.

actually routerip is the ip address of VR on the guest network, not on Public network

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

image I think it's the Public one, per desc...?

<a-form-item v-if="isVirtualRouterForAtLeastOneService" name="routerip" ref="routerip">
<template #label>
<tooltip-label :title="$t('label.routerip')" :tooltip="apiParams.routerip.description"/>
<tooltip-label :title="$t('label.sharedrouterip')" :tooltip="apiParams.routerip.description"/>
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.

good 👍

Copy link
Copy Markdown
Contributor Author

@andrijapanicsb andrijapanicsb May 26, 2026

Choose a reason for hiding this comment

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

idea was to add prexix Public and to also separate "...for network" (Isolated) vs "...for VPC" (VPC)

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR clarifies UI and API wording for the optional public IPv4 (Source NAT) address that can be assigned to Virtual Routers during isolated network and VPC creation, and avoids mislabeling shared-network router IP fields.

Changes:

  • Update shared network creation to use dedicated shared-network router IP labels (label.sharedrouterip / label.sharedrouteripv6).
  • Clarify isolated network gateway label when Source NAT is supported by the selected offering.
  • Refine sourcenatipaddress API parameter descriptions for network and VPC creation, and update the English UI label for label.routerip.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
ui/src/views/network/CreateSharedNetworkForm.vue Switch router IP label keys to shared-network-specific translations.
ui/src/views/network/CreateIsolatedNetworkForm.vue Introduce conditional gateway label text based on Source NAT support.
ui/public/locales/en.json Add a new gateway label and clarify label.routerip wording in English.
api/src/main/java/org/apache/cloudstack/api/command/user/vpc/CreateVPCCmd.java Clarify sourcenatipaddress description for VPC creation.
api/src/main/java/org/apache/cloudstack/api/command/user/network/CreateNetworkCmd.java Clarify sourcenatipaddress description for isolated network creation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread ui/public/locales/en.json
"label.routercount": "Total of virtual routers",
"label.routerip": "IPv4 address for the VR in this Network.",
"label.routerip": "Public IPv4 address for the VR",
"label.routeripv6": "IPv6 address for the VR in this Network.",
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.

3 participants