The watcher.objects.fields Module

The watcher.objects.fields Module

Utility methods for objects

class watcher.objects.fields.BaseWatcherEnum(**kwargs)[source]

Bases: oslo_versionedobjects.fields.Enum

class watcher.objects.fields.DictField(**kwargs)[source]

Bases: oslo_versionedobjects.fields.AutoTypedField

class watcher.objects.fields.FlexibleDict[source]

Bases: oslo_versionedobjects.fields.FieldType

static coerce(obj, attr, value)[source]
class watcher.objects.fields.FlexibleDictField(**kwargs)[source]

Bases: oslo_versionedobjects.fields.AutoTypedField

class watcher.objects.fields.FlexibleListOfDict[source]

Bases: oslo_versionedobjects.fields.FieldType

static coerce(obj, attr, value)[source]
class watcher.objects.fields.FlexibleListOfDictField(**kwargs)[source]

Bases: oslo_versionedobjects.fields.AutoTypedField

class watcher.objects.fields.Json[source]

Bases: oslo_versionedobjects.fields.FieldType

coerce(obj, attr, value)[source]

This is called to coerce (if possible) a value on assignment.

This method should convert the value given into the designated type, or throw an exception if this is not possible.

:param:obj: The VersionedObject on which an attribute is being set :param:attr: The name of the attribute being set :param:value: The value being set :returns: A properly-typed value

from_primitive(obj, attr, value)[source]

This is called to deserialize a value.

This method should deserialize a value from the form given by to_primitive() to the designated type.

:param:obj: The VersionedObject on which the value is to be set :param:attr: The name of the attribute which will hold the value :param:value: The serialized form of the value :returns: The natural form of the value

to_primitive(obj, attr, value)[source]

This is called to serialize a value.

This method should serialize a value to the form expected by from_primitive().

:param:obj: The VersionedObject on which the value is set :param:attr: The name of the attribute holding the value :param:value: The natural form of the value :returns: The serialized form of the value

class watcher.objects.fields.JsonField(**kwargs)[source]

Bases: oslo_versionedobjects.fields.AutoTypedField

class watcher.objects.fields.ListOfUUIDsField(**kwargs)[source]

Bases: oslo_versionedobjects.fields.AutoTypedField

class watcher.objects.fields.NotificationAction(**kwargs)[source]

Bases: watcher.objects.fields.BaseWatcherEnum

class watcher.objects.fields.NotificationActionField(**kwargs)[source]

Bases: oslo_versionedobjects.fields.BaseEnumField

class watcher.objects.fields.NotificationPhase(**kwargs)[source]

Bases: watcher.objects.fields.BaseWatcherEnum

class watcher.objects.fields.NotificationPhaseField(**kwargs)[source]

Bases: oslo_versionedobjects.fields.BaseEnumField

class watcher.objects.fields.NotificationPriority(**kwargs)[source]

Bases: watcher.objects.fields.BaseWatcherEnum

class watcher.objects.fields.NotificationPriorityField(**kwargs)[source]

Bases: oslo_versionedobjects.fields.BaseEnumField

class watcher.objects.fields.Numeric[source]

Bases: oslo_versionedobjects.fields.FieldType

static coerce(obj, attr, value)[source]
class watcher.objects.fields.NumericField(**kwargs)[source]

Bases: oslo_versionedobjects.fields.AutoTypedField

Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.