Remove the 'externalId' parameter when creating networks#13287
Conversation
There was a problem hiding this comment.
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
externalIdinputs from isolated network and VPC tier creation forms. - Removes
externalIdfromCreateNetworkCmd,Network,NetworkProfile, andNetworkVO. - 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.
Codecov Report✅ All modified and coverable lines are covered by tests.
Additional details and impacted files@@ Coverage Diff @@
## main #13287 +/- ##
=============================================
- Coverage 18.10% 3.51% -14.59%
=============================================
Files 6037 464 -5573
Lines 542796 40157 -502639
Branches 66456 7559 -58897
=============================================
- Hits 98291 1413 -96878
+ Misses 433460 38554 -394906
+ Partials 11045 190 -10855
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
b330f9e to
bb04c3b
Compare
Description
The
externalIdparameter of thecreateNetworkAPI 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
externalIdparameter increateNetworkAPI and in the UI.Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Screenshots (if appropriate):
How Has This Been Tested?
To perform the testes, I opened the
createNetworkform in GUI and checked that theexternalIdparameter isn't present in the form anymore. Via CMK, I checked that theexternalIdparameter isn't present in thecreateNetworkAPI too. Then, I created a new Network and created a new VM with it. No problems have been found in the process.