workflows.events ================ .. py:module:: workflows.events .. autoapi-nested-parse:: Event definitions for the workflows app. This module centralizes the set of supported workflow events and provides helpers to enumerate protocols and operations. Module Contents --------------- .. py:class:: Event Represents a single event. .. attribute:: key Internal name for the event. .. attribute:: protocol Protocol name (e.g., "EST", "CMP", "SCEP"); may be empty. .. attribute:: operation Protocol operation (e.g., "simpleenroll"); may be empty. .. attribute:: handler Service key that will process the event. .. py:attribute:: key :type: str .. py:attribute:: protocol :type: str .. py:attribute:: operation :type: str .. py:attribute:: handler :type: str .. py:class:: Events Central definition of all supported events in one place. .. py:attribute:: est_simpleenroll .. py:attribute:: est_simplereenroll est_cacerts = Event( key='est_cacerts', protocol='EST', operation='', handler='certificate_issued', ) est_csrattrs = Event( key='est_csrattrs', protocol='EST', operation='csrattrs', handler='certificate_request', ) cmp_certrequest = Event( key='cmp_certrequest', protocol='CMP', operation='certRequest', handler='certificate_request', ) cmp_revocationrequest = Event( key='cmp_revocationrequest', protocol='CMP', operation='revocationRequest', handler='certificate_request', ) scep_pkioperation = Event( key='scep_pkioperation', protocol='SCEP', operation='PKIOperation', handler='certificate_request', ) .. py:attribute:: device_created .. py:attribute:: device_onboarded .. py:attribute:: device_deleted .. py:method:: all() :classmethod: Return every Event defined on this class. :returns: All Event instances defined as class attributes. :rtype: list[Event] .. py:method:: protocols() :classmethod: Return the unique list of non-empty protocol names. :returns: Sorted list of protocol identifiers used by defined events. :rtype: list[str] .. py:method:: operations_for(protocol) :classmethod: Return all operations available for a given protocol. :param protocol: Protocol identifier (e.g. ``"est"``). :returns: Operations associated with the given protocol. :rtype: list[str]