class documentation

class GroupManager:

View In Hierarchy

Manager for the CSE's group service.

Method configure Configure the GroupManager with the provided configuration.
Method foptRequest Handle requests to a <acme.resources.GRP.GRP>'s <GRP_FOPT> fanOutPoint. This method might be called recursivly, in case there are groups in groups.
Method handleDeleteEvent Handle a CSE-internal delete event (ie. whenever a resource is deleted). Check whether the deleted resource is a member of a group. If yes, then remove the member. This method is called by the EventManager...
Method restart Restart the Group Manager.
Method start Initialization of the GroupManager.
Method stop Shutdown the GroupManager.
Method validate Validate the GroupManager configuration.
Method validateGroup Validate a group and its members (privileges and attribute).
Class Variable dispatcher Injected Dispatcher instance.
Class Variable factory Injected Factory instance.
Class Variable request Injected Request manager instance.
Class Variable security Injected Security manager instance.
Class Variable storage Injected Storage instance.
Method _checkMembersAndPrivileges Internally check a group's member resources and privileges.
def configure(self, config: Configuration):

Configure the GroupManager with the provided configuration.

Parameters
config:ConfigurationThe configuration to apply.
def foptRequest(self, operation: Operation, fopt: GRP_FOPT, request: CSERequest, id: str, originator: str) -> Result:

Handle requests to a <acme.resources.GRP.GRP>'s <GRP_FOPT> fanOutPoint. This method might be called recursivly, in case there are groups in groups.

Parameters
operation:OperationThe operation type to perform on the group.
fopt:GRP_FOPTThe <GRP_FOPT> virtual resource.
request:CSERequestThe request to perform on the <GRP_FOPT>.
id:strThe original target resource ID.
originator:strThe request's originator.
Returns
ResultResult instance.
@onEvent(eventManager.deleteResource)
def handleDeleteEvent(self, eventData: EventData):

Handle a CSE-internal delete event (ie. whenever a resource is deleted). Check whether the deleted resource is a member of a group. If yes, then remove the member. This method is called by the EventManager.

Parameters
eventData:EventDataThe event data containing the deleted resource in EventData.payload.
def restart(self):

Restart the Group Manager.

def start(self):

Initialization of the GroupManager.

def stop(self) -> bool:

Shutdown the GroupManager.

Returns
boolTrue when shutdown is complete.
def validate(self, config: Configuration):

Validate the GroupManager configuration.

Parameters
config:ConfigurationThe configuration to validate.
def validateGroup(self, group: Resource, originator: str):

Validate a group and its members (privileges and attribute).

Parameters
group:ResourceThe <group> resource.
originator:strThe request's originator.
Returns
Result instance.
dispatcher: Dispatcher =

Injected Dispatcher instance.

factory: Factory =

Injected Factory instance.

request: RequestManager =

Injected Request manager instance.

security: SecurityManager =

Injected Security manager instance.

storage: Storage =

Injected Storage instance.

def _checkMembersAndPrivileges(self, group: Resource, originator: str):

Internally check a group's member resources and privileges.

Parameters
group:ResourceThe group resource.
originator:strThe request's originator.
Returns
Result object with the status of the operation.