class RegistrationManager:
RegistrationManager to handle registrations and de-registrations resources.
| Method | check |
Check the creation of a resource, for example handle registrations for AE, CSR and CSEBase resources. |
| Method | check |
Check the deletion of a resource, for example handle de-registrations for AE, CSR and REQ resources. |
| Method | check |
Check the update of a resource, for example handle updates for CSR resources. |
| Method | config |
Handle configuration updates. |
| Method | deregister |
Deregister the S-Originator for an <AE> resource. |
| Method | expiration |
Check the database for expired resources and delete them. This is called periodically by the expiration monitor. |
| Method | handle |
Handle the de-registration of an AE resource. This includes the deletion of the originator and sending events. |
| Method | handle |
This method creates a new originator for the AE registration, depending on the method choosen. |
| Method | handle |
Check for set creator attribute as well as assign it to allowed resources. |
| Method | handle |
Handle the registration of a <CSEBaseAnnc> resource. |
| Method | handle |
Handle the registration of a <CSEBase> resource. |
| Method | handle |
Handle the registration of a <CSR> resource. |
| Method | handle |
Handle the update of a <CSR> resource. |
| Method | handle |
Handle the de-registration of a registree <CSR> resource. |
| Method | handle |
Handle the de-registration of a <REQ> resource. |
| Method | handle |
Handle the registration of a <REQ> resource. |
| Method | has |
Check wether an AE with originator is registered at the CSE. |
| Method | initialize |
Initialize the RegistrationManager. |
| Method | post |
Handle some post-create aspects, for example send events for some resources. |
| Method | post |
Handle some post-delete aspects, for example send events for some resources. |
| Method | register |
Register the S-Originator for an AE resource. |
| Method | restart |
Restart the registration services. |
| Method | restart |
Restart the expiration monitor, for example after a CSE restart. |
| Method | shutdown |
Shutdown the RegistrationManager. |
| Method | start |
Start the expiration monitor, which periodically checks for expired resources and deletes them. |
| Method | stop |
Stop the expiration monitor. |
| Class Variable | __slots__ |
Slots for the RegistrationManager. |
| Class Variable | dispatcher |
Injected Dispatcher instance. |
| Class Variable | importer |
Injected Importer instance. |
| Class Variable | remote |
Injected RemoteCSEManager plugin, if available. |
| Class Variable | security |
Injected SecurityManager instance. |
| Class Variable | storage |
Injected Storage instance. |
| Class Variable | validator |
Validator instance. |
| Instance Variable | exp |
Background worker for checking expired resources. |
Resource, originator: str, parentResource: Resource | None = None) -> str:
¶
Check the creation of a resource, for example handle registrations for AE, CSR and CSEBase resources.
| Parameters | |
resource:Resource | The resource to be created. |
originator:str | The originator of the request that triggered the creation of the resource. |
parentResource | None | The parent resource of the resource to be created, if available. |
| Returns | |
str |
|
| Raises | |
OPERATION_NOT_ALLOWED | If the operation is not allowed. |
BAD_REQUEST | If the request is malformed or invalid. |
Check the deletion of a resource, for example handle de-registrations for AE, CSR and REQ resources.
| Parameters | |
resource:Resource | The resource to be deleted. |
| Raises | |
BAD_REQUEST | If the deletion is not allowed for the resource type. |
Check the update of a resource, for example handle updates for CSR resources.
| Parameters | |
resource:Resource | The resource to be updated. |
updateJSON | The update dict with the new values for the resource attributes. |
| Raises | |
BAD_REQUEST | If the update is not allowed for the resource type. |
Handle configuration updates.
| Parameters | |
eventEventData | The event data, containing the name of the updated configuration setting and its new value. |
Check the database for expired resources and delete them. This is called periodically by the expiration monitor.
| Returns | |
bool | Always True. |
Handle the de-registration of an AE resource. This includes the deletion of the originator and sending events.
| Parameters | |
ae:Resource | The <AE> resource to be de-registered. |
| Returns | |
bool | Always True. |
This method creates a new originator for the AE registration, depending on the method choosen.
| Parameters | |
ae:Resource | The AE resource to be registered. |
originator:str | The originator of the request that triggered the registration of the AE. This can be empty, in which case a new originator is created for the AE. |
parentResource | The parent resource of the AE to be registered. This should be the CSEBase resource. |
| Returns | |
str | The originator to be used for the AE registration. |
| Raises | |
APP_RULE_VALIDATION_FAILED | If the originator is not allowed. |
INVALID_CHILD_RESOURCE_TYPE | If the parent resource is not the CSEBase. |
Check for set creator attribute as well as assign it to allowed resources.
| Parameters | |
resource:Resource | The resource for which to check and set the creator attribute. |
originator:str | The originator to set as creator, if allowed. |
| Raises | |
BAD_REQUEST | If the creator attribute is not allowed for the resource type, or if the originator is not allowed to be set as creator. |
Handle the registration of a <CSEBase> resource.
| Parameters | |
cb:Resource | The <CSEBase> resource to be registered. |
originator:str | The originator for the CSEBase registration. This should be the Admin originator. |
| Raises | |
CONFLICT | If a <CSEBase> with the same csi already exists, which means that a CSEBase can only be registered once. |
Handle the registration of a <CSR> resource.
| Parameters | |
csr:Resource | The <CSR> resource to be registered. |
originator:str | The originator of the request that triggered the registration of the <CSR>. |
| Raises | |
OPERATION_NOT_ALLOWED | If the registration is not allowed. |
NOT_IMPLEMENTED | If the RemoteCSEManager is disabled. |
Handle the de-registration of a registree <CSR> resource.
| Parameters | |
registreeResource | The <CSR> resource to de-register. |
| Returns | |
bool | Always True. |
Handle the de-registration of a <REQ> resource.
| Parameters | |
resource:Resource | The <REQ> resource to be de-registered. |
| Returns | |
bool | Always True. |
Handle the registration of a <REQ> resource.
| Parameters | |
req:Resource | The <REQ> resource to be registered. |
originator:str | The originator of the request that triggered the registration of the <REQ>. |
| Returns | |
bool | Always True. |
Check wether an AE with originator is registered at the CSE.
- Return
- True if the originator is registered with the CSE.
Todo
Currently this is done by searching the storage. This should be optimized by using an index for the originator.
| Parameters | |
originator:str | ID of the originator / AE. |
| Returns | |
bool | Undocumented |
Handle some post-create aspects, for example send events for some resources.
| Parameters | |
resource:Resource | Resource that was created. |
Handle some post-delete aspects, for example send events for some resources.
| Parameters | |
resource:Resource | Resource that was created. |
Register the S-Originator for an AE resource.
| Parameters | |
ae:Resource | The <AE> resource. |
originator:str | The original originator. |
| Returns | |
str | The assigned S-Originator. |