The nova.objects.notification
Module¶
-
class
EventType
(context=None, **kwargs)¶ Bases:
nova.objects.base.NovaObject
-
VERSION
= '1.0'¶
-
action
¶
-
fields
= {'action': NotificationAction(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=False,valid_values=('update',)), 'phase': NotificationPhase(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True,valid_values=('start', 'end', 'error')), 'object': String(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=False)}¶
-
object
¶
-
phase
¶
-
to_notification_event_type_field
()¶ Serialize the object to the wire format.
-
-
class
NotificationBase
(context=None, **kwargs)¶ Bases:
nova.objects.base.NovaObject
Base class for versioned notifications.
Every subclass shall define a ‘payload’ field.
-
VERSION
= '1.0'¶
-
emit
(context)¶ Send the notification.
-
event_type
¶
-
fields
= {'priority': NotificationPriority(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=False,valid_values=('audit', 'critical', 'debug', 'info', 'error', 'sample', 'warn')), 'publisher': Object(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=False), 'event_type': Object(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=False)}¶
-
priority
¶
-
publisher
¶
-
-
class
NotificationPayloadBase
(*args, **kwargs)¶ Bases:
nova.objects.base.NovaObject
Base class for the payload of versioned notifications.
-
SCHEMA
= {}¶
-
VERSION
= '1.0'¶
-
fields
= {}¶
-
populate_schema
(**kwargs)¶ Populate the object based on the SCHEMA and the source objects
Parameters: kwargs – A dict contains the source object at the key defined in the SCHEMA
-
-
class
NotificationPublisher
(context=None, **kwargs)¶ Bases:
nova.objects.base.NovaObject
-
VERSION
= '1.0'¶
-
binary
¶
-
fields
= {'binary': String(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=False), 'host': String(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=False)}¶
-
classmethod
from_service_obj
(service)¶
-
host
¶
-
-
notification_sample
(sample)¶ Class decorator to attach the notification sample information to the notification object for documentation generation purposes.
Parameters: sample – the path of the sample json file relative to the doc/notification_samples/ directory in the nova repository root.