The nova.objects.notification Module

class EventType(context=None, **kwargs)

Bases: nova.objects.base.NovaObject

VERSION = '1.0'
action
fields = {'object': String(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=False), 'phase': NotificationPhase(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True,valid_values=('start', 'end', 'error')), 'action': NotificationAction(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=False,valid_values=('update',))}
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 = {'publisher': Object(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=False), 'priority': NotificationPriority(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=False,valid_values=('audit', 'critical', 'debug', 'info', 'error', 'sample', 'warn')), '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 = {'host': String(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=False), 'binary': 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.

Previous topic

The nova.objects.network_request Module

Next topic

The nova.objects.numa Module

Project Source

This Page