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.
VERSION
= '1.1'¶action
¶created_at
¶fields
= {'action': String(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=False), 'created_at': DateTime(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'object': String(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=False), 'status': NotificationStatus(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=False,valid_values=('start', 'end', 'error', 'success')), 'updated_at': DateTime(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True)}¶object
¶status
¶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 |
updated_at
¶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.
VERSION
= '1.0'¶created_at
¶emit
(context)[source]¶Send the notification.
Raises: | NotificationPayloadError |
---|---|
Raises: | oslo_versionedobjects.exceptions.MessageDeliveryFailure |
event_type
¶fields
= {'created_at': DateTime(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'event_type': Object(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=False), 'level': NotificationLevel(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=False,valid_values=('debug', 'info', 'warning', 'error', 'critical')), 'publisher': Object(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=False), 'updated_at': DateTime(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True)}¶level
¶publisher
¶updated_at
¶ironic.objects.notification.
NotificationPayloadBase
(*args, **kwargs)[source]¶Bases: ironic.objects.base.IronicObject
Base class for the payload of versioned notifications.
SCHEMA
= {}¶VERSION
= '1.0'¶created_at
¶fields
= {'created_at': DateTime(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'updated_at': DateTime(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True)}¶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 |
updated_at
¶ironic.objects.notification.
NotificationPublisher
(context=None, **kwargs)[source]¶Bases: ironic.objects.base.IronicObject
VERSION
= '1.0'¶created_at
¶fields
= {'created_at': DateTime(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'host': String(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=False), 'service': String(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=False), 'updated_at': DateTime(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True)}¶host
¶service
¶updated_at
¶Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.