Skip to content

KVM: Mock APIs Realistic Status in Demo Mode #1036

@amarnath-ac

Description

@amarnath-ac

Align mock KVM APIs with realistic consent and status transitions when REDFISH_USE_MOCK=true.

Scope

  1. Update mock KVM API status mapping for availability, enablement, and consent flow.
  2. Return consistent UserConsentStatus and KVMStatus values for requested, granted, denied, and timeout states.
  3. Ensure mock API responses match expected UI and demo behavior.
  4. Add or refine unit tests for all supported mock consent and status paths.

Acceptance Criteria

  1. With REDFISH_USE_MOCK=true, KVM APIs return deterministic KVMStatus and UserConsentStatus combinations.
  2. Request, submit, and cancel consent actions produce expected state transitions on subsequent reads.
  3. No contradictory states are returned unless explicitly defined by rules.
  4. Unit tests for the new mock KVM API behavior pass in CI.
  5. Existing build, lint, and test gates remain green.

Metadata

Metadata

Assignees

Labels

Type

No fields configured for Task.

Projects

Status
In Progress
Status
No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions