flux.resource.ResourceSet module

class flux.resource.ResourceSet.ResourceSet(arg=None, version=1)

Bases: object

append(*args)

Append a ResourceSet to another

copy()

Return a copy of a ResourceSet

count(name)

Return a count of resource objects within a ResourceSet

Parameters:name -- The name of the object to count, e.g. "core"
diff(*args)
dumps()

Return a short-form, human-readable string of a ResourceSet object

encode()

Encode a ResourceSet object to its serialized string representation

intersect(*args)
ncores
ngpus
nnodes
nodelist

Return a flux.hostlist.Hostlist containing the list of hosts in this ResourceSet

ranks

Return a flux.idset.IDset containing the set of ranks in this ResourceSet

remove_ranks(ranks)

Remove the rank or ranks specified from the ResourceSet

Parameters:ranks -- A flux.idset.IDset object, or number or string which can be converted into an IDset, containing the ranks to remove
rlist
state

An optional state associated with this ResourceSet (e.g. "up")

union(*args)