Skip to content

Remove the 'externalId' parameter when creating networks#13287

Open
Tonitzpp wants to merge 1 commit into
apache:4.22from
scclouds:remove-externalid-parameter
Open

Remove the 'externalId' parameter when creating networks#13287
Tonitzpp wants to merge 1 commit into
apache:4.22from
scclouds:remove-externalid-parameter

Conversation

@Tonitzpp
Copy link
Copy Markdown
Contributor

Description

The externalId parameter of the createNetwork API was initially introduced to add support for networks managed by Nuage in Apache CloudStack. Nuage was a network plugin that was supported by ACS, but the support was discontinued in 2019 (see #3622) and the parameter was left unused.

Therefore, this PR removes the externalId parameter in createNetwork API and in the UI.

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

Screenshots (if appropriate):

How Has This Been Tested?

To perform the testes, I opened the createNetwork form in GUI and checked that the externalId parameter isn't present in the form anymore. Via CMK, I checked that the externalId parameter isn't present in the createNetwork API too. Then, I created a new Network and created a new VM with it. No problems have been found in the process.

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 removes the unused externalId network creation parameter from the create network API/UI path and updates related service/orchestration method signatures and tests.

Changes:

  • Removes externalId inputs from isolated network and VPC tier creation forms.
  • Removes externalId from CreateNetworkCmd, Network, NetworkProfile, and NetworkVO.
  • Updates network creation call sites, interfaces, mocks, and tests to match the revised signatures.

Reviewed changes

Copilot reviewed 21 out of 21 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
ui/src/views/network/VpcTiersTab.vue Removes external ID field and API submission parameter for VPC tiers.
ui/src/views/network/CreateIsolatedNetworkForm.vue Removes external ID field and parameter forwarding for isolated networks.
api/src/main/java/org/apache/cloudstack/api/command/user/network/CreateNetworkCmd.java Removes createNetwork externalid API parameter/getter.
api/src/test/java/org/apache/cloudstack/api/command/user/network/CreateNetworkCmdTest.java Removes test coverage for the deleted getter.
api/src/main/java/com/cloud/network/Network.java Removes external ID from the network interface.
api/src/main/java/com/cloud/network/NetworkProfile.java Removes external ID profile storage/access.
engine/schema/src/main/java/com/cloud/network/dao/NetworkVO.java Removes external ID persistence mapping and constructor plumbing.
engine/api/src/main/java/org/apache/cloudstack/engine/orchestration/service/NetworkOrchestrationService.java Updates network orchestration service signature.
engine/components-api/src/main/java/com/cloud/network/vpc/VpcManager.java Updates VPC guest network creation signature.
engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java Updates network creation implementation and call sites.
server/src/main/java/com/cloud/network/NetworkServiceImpl.java Removes external ID flow through network creation/commit logic.
server/src/main/java/com/cloud/network/vpc/VpcManagerImpl.java Removes external ID from VPC tier creation flow.
server/src/main/java/com/cloud/api/ApiResponseHelper.java Stops populating network response external ID.
server/src/main/java/com/cloud/network/IpAddressManagerImpl.java Updates default network creation call signature.
server/src/main/java/com/cloud/vm/UserVmManagerImpl.java Updates default/applicable network creation call signatures.
server/src/main/java/org/apache/cloudstack/vm/UnmanagedVMsManagerImpl.java Updates unmanaged VM default network creation call signature.
server/src/test/java/com/cloud/vpc/MockNetworkManagerImpl.java Updates mock manager signature.
server/src/test/java/com/cloud/vm/UserVmManagerImplTest.java Updates Mockito matcher count for revised signature.
server/src/test/java/com/cloud/network/vpc/VpcManagerImplTest.java Updates VPC network creation expectations.
server/src/test/java/com/cloud/network/NetworkServiceImplTest.java Updates network service tests and mocks for revised signatures.
server/src/test/java/com/cloud/network/CreatePrivateNetworkTest.java Updates mock expectation for revised signature.

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

null, null, null, null, null, null);
bypassVlanOverlapCheck, null, owner, null, pNtwk, pNtwk.getDataCenterId(),
ACLType.Account, null, vpcId, null, null, true, null, null,
null, null, null, null, null, null, null, null);
null, null, null, false, null, owner, null, physicalNetwork, zoneId,
aclType, null, null, null, null, true, null,
null, null, null, null, null, null, null, null, vrIfaceMTUs, null);
null, null, null, null, null, null, null, null, null);
Mockito.verify(vpcMgr, times(1)).createVpcGuestNetwork(networkOfferingId, "Vpc 1 -- testNetwork", "Test Network", null, null,
null, null, accountMock, null, phyNet, zoneId, null, null, vpcId, null, accountMock, true,
null, null, null, null, null, null, null, new Pair<>(0, privateMtu), null);
null, null, null, null, null, null, null, null);
@@ -2805,7 +2805,6 @@ public NetworkResponse createNetworkResponse(ResponseView view, Network network)
}
response.setNetworkSpannedZones(networkSpannedZones);
}
@codecov
Copy link
Copy Markdown

codecov Bot commented May 29, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 3.69%. Comparing base (21b2025) to head (b330f9e).

❗ There is a different number of reports uploaded between BASE (21b2025) and HEAD (b330f9e). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (21b2025) HEAD (b330f9e)
unittests 1 0
Additional details and impacted files
@@              Coverage Diff              @@
##               4.22   #13287       +/-   ##
=============================================
- Coverage     17.67%    3.69%   -13.98%     
=============================================
  Files          5922      448     -5474     
  Lines        533165    38105   -495060     
  Branches      65208     7059    -58149     
=============================================
- Hits          94242     1409    -92833     
+ Misses       428276    36509   -391767     
+ Partials      10647      187    -10460     
Flag Coverage Δ
uitests 3.69% <ø> (ø)
unittests ?

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.

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.

2 participants