flux.resource.list module

class flux.resource.list.ResourceListRPC(*args, **kwargs)

Bases: flux.rpc.RPC


Return a SchedResourceList corresponding to the request.

Blocks until the request is fulfilled.

class flux.resource.list.SchedResourceList(resp)

Bases: object

Encapsulate response from sched.resource-status query. The response will contain 3 Rv1 resource sets:

  • all -- all resources known to scheduler

  • down -- resources currently unavailable (drained or down)

  • allocated -- resources currently allocated to jobs

From these sets, the "up" and "free" resource sets are computed on-demand.

There is generally no need to instantiate this class directly. Instead, instances are returned by fetching the result of a resource_list() call.


Filter the reported resources in a ResourceList object :param include: restrict the current set of

reported ranks to the given ranks or hosts.

property free

All resources which are neither down nor allocated.

property up

All resources which are not down.


Send a request for a SchedResourceList object.


flux_handle (flux.Flux) -- a Flux handle


a future representing the request.

Return type