Skip to content

[TASK: ] Integrate Device Selector in WFM & WFM Client #375

Description

@spulkit138

Description

Task: Add Device Eligibility Evaluation to WFM CLI and WFM Client

Description

Implement device selector evaluation in both the WFM CLI and WFM Client to support application deployment profiles containing deviceConstraints. This task includes exposing device eligibility information during device selection and enforcing eligibility validation on the target device before deployment. 【1-251985】


Task 1: Add Device Eligibility Indicator to WFM CLI

Enhance the device listing functionality used during application deployment to evaluate the selected application's deviceConstraints against available devices and display the eligibility result.

Requirements

  • Evaluate application deviceConstraints for each device returned by the inventory service.
  • Add an Eligible field to the device listing output.
  • Populate the field with one of the following values:
    • true - Device satisfies the application's deviceConstraints.
    • false - Device does not satisfy the application's deviceConstraints.
    • unknown - Eligibility cannot be determined or evaluation is not applicable.
  • Use the shared device selector implementation for eligibility evaluation.
  • Preserve all existing device listing behavior. 【1-251985】

Acceptance Criteria

  • Device listings include an Eligible column.
  • Eligibility is evaluated using application deviceConstraints.
  • Eligibility values are displayed as true, false, or unknown.
  • Existing CLI functionality remains unaffected other than the addition of the eligibility field.

Task 2: Validate Device Eligibility in WFM Client

Enhance the WFM Client to evaluate incoming application deployment requests against its local device capabilities and labels before deployment processing begins.

Requirements

  • Evaluate deployment profile deviceConstraints against the local device capabilities.
  • Use the shared device selector implementation for constraint validation.
  • Proceed with deployment when the device satisfies all constraints.
  • Reject deployment when the device does not satisfy the constraints.
  • Record a clear failure reason indicating that device eligibility validation failed. 【1-251985】

Status Handling

When eligibility validation fails:

  • Set the application deployment status to Failed.
  • Do not set the status to Not Placeable.

A constraint mismatch at the client occurs after a target device has already been selected. Therefore, the deployment should be treated as a deployment failure rather than a placement failure. 【1-251985】

Acceptance Criteria

  • WFM Client validates deployment profile deviceConstraints before deployment.
  • Eligible deployments continue through the normal deployment workflow.
  • Ineligible deployments transition to Failed status.
  • Failure details clearly indicate a device eligibility validation failure.
  • Deployments without deviceConstraints continue to follow existing behavior.

Dependencies

  • Shared device selector evaluation library.
  • Device capabilities and label metadata required for selector evaluation. 【1-251985】

Definition of Done

  • Device eligibility is displayed in WFM CLI device listings.
  • Device eligibility is evaluated using deployment profile deviceConstraints.
  • WFM Client validates deployment eligibility before deployment execution.
  • Ineligible deployments are marked as Failed.
  • Unit and integration tests cover eligible, ineligible, and unknown eligibility scenarios.
  • Relevant documentation is updated.

Raised by (email-id)

pulkit.d.sharma@capgemini.com

Type of Story

Implementation

Related Tasks

#369

Status

In Motion

% Done

90

Estimated Story-points

2

Updated artifacts

  • API Documentation (Swagger)
  • User Docmentation
  • Reference Implementation Code
  • Test Automation

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions