journal_to_fedora_messaging_messages.ipa module

class journal_to_fedora_messaging_messages.ipa.IpaGroupAddMemberV1(*args, **kwargs)[source]

Bases: IpaGroupMemberMessage

A sub-class of a Fedora message that defines a message schema for messages published by IPA when new users are added to a group.

body_schema: ClassVar = {'$schema': 'http://json-schema.org/draft-04/schema#', 'description': 'Schema for messages sent when new users are added to a group', 'id': 'http://fedoraproject.org/message-schema/ipa.group_add_member.v1', 'properties': {'CODE_FILE': {'type': 'string'}, 'CODE_FUNC': {'type': 'string'}, 'CODE_LINE': {'type': 'string'}, 'ERRNO': {'type': 'string'}, 'IPA_API_ACTOR': {'type': 'string'}, 'IPA_API_COMMAND': {'type': 'string'}, 'IPA_API_PARAMS': {'type': 'string'}, 'IPA_API_RESULT': {'type': 'string'}, 'MESSAGE': {'items': {'type': 'number'}, 'type': ['string', 'null', 'array']}, 'PRIORITY': {'type': 'string'}, 'SYSLOG_FACILITY': {'type': 'string'}, 'SYSLOG_IDENTIFIER': {'type': 'string'}, 'SYSLOG_PID': {'type': 'string'}, 'SYSLOG_TIMESTAMP': {'type': 'string'}, '_CMDLINE': {'type': 'string'}, '_COMM': {'type': 'string'}, '_EXE': {'type': 'string'}, '_GID': {'type': 'string'}, '_HOSTNAME': {'type': 'string'}, '_PID': {'type': 'string'}, '_SOURCE_REALTIME_TIMESTAMP': {'type': 'string'}, '_SYSTEMD_CGROUP': {'type': 'string'}, '_SYSTEMD_INVOCATION_ID': {'type': 'string'}, '_SYSTEMD_SLICE': {'type': 'string'}, '_SYSTEMD_UNIT': {'type': 'string'}, '_UID': {'type': 'string'}, '__REALTIME_TIMESTAMP': {'type': 'string'}}, 'required': ['_HOSTNAME', '_COMM', 'MESSAGE', 'PRIORITY', '__REALTIME_TIMESTAMP', 'IPA_API_ACTOR', 'IPA_API_COMMAND', 'IPA_API_PARAMS', 'IPA_API_RESULT'], 'type': 'object'}
property summary

A summary of the message.

Type:

str

topic: str = 'ipa.group_add_member.v1'
class journal_to_fedora_messaging_messages.ipa.IpaGroupMemberMessage(*args, **kwargs)[source]

Bases: IpaMessage

A base class that defines a message schema for messages published by IPA when new users and/or new groups are added or removed from a group.

property group

The group that the users were added to or removed from.

Type:

str

property group_names

The groups that were added or removed.

Type:

list[str]

property groups

List of groups affected by the action that generated this message.

Note

Sub-classes should override this method if the message pertains to a group or groups. The data returned from this property is used to filter notifications.

Returns:

A list of affected groups.

severity: int = 10
property user_names

The users that were added or removed.

Type:

list[str]

property usernames

List of users affected by the action that generated this message.

Note

Sub-classes should override this method if the message pertains to a user or users. The data returned from this property is used to filter notifications.

Returns:

A list of affected usernames.

class journal_to_fedora_messaging_messages.ipa.IpaGroupRemoveMemberV1(*args, **kwargs)[source]

Bases: IpaGroupMemberMessage

A sub-class of a Fedora message that defines a message schema for messages published by IPA when users and/or groups are removed from a group.

body_schema: ClassVar = {'$schema': 'http://json-schema.org/draft-04/schema#', 'description': 'Schema for messages sent when new users are removed from a group', 'id': 'http://fedoraproject.org/message-schema/ipa.group_remove_member.v1', 'properties': {'CODE_FILE': {'type': 'string'}, 'CODE_FUNC': {'type': 'string'}, 'CODE_LINE': {'type': 'string'}, 'ERRNO': {'type': 'string'}, 'IPA_API_ACTOR': {'type': 'string'}, 'IPA_API_COMMAND': {'type': 'string'}, 'IPA_API_PARAMS': {'type': 'string'}, 'IPA_API_RESULT': {'type': 'string'}, 'MESSAGE': {'items': {'type': 'number'}, 'type': ['string', 'null', 'array']}, 'PRIORITY': {'type': 'string'}, 'SYSLOG_FACILITY': {'type': 'string'}, 'SYSLOG_IDENTIFIER': {'type': 'string'}, 'SYSLOG_PID': {'type': 'string'}, 'SYSLOG_TIMESTAMP': {'type': 'string'}, '_CMDLINE': {'type': 'string'}, '_COMM': {'type': 'string'}, '_EXE': {'type': 'string'}, '_GID': {'type': 'string'}, '_HOSTNAME': {'type': 'string'}, '_PID': {'type': 'string'}, '_SOURCE_REALTIME_TIMESTAMP': {'type': 'string'}, '_SYSTEMD_CGROUP': {'type': 'string'}, '_SYSTEMD_INVOCATION_ID': {'type': 'string'}, '_SYSTEMD_SLICE': {'type': 'string'}, '_SYSTEMD_UNIT': {'type': 'string'}, '_UID': {'type': 'string'}, '__REALTIME_TIMESTAMP': {'type': 'string'}}, 'required': ['_HOSTNAME', '_COMM', 'MESSAGE', 'PRIORITY', '__REALTIME_TIMESTAMP', 'IPA_API_ACTOR', 'IPA_API_COMMAND', 'IPA_API_PARAMS', 'IPA_API_RESULT'], 'type': 'object'}
property summary

A summary of the message.

Type:

str

topic: str = 'ipa.group_remove_member.v1'
class journal_to_fedora_messaging_messages.ipa.IpaMessage(*args, **kwargs)[source]

Bases: Message

A sub-class of a Fedora message that defines a message schema for messages published by IPA.

property agent_name

The username of the user who initiated the action that generated this message.

Type:

str

property app_icon

An URL to the icon of the application that generated the message.

Note

Sub-classes should override this method if their application has an icon and they wish that image to appear in applications that consume messages.

Returns:

The URL to the app’s icon.

property app_name

The name of the application that generated the message.

Note

Sub-classes should override this method.

Returns:

The name of the application.

property result

The status code of the action.

Type:

str

class journal_to_fedora_messaging_messages.ipa.IpaUserAddV1(*args, **kwargs)[source]

Bases: IpaMessage

A sub-class of a Fedora message that defines a message schema for messages published by IPA when a new user is created.

body_schema: ClassVar = {'$schema': 'http://json-schema.org/draft-04/schema#', 'description': 'Schema for messages sent when a new user is created', 'id': 'http://fedoraproject.org/message-schema/ipa.user_add.v1', 'properties': {'CODE_FILE': {'type': 'string'}, 'CODE_FUNC': {'type': 'string'}, 'CODE_LINE': {'type': 'string'}, 'ERRNO': {'type': 'string'}, 'IPA_API_ACTOR': {'type': 'string'}, 'IPA_API_COMMAND': {'type': 'string'}, 'IPA_API_PARAMS': {'type': 'string'}, 'IPA_API_RESULT': {'type': 'string'}, 'MESSAGE': {'items': {'type': 'number'}, 'type': ['string', 'null', 'array']}, 'PRIORITY': {'type': 'string'}, 'SYSLOG_FACILITY': {'type': 'string'}, 'SYSLOG_IDENTIFIER': {'type': 'string'}, 'SYSLOG_PID': {'type': 'string'}, 'SYSLOG_TIMESTAMP': {'type': 'string'}, '_CMDLINE': {'type': 'string'}, '_COMM': {'type': 'string'}, '_EXE': {'type': 'string'}, '_GID': {'type': 'string'}, '_HOSTNAME': {'type': 'string'}, '_PID': {'type': 'string'}, '_SOURCE_REALTIME_TIMESTAMP': {'type': 'string'}, '_SYSTEMD_CGROUP': {'type': 'string'}, '_SYSTEMD_INVOCATION_ID': {'type': 'string'}, '_SYSTEMD_SLICE': {'type': 'string'}, '_SYSTEMD_UNIT': {'type': 'string'}, '_UID': {'type': 'string'}, '__REALTIME_TIMESTAMP': {'type': 'string'}}, 'required': ['_HOSTNAME', '_COMM', 'MESSAGE', 'PRIORITY', '__REALTIME_TIMESTAMP', 'IPA_API_ACTOR', 'IPA_API_COMMAND', 'IPA_API_PARAMS', 'IPA_API_RESULT'], 'type': 'object'}
severity: int = 10
property summary

Return a summary of the message.

Type:

str

topic: str = 'ipa.user_add.v1'
property user_name

The user that was created.

Type:

str

property usernames

List of users affected by the action that generated this message.

Note

Sub-classes should override this method if the message pertains to a user or users. The data returned from this property is used to filter notifications.

Returns:

A list of affected usernames.