feat: implement redfish kvm user consent actions#1027
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## redfish #1027 +/- ##
===========================================
+ Coverage 42.03% 42.79% +0.75%
===========================================
Files 152 153 +1
Lines 14581 14804 +223
===========================================
+ Hits 6129 6335 +206
- Misses 7873 7890 +17
Partials 579 579 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
4b02653 to
d9161eb
Compare
1. Implement KVM consent request/submit/cancel end-to-end. 2. Implement KVM and user consent status in graphical console. Signed-off-by: C, Amarnath <amarnath.c@intel.com>
There was a problem hiding this comment.
Pull request overview
This PR implements Redfish KVM user consent actions end-to-end and exposes KVM user consent state in the graphical console model.
Changes:
- Adds request, submit, and cancel KVM consent flows through handler, use case, repository interface, WSMAN repository, and mocks.
- Adds typed consent failure errors and success response handling for the new Redfish actions.
- Updates graphical console KVM status/user-consent status logic and expands unit/controller test coverage.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
redfish/internal/usecase/wsman_repo.go |
Adds KVM consent repository methods and graphical console consent-status mapping. |
redfish/internal/usecase/wsman_repo_test.go |
Adds WSMAN repo and status-mapping tests for KVM consent behavior. |
redfish/internal/usecase/interfaces.go |
Extends the computer system repository interface with KVM consent methods. |
redfish/internal/usecase/consent_errors.go |
Adds typed consent operation failure errors. |
redfish/internal/usecase/consent_errors_test.go |
Tests consent failure error message formatting. |
redfish/internal/usecase/computer_system.go |
Adds use-case pass-through methods and exposes KVM consent actions. |
redfish/internal/usecase/computer_system_test.go |
Updates use-case mock coverage and validates exposed action targets. |
redfish/internal/usecase/computer_system_fuzz_test.go |
Updates fuzz mock repository to satisfy the expanded interface. |
redfish/internal/mocks/mock_repo.go |
Updates mock repository with KVM consent methods. |
redfish/internal/controller/http/v1/handler/systems_test.go |
Updates test repository behavior for KVM consent actions. |
redfish/internal/controller/http/v1/handler/systems_actions.go |
Implements the three KVM consent HTTP handlers and shared success/error handling. |
redfish/internal/controller/http/v1/handler/systems_actions_test.go |
Adds controller tests for success and error paths of KVM consent actions. |
redfish/internal/controller/http/v1/handler/routes_test.go |
Updates route test repository to satisfy the expanded interface. |
|
Please check the error shown for the following scenario. In ACM the request for sending a user consent seems to be incorrect Message": "RequestKVMConsent failed with ReturnValue=2: cannot request consent in the current opt-in state (request may already be pending) There's not need of mentioning (request may already be pending) |
|
When does the "ComputerSystem_OemIntelAMTUserConsentStatus" Timeout get triggered. |
|
Fuzz tests for the new API's are missing could you please add them |
Created ticket #1037. |
1. Skip KVM consent request in ACM mode 2. Refined consent error returns
Fixed |
62e62fd to
85e1968
Compare
Test: