Routing Requests–Constraint Resource Query

Routing Requests–Constraint Resource Query

#340310

Description

The Routing Request can be posted with constraint-resource-query to help understand why workloads cannot be routed.

The syntax of the POST is the same as that of the Routing Request Available Capacity Query. The Routing Request Constraint Resource Query accepts UNROUTED or REJECTED Workloads, or REJECTED Routing Requests.

The elements returned are the same as that for the Routing Request Available Capacity Query; however, only the failed Fit-for-Purpose checks (element fit_for_purpose) and only the slot metrics having 0 or negative capacity (i.e. metrics of subslots[], sensor_capacity: subslots[], sensor_capacity: tiers: subslots[] and host_capacity: hosts: subslots[]) are returned.

Options for Returned Details

You can extend the query with one or all of the following, as documented in Options for Returned Details for the Routing Requests–Available Capacity Query:

  • ?subslots=true—if true, only the 0 or negative capacity slot metrics are returned.
  • ?detailed_sensor_calc=true
  • ?ffp_enabled=false—if true, only the failed Fit-for-Purpose checks are returned; if false, returns the same elements as described for the Available Capacity Query including an adjusted hosting_score.
  • ?negative_slots=true
  • ?detailed_host_calc=true—if true, only the hosts that have a subslots[] entry are included and in turn, only the subslots[] metric entries with 0 or negative capacity are included. See Routing Requests–Constraint Resource Query.

Capacity/Cost Mode Option and Hosting Score

There are three modes that are supported, which can be specified as part of the query. For details, see Capacity/Cost Mode Option and Hosting Score for the Routing Requests–Available Capacity Query.

Resource

/routing-requests/constraint-resource-query

Supported Operations

Table: Routing Requests–Constraint Resource Query Supported Operations

Operation

HTTP Method

Input

Output

Description

Query

POST /routing-requests/constraint-resource-query

Routing Requests: Form Definition

[Routing Requests–Available Capacity Query: Resource Elements]

This request is exactly the same as the POST to a Routing Requests Available Capacity Query, which is the same as the Routing Request except no objects are created (i.e. Routing Request and specified Workloads). Note that when specifying an inline Workload object, the name element is not required.

The Routing Request Constraint Resource Query accepts only UNROUTED or REJECTED Workloads. Otherwise, an error is returned.

This post returns the same elements as the Routing Request Available Capacity Query, except only the failed Fit-for-Purpose checks, and only the 0 or negative capacity slot metrics are returned.

Note: The specification of only 1 inline workload and 1 inline disk is supported.

Get Individual

GET /routing-requests/constraint-resource-query/<id>

None

Routing Requests–Available Capacity Query: Resource Elements

Returns the Routing Request Constraint Resource Query elements of the specified Routing Request id.

The Routing Request must be in REJECTED status. Otherwise, an error is returned.

Examples

Example: Getting the Constraints for Rejected Workloads

The following example shows you why Workloads were rejected.

Example: Getting ?detailed_host_calc Details

The following example shows the snippet of the response when ?detailed_host_calc=true is used.