flux.resource.list module¶
-
class
flux.resource.list.
ResourceListRPC
(*args, **kwargs)¶ Bases:
flux.rpc.RPC
-
get
()¶ 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:
- Variables
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
(include)¶ 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.
-
flux.resource.list.
resource_list
(flux_handle)¶ Send a request for a SchedResourceList object.
- Parameters
flux_handle (flux.Flux) -- a Flux handle
- Returns
a future representing the request.
- Return type