flux.resource.status module
- class flux.resource.status.DrainInfo(ranks: IDset, timestamp: float, reason: str)
Bases:
NamedTuple
Drained resource information tuple. .. attribute:: timestamp
timestamp at which resource was drained
- type
float
- reason
message recorded when resources were drained
- Type
str
- reason: str
Alias for field number 2
- timestamp: float
Alias for field number 1
- class flux.resource.status.ResourceStatus(rstatus=None, allocated_ranks=None)
Bases:
object
Container for combined information from resource module and scheduler.
- drain_info
list of DrainInfo object for drain ranks
- Type
list
- filter(include)
Filter the reported resources in a ResourceStatus object :param include: restrict the current set of
reported ranks to the given ranks or hosts.
- get_drain_info(rank)
Find and return the DrainInfo object for rank
rank
- get_idset(*args)
Return an idset of ranks that are the union of all states in args
- class flux.resource.status.ResourceStatusRPC(handle)
Bases:
object
A ResourceStatusRPC encapsulates a query to both the resource module and scheduler and returns a ResourceStatus object.
- get()
Return a ResourceStatus object corresponding to the request Blocks until all RPCs are fulfilled
- get_allocated_ranks()
- get_status()
- flux.resource.status.resource_status(flux_handle)
Initiate RPCs to scheduler and resource module and return a ResourceStatus object holding the result.
- Parameters
flux_handle (flux.Flux) -- a Flux handle
- Returns
- A future representing the request. Call .get()
to get the ResourceStatus result.
- Return type