flux.resource.ResourceSetImplementation module

class flux.resource.ResourceSetImplementation.ResourceSetImplementation

Bases: abc.ABC

This abstract class defines the interface that a ResourceSet implementation shall provide in order to work with the ResourceSet class

append(rset)

Append one resource set to another

copy()

Return a copy of the resource set

count(name)

Return the total number of resources of type 'name'

diff(rset)

Return the set difference of two resource sets

dumps()

Return a short-form string representation of a resource set

encode()

Return a JSON string representation of the resource set

intersect(rset)

Return the set intersection of two resource sets

nnodes()

Return the number of nodes in the resource set as an IDset

nodelist()

Return the list of nodes in the resource set as a Hostlist

ranks()

Return the set of ranks in the resource set as an IDset

remove_ranks(ranks)

Remove an IDset of ranks from a resource set

union(rset)

Return the union of two resource sets