ROX-30352: add V2 VM service with list and dashboard endpoints#19665
ROX-30352: add V2 VM service with list and dashboard endpoints#19665ajheflin wants to merge 1 commit intoaheflin/ROX-30352/vm-v2-vmcve-viewfrom
Conversation
Add VirtualMachineV2Service scaffold with 3 non-conflicting endpoints: - ListVMs (GET /v2/virtualmachines/vms) - paginated VM list with severity counts - ListVMCVEs (GET /v2/virtualmachines/cves) - paginated CVE list across VMs - GetVMDashboardCounts (GET /v2/virtualmachines/summary) - VM and CVE counts The service is registered in central/main.go gated by the VirtualMachinesEnhancedDataModel feature flag. Unimplemented RPCs return Unimplemented via the embedded UnimplementedServer stub. Includes conversion functions for storage V2 -> API V2 types and severity count aggregation helpers. Partially generated by AI. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Skipping CI for Draft Pull Request. |
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
This change is part of the following stack:
Change managed by git-spice. |
|
Images are ready for the commit at c55c117. To use with deploy scripts, first |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## aheflin/ROX-30352/vm-v2-vmcve-view #19665 +/- ##
======================================================================
- Coverage 49.37% 49.36% -0.02%
======================================================================
Files 2743 2744 +1
Lines 207020 207082 +62
======================================================================
+ Hits 102224 102228 +4
- Misses 97214 97272 +58
Partials 7582 7582
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Description
Part 3/6 of the VirtualMachineV2Service API stack (ROX-30352).
Adds the
VirtualMachineV2Servicescaffold with the first 3 non-conflicting endpoints:ListVMs(GET /v2/virtualmachines/vms) - paginated VM list with per-VM severity counts and component scan countsListVMCVEs(GET /v2/virtualmachines/cves) - paginated CVE list across all VMs with severity aggregationGetVMDashboardCounts(GET /v2/virtualmachines/summary) - total VM and CVE counts for dashboard tabsThe service is registered in
central/main.gogated by theVirtualMachinesEnhancedDataModelfeature flag. Unimplemented RPCs returnUnimplementedvia the embeddedUnimplementedServerstub.Includes conversion functions (
central/convert/storagetov2/virtual_machine_v2.go) for storage V2 types to API response types and severity count aggregation helpers.User-facing documentation
Testing and quality
Automated testing
Service tests to be added in a follow-up.
How I validated my change
go build ./central/...compiles cleanlycentral/main.go