Skip to content

techdebt: parameterise map typed API parameters - #14580

Open
DaanHoogland wants to merge 3 commits into
mainfrom
ghi3360-parameterisedParameters
Open

DaanHoogland wants to merge 3 commits into
mainfrom
ghi3360-parameterisedParameters

Conversation

@DaanHoogland

@DaanHoogland DaanHoogland commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Description

Addresses the parameterised-types part of #3360.

Raw Map fields on API commands are replaced with
Map<Integer, Map<String, String>>. This matches what
ParamUnpackWorker actually builds for param[i].key=value input, for
sync and async commands alike. Getters and setters are typed to match:

  • getters that return the first entry return Map<String, String>
  • setters used by internal callers (e.g. the Veeam adapter, image
    store migration) take the indexed map

Response classes get typed details maps. NetworkOffering, BgpPeer
and VolumeForImport use their enum Detail keys; Gson serialises
those by name, so the output is the same.

No API behaviour changes: listApis still reports these parameters and
response fields as map. That leaves the apidocs, CloudMonkey and
Marvin's generated client unchanged.

Fixes: #3360

Types of changes

  • Cleanup (Code refactoring and cleanup, that may add test cases)

How Has This Been Tested?

  • Compiled api, server, framework/extensions, oauth2, kubernetes-service,
    veeam-control-service, metrics and the external hypervisor plugin.
  • Unit tests pass for api (190), framework/extensions (91), oauth2 (1)
    and server (459, including UserVmManagerImplTest,
    AutoScaleManagerImplTest, VnfTemplateManagerImplTest and
    ConfigurationManagerTest).
  • pre-commit passes on the changed files.

🤖 Generated with Claude Code

Copilot AI balanced review requested due to automatic review settings November 4, 2026 17:03

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@codecov

codecov Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 54.54545% with 20 lines in your changes missing coverage. Please review.
✅ Project coverage is 20.73%. Comparing base (6982fac) to head (ed2f971).
⚠️ Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
...pi/command/admin/storage/UpdateStoragePoolCmd.java 0.00% 2 Missing ⚠️
...apache/cloudstack/api/response/UserVmResponse.java 0.00% 2 Missing ⚠️
...k/oauth2/api/command/RegisterOAuthProviderCmd.java 0.00% 2 Missing ⚠️
...udstack/api/command/admin/guest/AddGuestOsCmd.java 0.00% 1 Missing ⚠️
...pi/command/admin/network/bgp/CreateBgpPeerCmd.java 0.00% 1 Missing ⚠️
...pi/command/admin/network/bgp/UpdateBgpPeerCmd.java 0.00% 1 Missing ⚠️
...ck/api/command/admin/storage/AddImageStoreCmd.java 0.00% 1 Missing ⚠️
...command/admin/storage/AddObjectStoragePoolCmd.java 0.00% 1 Missing ⚠️
...pi/command/admin/storage/CreateStoragePoolCmd.java 0.00% 1 Missing ⚠️
.../admin/storage/UpdateCloudToUseObjectStoreCmd.java 0.00% 1 Missing ⚠️
... and 7 more
Additional details and impacted files
@@             Coverage Diff             @@
##               main   #14580     +/-   ##
===========================================
  Coverage     20.72%   20.73%             
- Complexity    20774    20794     +20     
===========================================
  Files          6049     6049             
  Lines        547761   547747     -14     
  Branches      78397    73175   -5222     
===========================================
+ Hits         113539   113576     +37     
+ Misses       420906   420857     -49     
+ Partials      13316    13314      -2     
Flag Coverage Δ
uitests 3.86% <ø> (ø)
unittests 22.16% <54.54%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 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.

@DaanHoogland

Copy link
Copy Markdown
Contributor Author

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@DaanHoogland a [SL] Jenkins job has been kicked to build packages. It will be bundled with no 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 19922

@DaanHoogland
DaanHoogland force-pushed the ghi3360-parameterisedParameters branch from ee65ee9 to 764d597 Compare November 6, 2026 16:16
Copilot AI balanced review requested due to automatic review settings November 6, 2026 16:16

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

🔴 Test Coverage Grade: D — Marginal

Metric Value
Line coverage 25.64%
Branch coverage 20.80%

Grade Scale

Grade Line Coverage Meaning
🟢 A ≥ 80% Excellent - this code sleeps well at night 😴
🟡 B 60-79% Good - almost there, don't stop now 😉
🟠 C 40-59% Acceptable - your code is wearing a seatbelt, but no airbags 😬
🔴 D 20-39% Marginal - boldly shipping where no test has gone before 🖖
⛔ F < 20% Failing - tests? what tests? 🔥

Branch coverage is shown as a secondary signal. Grade is determined by line coverage.
View full Actions run

@blueorangutan

Copy link
Copy Markdown

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

@DaanHoogland DaanHoogland added this to the 24.0 milestone Nov 8, 2026
@DaanHoogland

Copy link
Copy Markdown
Contributor Author

@blueorangutan test matrix

@blueorangutan

Copy link
Copy Markdown

@DaanHoogland a [SL] Trillian-Jenkins matrix job (ol8 mgmt + kvm-ol8, ubuntu24 mgmt + kvm-ubuntu24, ol8 mgmt + vmware-70u3, ol9 mgmt + xcpng82) has been kicked to run smoke tests

@blueorangutan

Copy link
Copy Markdown

[SF] Trillian test result (tid-17504)
Environment: xcpng82 (x2), zone: Advanced Networking with Mgmt server ol9
Total time taken: 49578 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr14580-t17504-xcpng82.zip
Smoke tests completed. 134 look OK, 1 have errors, 22 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File
test_04_readiness_cache_invalidated_on_out_of_band_restart Error 146.04 test_instance_boot_group.py
all_test_vm_autoscaling Skipped --- test_vm_autoscaling.py
all_test_vm_deployment_planner Skipped --- test_vm_deployment_planner.py
all_test_vm_life_cycle Skipped --- test_vm_life_cycle.py
all_test_vm_lifecycle_unmanage_import Skipped --- test_vm_lifecycle_unmanage_import.py
all_test_vm_lifecycle_unmanage_kvm_import Skipped --- test_vm_lifecycle_unmanage_kvm_import.py
all_test_vm_lifecycle_with_snapshot_or_volume Skipped --- test_vm_lifecycle_with_snapshot_or_volume.py
all_test_vm_schedule Skipped --- test_vm_schedule.py
all_test_vm_snapshot_kvm Skipped --- test_vm_snapshot_kvm.py
all_test_vm_snapshots Skipped --- test_vm_snapshots.py
all_test_vm_strict_host_tags Skipped --- test_vm_strict_host_tags.py
all_test_vnf_templates Skipped --- test_vnf_templates.py
all_test_volumes Skipped --- test_volumes.py
all_test_vpc_conserve_mode Skipped --- test_vpc_conserve_mode.py
all_test_vpc_firewall_rules Skipped --- test_vpc_firewall_rules.py
all_test_vpc_ipv6 Skipped --- test_vpc_ipv6.py
all_test_vpc_redundant Skipped --- test_vpc_redundant.py
all_test_vpc_router_nics Skipped --- test_vpc_router_nics.py
all_test_vpc_vpn Skipped --- test_vpc_vpn.py
all_test_webhook_delivery Skipped --- test_webhook_delivery.py
all_test_webhook_lifecycle Skipped --- test_webhook_lifecycle.py
all_test_host_maintenance Skipped --- test_host_maintenance.py
all_test_hostha_kvm Skipped --- test_hostha_kvm.py

@blueorangutan

Copy link
Copy Markdown

[SF] Trillian test result (tid-17501)
Environment: kvm-ol8 (x2), zone: Advanced Networking with Mgmt server ol8
Total time taken: 60077 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr14580-t17501-kvm-ol8.zip
Smoke tests completed. 157 look OK, 0 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File

@blueorangutan

Copy link
Copy Markdown

[SF] Trillian test result (tid-17502)
Environment: kvm-ubuntu24 (x2), zone: Advanced Networking with Mgmt server u24
Total time taken: 63540 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr14580-t17502-kvm-ubuntu24.zip
Smoke tests completed. 156 look OK, 1 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File
test_hostha_enable_ha_when_host_disabled Error 2.25 test_hostha_kvm.py
test_hostha_enable_ha_when_host_in_maintenance Error 304.42 test_hostha_kvm.py

@blueorangutan

Copy link
Copy Markdown

[SF] Trillian test result (tid-17503)
Environment: vmware-70u3 (x2), zone: Advanced Networking with Mgmt server ol8
Total time taken: 65113 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr14580-t17503-vmware-70u3.zip
Smoke tests completed. 154 look OK, 3 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File
test_05_list_volumes_isrecursive Failure 0.06 test_list_volumes.py
test_07_list_volumes_listall Failure 0.05 test_list_volumes.py
test_01_ssl_offloading_isolated_network Failure 812.01 test_ssl_offloading.py
test_10_list_volumes Failure 371.94 test_volumes.py

@blueorangutan

Copy link
Copy Markdown

[SF] Trillian test result (tid-17508)
Environment: xcpng82 (x2), zone: Advanced Networking with Mgmt server ol9
Total time taken: 70829 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr14580-t17508-xcpng82.zip
Smoke tests completed. 107 look OK, 6 have errors, 44 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File
test_04_readiness_cache_invalidated_on_out_of_band_restart Error 134.58 test_instance_boot_group.py
test_list_vms_metrics_admin Error 3607.80 test_metrics_api.py
test_list_vms_metrics_history Error 8.18 test_metrics_api.py
test_deploy_vm_with_registered_userdata Error 1713.16 test_register_userdata.py
test_deploy_vm_with_registered_userdata Error 1713.31 test_register_userdata.py
test_deploy_vm_with_registered_userdata_with_override_policy_allow Error 1220.28 test_register_userdata.py
test_deploy_vm_with_registered_userdata_with_override_policy_allow Error 1220.41 test_register_userdata.py
test_deploy_vm_with_registered_userdata_with_override_policy_append Error 1216.47 test_register_userdata.py
test_deploy_vm_with_registered_userdata_with_override_policy_append Error 1216.57 test_register_userdata.py
test_deploy_vm_with_registered_userdata_with_params Error 1220.06 test_register_userdata.py
test_deploy_vm_with_registered_userdata_with_params Error 1220.16 test_register_userdata.py
ContextSuite context=TestResetVmOnReboot>:setup Error 0.00 test_reset_vm_on_reboot.py
test_01_so_removal_resource_update Error 1211.65 test_resource_accounting.py
ContextSuite context=TestResourceNames>:setup Error 0.00 test_resource_names.py
all_test_restore_vm Skipped --- test_restore_vm.py
all_test_router_dhcphosts Skipped --- test_router_dhcphosts.py
all_test_router_dns Skipped --- test_router_dns.py
all_test_router_dnsservice Skipped --- test_router_dnsservice.py
all_test_routers_iptables_default_policy Skipped --- test_routers_iptables_default_policy.py
all_test_routers_network_ops Skipped --- test_routers_network_ops.py
all_test_routers Skipped --- test_routers.py
all_test_scale_vm Skipped --- test_scale_vm.py
all_test_secondary_storage Skipped --- test_secondary_storage.py
all_test_service_offerings Skipped --- test_service_offerings.py
all_test_set_sourcenat Skipped --- test_set_sourcenat.py
all_test_sharedfs_lifecycle Skipped --- test_sharedfs_lifecycle.py
all_test_snapshots Skipped --- test_snapshots.py
all_test_ssl_offloading Skipped --- test_ssl_offloading.py
all_test_ssvm Skipped --- test_ssvm.py
all_test_staticroles Skipped --- test_staticroles.py
all_test_storage_policy Skipped --- test_storage_policy.py
all_test_systemvm_userdata Skipped --- test_systemvm_userdata.py
all_test_templates Skipped --- test_templates.py
all_test_update_security_group Skipped --- test_update_security_group.py
all_test_usage_events Skipped --- test_usage_events.py
all_test_usage Skipped --- test_usage.py
all_test_vm_autoscaling Skipped --- test_vm_autoscaling.py
all_test_vm_deployment_planner Skipped --- test_vm_deployment_planner.py
all_test_vm_life_cycle Skipped --- test_vm_life_cycle.py
all_test_vm_lifecycle_unmanage_import Skipped --- test_vm_lifecycle_unmanage_import.py
all_test_vm_lifecycle_unmanage_kvm_import Skipped --- test_vm_lifecycle_unmanage_kvm_import.py
all_test_vm_lifecycle_with_snapshot_or_volume Skipped --- test_vm_lifecycle_with_snapshot_or_volume.py
all_test_vm_schedule Skipped --- test_vm_schedule.py
all_test_vm_snapshot_kvm Skipped --- test_vm_snapshot_kvm.py
all_test_vm_snapshots Skipped --- test_vm_snapshots.py
all_test_vm_strict_host_tags Skipped --- test_vm_strict_host_tags.py
all_test_vnf_templates Skipped --- test_vnf_templates.py
all_test_volumes Skipped --- test_volumes.py
all_test_vpc_conserve_mode Skipped --- test_vpc_conserve_mode.py
all_test_vpc_firewall_rules Skipped --- test_vpc_firewall_rules.py
all_test_vpc_ipv6 Skipped --- test_vpc_ipv6.py
all_test_vpc_redundant Skipped --- test_vpc_redundant.py
all_test_vpc_router_nics Skipped --- test_vpc_router_nics.py
all_test_vpc_vpn Skipped --- test_vpc_vpn.py
all_test_webhook_delivery Skipped --- test_webhook_delivery.py
all_test_webhook_lifecycle Skipped --- test_webhook_lifecycle.py
all_test_host_maintenance Skipped --- test_host_maintenance.py
all_test_hostha_kvm Skipped --- test_hostha_kvm.py

@blueorangutan

Copy link
Copy Markdown

[SF] Trillian test result (tid-17509)
Environment: kvm-ubuntu24 (x2), zone: Advanced Networking with Mgmt server u24
Total time taken: 73338 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr14580-t17509-kvm-ubuntu24.zip
Smoke tests completed. 155 look OK, 2 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File
test_03_ssvm_internals Failure 18.91 test_ssvm.py
test_hostha_enable_ha_when_host_disabled Error 2.32 test_hostha_kvm.py
test_hostha_enable_ha_when_host_in_maintenance Error 304.36 test_hostha_kvm.py

@blueorangutan

Copy link
Copy Markdown

[SF] Trillian test result (tid-17507)
Environment: vmware-70u3 (x2), zone: Advanced Networking with Mgmt server ol8
Total time taken: 75175 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr14580-t17507-vmware-70u3.zip
Smoke tests completed. 133 look OK, 7 have errors, 17 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File
test_08_upgrade_kubernetes_ha_cluster Failure 3721.68 test_kubernetes_clusters.py
test_01_ssl_offloading_isolated_network Failure 875.07 test_ssl_offloading.py
ContextSuite context=TestVMDeploymentPlanner>:setup Error 0.00 test_vm_deployment_planner.py
ContextSuite context=TestDeployVM>:setup Error 0.00 test_vm_life_cycle.py
ContextSuite context=TestKVMLiveMigration>:setup Error 0.00 test_vm_life_cycle.py
ContextSuite context=TestMigrateVMwithVolume>:setup Error 0.00 test_vm_life_cycle.py
ContextSuite context=TestVAppsVM>:setup Error 0.02 test_vm_life_cycle.py
ContextSuite context=TestVMLifeCycle>:setup Error 0.06 test_vm_life_cycle.py
ContextSuite context=TestUnmanageVM>:setup Error 0.00 test_vm_lifecycle_unmanage_import.py
ContextSuite context=TestUnmanageKvmVM>:setup Error 0.00 test_vm_lifecycle_unmanage_kvm_import.py
ContextSuite context=TestDeployVMFromSnapshotOrVolume>:setup Error 0.00 test_vm_lifecycle_with_snapshot_or_volume.py
all_test_vm_autoscaling Skipped --- test_vm_autoscaling.py
all_test_vm_schedule Skipped --- test_vm_schedule.py
all_test_vm_snapshot_kvm Skipped --- test_vm_snapshot_kvm.py
all_test_vm_snapshots Skipped --- test_vm_snapshots.py
all_test_vm_strict_host_tags Skipped --- test_vm_strict_host_tags.py
all_test_vnf_templates Skipped --- test_vnf_templates.py
all_test_volumes Skipped --- test_volumes.py
all_test_vpc_conserve_mode Skipped --- test_vpc_conserve_mode.py
all_test_vpc_firewall_rules Skipped --- test_vpc_firewall_rules.py
all_test_vpc_ipv6 Skipped --- test_vpc_ipv6.py
all_test_vpc_redundant Skipped --- test_vpc_redundant.py
all_test_vpc_router_nics Skipped --- test_vpc_router_nics.py
all_test_vpc_vpn Skipped --- test_vpc_vpn.py
all_test_webhook_delivery Skipped --- test_webhook_delivery.py
all_test_webhook_lifecycle Skipped --- test_webhook_lifecycle.py
all_test_host_maintenance Skipped --- test_host_maintenance.py
all_test_hostha_kvm Skipped --- test_hostha_kvm.py

@DaanHoogland

Copy link
Copy Markdown
Contributor Author

@blueorangutan test ubuntu24 kvm-ubuntu24

@blueorangutan

Copy link
Copy Markdown

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

@blueorangutan

Copy link
Copy Markdown

[SF] Trillian test result (tid-17531)
Environment: kvm-ubuntu24 (x2), zone: Advanced Networking with Mgmt server u24
Total time taken: 71503 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr14580-t17531-kvm-ubuntu24.zip
Smoke tests completed. 154 look OK, 3 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File
test_08_arping_in_ssvm Failure 5.31 test_diagnostics.py
test_uservm_host_control_state Failure 17.54 test_host_control_state.py
test_hostha_enable_ha_when_host_disabled Error 1.26 test_hostha_kvm.py
test_hostha_enable_ha_when_host_in_maintenance Error 304.50 test_hostha_kvm.py

@DaanHoogland
DaanHoogland force-pushed the ghi3360-parameterisedParameters branch from 764d597 to ed2f971 Compare November 12, 2026 09:25
Copilot AI balanced review requested due to automatic review settings November 12, 2026 09:25

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@sonarqubecloud

Copy link
Copy Markdown

@github-actions

Copy link
Copy Markdown

This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.

This branch has not been deployed

No deployments
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.

use only parameterised types for details parameters

3 participants