dragon.infrastructure.group_desc

A class that uniquely defines properties of a managed Group of resources for infrastructure communication.

Classes

GroupDescriptor

The group descriptor holds a list of tuples of puids, muids, cuids or huids.

class GroupDescriptor

Bases: object

The group descriptor holds a list of tuples of puids, muids, cuids or huids.

class State

Bases: IntEnum

Current state of a group’s member.

PENDING = 0
ACTIVE = 1
DEAD = 2
class GroupMember

Bases: object

The GroupMember class holds information about each object that is a member of the group.

class Errors

Bases: Enum

An enumeration.

SUCCESS = 0

Resource was created

FAIL = 1

Resource was not created

ALREADY = 2

Resource exists already

state: object = None
uid: int = None
placement: int = None
desc: object = None
error_code: int = None
error_info: str = None
classmethod from_sdict(d)

Returns the launched group member object.

Parameters:

d (Dictionary) – dictionary with all key-value pairs of the available information of the group’s member

Raises:

ValueError – when there is an error during deserialization

Returns:

the GroupMember object

Return type:

GroupMember

get_sdict()

Collects the entire information of a member of the group.

Returns:

A dictionary with all key-value pairs of the available information of the group’s member.

Return type:

Dictionary

__init__(state: object | None = None, uid: int | None = None, placement: int | None = None, desc: object | None = None, error_code: int | None = None, error_info: str | None = None) None
state: State = 0
g_uid: int = None
name: str = None
sets: []
policy: Policy = None
resilient: bool = False
classmethod from_sdict(d)

Returns the descriptor of the launched group of resources.

Parameters:

d (Dictionary) – dictionary with all key-value pairs of the available information of the group

Raises:

ValueError – when there is an error during deserialization

Returns:

the GroupDescriptor object

Return type:

GroupDescriptor

get_sdict()

Collects the entire information of the group.

Returns:

A dictionary with all key-value pairs of the available information of the group.

Return type:

Dictionary

__init__(state: ~dragon.infrastructure.group_desc.GroupDescriptor.State = State.PENDING, g_uid: int | None = None, name: str | None = None, sets: [] = <factory>, policy: ~dragon.infrastructure.policy.Policy | None = None, resilient: bool = False) None