dragon.globalservices.node

Global Services API for the Node primary resource component.

The ‘Node’ component abstracts the hardware on a node level, providing information like the number of CPUs or the amount of memory available on the node.

Functions

get_list()

Asks Global Services for a list of the h_uids of all nodes.

query(identifier)

Asks GS for the node descriptor beloging to a node identified by name or h_uid .

query_all()

Asks Global Services to return the NodeDescriptor for every node that is part of the system.

query_total_cpus()

Asks GS to return the total number of CPUS beloging to all of the registered nodes.

Exceptions

DragonNodeError

exception DragonNodeError

Bases: Exception

query(identifier) NodeDescriptor

Asks GS for the node descriptor beloging to a node identified by name or h_uid .

Parameters:

identifier – Node id to query. This is the name if of type str, h_uid if of type int

Returns:

descriptor

Raises:

query_all() List[NodeDescriptor]

Asks Global Services to return the NodeDescriptor for every node that is part of the system.

Returns:

list of NodeDescriptors

query_total_cpus() int

Asks GS to return the total number of CPUS beloging to all of the registered nodes.

Returns:

integer value of the number of cpus

Raises:

get_list() list[int]

Asks Global Services for a list of the h_uids of all nodes.

Returns:

list of the h_uids of all currently existing memory pools