The ironic.objects.notification Module

class ironic.objects.notification.EventType(context=None, **kwargs)[source]

Bases: ironic.objects.base.IronicObject

Defines the event_type to be sent on the wire.

An EventType must specify the object being acted on, a string describing the action being taken on the notification, and the status of the action.

to_event_type_field()[source]

Constructs string for event_type to be sent on the wire.

The string is in the format: baremetal.<object>.<action>.<status>

Raises:ValueError if self.status is not one of fields.NotificationStatusField
Returns:event_type string
class ironic.objects.notification.NotificationBase(context=None, **kwargs)[source]

Bases: ironic.objects.base.IronicObject

Base class for versioned notifications.

Subclasses must define the “payload” field, which must be a subclass of NotificationPayloadBase.

emit(context)[source]

Send the notification.

Raises:NotificationPayloadError
Raises:oslo_versionedobjects.exceptions.MessageDeliveryFailure
class ironic.objects.notification.NotificationPayloadBase(*args, **kwargs)[source]

Bases: ironic.objects.base.IronicObject

Base class for the payload of versioned notifications.

populate_schema(**kwargs)[source]

Populate the object based on the SCHEMA and the source objects

Parameters:kwargs – A dict contains the source object and the keys defined in the SCHEMA
Raises:NotificationSchemaObjectError
Raises:NotificationSchemaKeyError
class ironic.objects.notification.NotificationPublisher(context=None, **kwargs)[source]

Bases: ironic.objects.base.IronicObject