Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #921 +/- ##
==========================================
+ Coverage 39.92% 41.36% +1.43%
==========================================
Files 123 126 +3
Lines 11355 11832 +477
==========================================
+ Hits 4534 4894 +360
- Misses 6424 6541 +117
Partials 397 397 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Adds a wireless profile management API to the device management surface, wiring new WSMAN operations through the devices usecase and exposing HTTP/OpenAPI endpoints backed by request validation.
Changes:
- Extend WSMAN
Management+ devicesFeatureinterfaces to support WiFi profile CRUD-like operations (list/apply) and IEEE802.1x dependencies. - Add devices usecase implementation for
GetWirelessProfiles/ApplyWirelessProfiles, including certificate/credential handling for 802.1x. - Introduce DTO request type + custom validators and register them in the HTTP router; add HTTP routes, mocks, and tests.
Reviewed changes
Copilot reviewed 21 out of 21 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| internal/usecase/devices/wsman/interfaces.go | Expands WSMAN management interface with WiFi profile + 802.1x/cert helpers. |
| internal/usecase/devices/wifistate.go | Import cleanup (no functional change). |
| internal/usecase/devices/wifistate_test.go | Import cleanup (no functional change). |
| internal/usecase/devices/wifiprofile.go | New usecase logic to list/apply wireless profiles, map 802.1x associations, and manage cert handles. |
| internal/usecase/devices/wifiprofile_test.go | New usecase tests for list/apply flows. |
| internal/usecase/devices/wifiprofile_private_test.go | New unit tests for internal mapping/handle-resolution helpers. |
| internal/usecase/devices/interfaces.go | Adds GetWirelessProfiles/ApplyWirelessProfiles to the devices feature interface. |
| internal/mocks/wsv1_mocks.go | Updates WS v1 mocks for new feature methods. |
| internal/mocks/wsman_mocks.go | Updates WSMAN mocks with new management methods. |
| internal/mocks/devicemanagement_mocks.go | Updates device management feature mocks for new API methods. |
| internal/entity/dto/v1/wifiprofile.go | Adds WirelessProfilesApplyRequest and custom validators for wireless profile payloads. |
| internal/entity/dto/v1/wifiprofile_test.go | Adds tests for new validators. |
| internal/controller/ws/v1/interface.go | Extends WS interface with wireless profile operations. |
| internal/controller/openapi/devicemanagement.go | Adds OpenAPI route definitions + example handlers for wireless profiles. |
| internal/controller/httpapi/v1/wifiprofile.go | Adds HTTP handlers for get/apply wireless profiles. |
| internal/controller/httpapi/v1/wifiprofile_test.go | Adds route tests for wireless profile endpoints. |
| internal/controller/httpapi/v1/devicemanagement.go | Registers new WiFi profile routes under /amt/networkSettings/wireless/profile/:guid. |
| internal/controller/httpapi/router.go | Refactors and centralizes custom validator registration; registers new wireless-profile validators. |
| integration-test/collections/console_mps_apis.postman_collection.json | Adds Postman collection entries for the new endpoints. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ad49ca8 to
66c8f6e
Compare
66c8f6e to
ef25e79
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 21 out of 21 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| if err := clearWirelessProfiles(device); err != nil { | ||
| return nil, err | ||
| } | ||
|
|
||
| if err := applyPreparedWirelessProfiles(device, preparedProfiles); err != nil { | ||
| return nil, err | ||
| } |
| // WirelessProfilesApplyRequest carries the desired wireless profile list for one device. | ||
| type WirelessProfilesApplyRequest struct { | ||
| Profiles []config.WirelessProfile `json:"profiles" binding:"wirelessprofilescount,wirelessprofilesuniquepriorities,dive,wirelessprofile"` | ||
| } |
No description provided.